Closed
[Bug-Report|缺陷反馈]: 责任田部分算子代码违反C++语言规范 #3148
高逸凡Add on  Sep 11Closed at  Sep 16
高逸凡Collaborators
Sep 11 Create

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

一、问题描述 (必填)

序号 规范 缺陷描述 文件 代码片段 代码行
1 G.EXP.15-CPP 避免使用reinterpret_cast do not use reinterpret_cast ops/ops-math/conversion/dynamic_stitch/op_host/arch35/dynamic_stitch_tiling_arch35.cpp auto compileInfoPtr = reinterpret_cast(context_->GetCompileInfo()); 61
2 G.INC.09-CPP 头文件中禁止向全局命名空间中导入符号 Do not import symbols into the global namespace or define aliases in the header file. ops/ops-math/conversion/confusion_transpose_d/op_host/arch35/confusion_transpose_d_tiling_arch35.h using namespace std; 26
3 G.CLS.01-CPP 类的成员变量必须显式初始化 The field "paramInfo_.xDtype", type is "ge::DataType" is uninitialized at the end of the constructor call ops/ops-math/conversion/confusion_transpose_d/op_host/arch35/confusion_transpose_d_tiling_arch35.h constexpr int64_t SPLIT_NUM = 16; constexpr int64_t MIN_DIM_ND = 1; constexpr int64_t MAX_DIM_ND = 8; constexpr int64_t MIN_DIM_NZ = 4; constexpr int64_t MAX_DIM_NZ = 8; constexpr int64_t MIN_DIM_NZ2ND = 2; constexpr int64_t MAX_DIM_NZ2ND = 6; class ConfusionTransposeDTiling { public: explicit ConfusionTransposeDTiling(gert::TilingContext* context) : tilingContext_(context){}; ge::graphStatus ParametersVerifying(); void ProcessShapeInfo(ShapeInfo& shapeInfo); private: ge::graphStatus GetParameters(); ge::graphStatus ParametersVerifyingFormatAndDatatype(); ge::graphStatus ParametersVerifyingInputAndOutput(); ge::graphStatus ParametersVerifyingDimNd(); ge::graphStatus ParametersVerifyingPerm(); 62
4 G.CLS.01-CPP 类的成员变量必须显式初始化 The field "paramInfo_.transpose_first", type is "_Bool" is uninitialized at the end of the constructor call ops/ops-math/conversion/confusion_transpose_d/op_host/arch35/confusion_transpose_d_tiling_arch35.h constexpr int64_t SPLIT_NUM = 16; constexpr int64_t MIN_DIM_ND = 1; constexpr int64_t MAX_DIM_ND = 8; constexpr int64_t MIN_DIM_NZ = 4; constexpr int64_t MAX_DIM_NZ = 8; constexpr int64_t MIN_DIM_NZ2ND = 2; constexpr int64_t MAX_DIM_NZ2ND = 6; class ConfusionTransposeDTiling { public: explicit ConfusionTransposeDTiling(gert::TilingContext* context) : tilingContext_(context){}; ge::graphStatus ParametersVerifying(); void ProcessShapeInfo(ShapeInfo& shapeInfo); private: ge::graphStatus GetParameters(); ge::graphStatus ParametersVerifyingFormatAndDatatype(); ge::graphStatus ParametersVerifyingInputAndOutput(); ge::graphStatus ParametersVerifyingDimNd(); ge::graphStatus ParametersVerifyingPerm(); 62
5 G.CLS.01-CPP 类的成员变量必须显式初始化 The field "paramInfo_.yDtype", type is "ge::DataType" is uninitialized at the end of the constructor call ops/ops-math/conversion/confusion_transpose_d/op_host/arch35/confusion_transpose_d_tiling_arch35.h constexpr int64_t SPLIT_NUM = 16; constexpr int64_t MIN_DIM_ND = 1; constexpr int64_t MAX_DIM_ND = 8; constexpr int64_t MIN_DIM_NZ = 4; constexpr int64_t MAX_DIM_NZ = 8; constexpr int64_t MIN_DIM_NZ2ND = 2; constexpr int64_t MAX_DIM_NZ2ND = 6; class ConfusionTransposeDTiling { public: explicit ConfusionTransposeDTiling(gert::TilingContext* context) : tilingContext_(context){}; ge::graphStatus ParametersVerifying(); void ProcessShapeInfo(ShapeInfo& shapeInfo); private: ge::graphStatus GetParameters(); ge::graphStatus ParametersVerifyingFormatAndDatatype(); ge::graphStatus ParametersVerifyingInputAndOutput(); ge::graphStatus ParametersVerifyingDimNd(); ge::graphStatus ParametersVerifyingPerm(); 62
6 G.CLS.01-CPP 类的成员变量必须显式初始化 The field "paramInfo_.xFormat", type is "ge::Format" is uninitialized at the end of the constructor call ops/ops-math/conversion/confusion_transpose_d/op_host/arch35/confusion_transpose_d_tiling_arch35.h constexpr int64_t SPLIT_NUM = 16; constexpr int64_t MIN_DIM_ND = 1; constexpr int64_t MAX_DIM_ND = 8; constexpr int64_t MIN_DIM_NZ = 4; constexpr int64_t MAX_DIM_NZ = 8; constexpr int64_t MIN_DIM_NZ2ND = 2; constexpr int64_t MAX_DIM_NZ2ND = 6; class ConfusionTransposeDTiling { public: explicit ConfusionTransposeDTiling(gert::TilingContext* context) : tilingContext_(context){}; ge::graphStatus ParametersVerifying(); void ProcessShapeInfo(ShapeInfo& shapeInfo); private: ge::graphStatus GetParameters(); ge::graphStatus ParametersVerifyingFormatAndDatatype(); ge::graphStatus ParametersVerifyingInputAndOutput(); ge::graphStatus ParametersVerifyingDimNd(); ge::graphStatus ParametersVerifyingPerm(); 62
7 G.CLS.01-CPP 类的成员变量必须显式初始化 The field "paramInfo_.yFormat", type is "ge::Format" is uninitialized at the end of the constructor call ops/ops-math/conversion/confusion_transpose_d/op_host/arch35/confusion_transpose_d_tiling_arch35.h constexpr int64_t SPLIT_NUM = 16; constexpr int64_t MIN_DIM_ND = 1; constexpr int64_t MAX_DIM_ND = 8; constexpr int64_t MIN_DIM_NZ = 4; constexpr int64_t MAX_DIM_NZ = 8; constexpr int64_t MIN_DIM_NZ2ND = 2; constexpr int64_t MAX_DIM_NZ2ND = 6; class ConfusionTransposeDTiling { public: explicit ConfusionTransposeDTiling(gert::TilingContext* context) : tilingContext_(context){}; ge::graphStatus ParametersVerifying(); void ProcessShapeInfo(ShapeInfo& shapeInfo); private: ge::graphStatus GetParameters(); ge::graphStatus ParametersVerifyingFormatAndDatatype(); ge::graphStatus ParametersVerifyingInputAndOutput(); ge::graphStatus ParametersVerifyingDimNd(); ge::graphStatus ParametersVerifyingPerm(); 62

二、环境信息 (可选)

三、重现步骤 (可选)

四、预期结果 (可选)

💡 备注(选填)

likedislike
高逸凡Collaborators
Sep 11 Comments:

/assign

likedislike
CANN-robotCANN-robotCollaborators
Sep 11 Assign yifangao as responsible person
高高逸凡Collaborators
Sep 11 Associated pull request
高高逸凡Collaborators
Sep 12 Associated pull request
高高逸凡Collaborators
Sep 12 Associated pull request
高高逸凡Collaborators
Sep 16 Associated pull request
高高逸凡Collaborators
Sep 16 Associated pull request
高高逸凡Collaborators
Sep 16 changed custom state from 进行中 to 已完成
高高逸凡Collaborators
Sep 16 Close issue