SetAttr

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Function Usage

Sets the type attribute of the graph.

Prototype

  • Set the int64 attribute of the graph.
    1
    Status SetAttr(const char *attr_name, int64_t value)
    
  • Set the string attribute of the graph.
    1
    Status SetAttr(const char *attr_name, const char *value)
    
  • Set the Bool attribute of the graph.
    1
    Status SetAttr(const char *attr_name, bool value)
    

Parameters

Parameter

Input/Output

Description

attr_name

Input

Attribute name.

value

Input

Attribute value.

Returns

Parameter

Type

Description

-

Status

SUCCESS: Operation succeeded.

Other values: Operation failed.

Constraints

None

Examples

1
2
EsGraphBuilder builder("test_graph");
builder.SetAttr("int64_attr", static_cast<int64_t>(10))