Comment

Function Usage

Sets the comment of an operator attribute. Generates operator prototype comments when the operator prototype header file is automatically generated.

Based on the operator prototype definition, the custom operator project can automatically generate the operator prototype definition REG_OP that is used in the graph mode. You can use the generated operator prototype to perform operations such as graph construction, build, and execution.

The generated comments help you understand the operator prototype and can be used to automatically generate the operator prototype documentation. Generally, built-in CANN operators are widely used. Developers can use them as required.

Prototype

1
OpAttrDef &Comment(const char *comment)

Parameters

Parameter

Input/Output

Description

comment

Input

Comment content.

Returns

Operator attribute definition. For details about OpAttrDef, see OpAttrDef.

Constraints

None

Examples

1
this->Attr("attrname").Comment("Attr cmt 1");