设置input/output参数的注释。
1 | OpParamDef &Comment(const char *comment) |
参数 |
输入/输出 |
说明 |
---|---|---|
comment |
输入 |
注释内容。 |
算子参数定义,OpParamDef请参考OpParamDef。
无
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | class AddCustom : public OpDef { public: explicit AddCustom(const char* name) : OpDef(name) { this->Input("x") .ParamType(REQUIRED) .DataType({ge::DT_FLOAT, ge::DT_INT32}) .FormatList({ge::FORMAT_ND}) .Comment("Input cmt 1"); // 注释内容 this->Input("y") .ParamType(REQUIRED) .Comment("Input cmt 2") // 注释内容 .DataType({ge::DT_FLOAT, ge::DT_INT32}) .FormatList({ge::FORMAT_ND}); this->Output("z") .Comment("Output cmt 1") // 注释内容 .ParamType(REQUIRED) .DataType({ge::DT_FLOAT, ge::DT_INT32}) .FormatList({ge::FORMAT_ND}); this->SetInferShape(ge::InferShape).SetInferDataType(ge::InferDataType); this->AICore() .SetTiling(optiling::TilingFunc); this->AICore().AddConfig("ascendxxx"); } }; |