SetAttr
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <ge/es_graph_builder.h>
- Library files: libeager_style_graph_builder_base.so and libeager_style_graph_builder_base_static.a
Function Usage
Sets the type attribute of a graph.
Prototype
- Set the int64 attribute of a graph.
1Status SetAttr(const char *attr_name, int64_t value)
- Set the string attribute of a graph.
1Status SetAttr(const char *attr_name, const char *value)
- Set the Boolean attribute of a graph.
1Status 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: success. Other values: failure. |
Restrictions
None
Example
1 2 | EsGraphBuilder builder("test_graph"); builder.SetAttr("int64_attr", static_cast<int64_t>(10)) |
Parent topic: EsGraphBuilder