GetInputAttr
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <graph/operator.h>
- Library file: libgraph.so
Function Usage
Obtains the attribute value of the operator input tensor based on the attribute name.
Prototype
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | graphStatus GetInputAttr(const int32_t index, const char_t *name, AscendString &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, AscendString &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, int64_t &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, int64_t &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, int32_t &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, int32_t &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, uint32_t &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, uint32_t &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, bool &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, bool &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, float32_t &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, float32_t &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, std::vector<AscendString> &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, std::vector<AscendString> &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, std::vector<int64_t> &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, std::vector<int64_t> &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, std::vector<int32_t> &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, std::vector<int32_t> &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, std::vector<uint32_t> &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, std::vector<uint32_t> &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, std::vector<bool> &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, std::vector<bool> &attr_value) const graphStatus GetInputAttr(const int32_t index, const char_t *name, std::vector<float32_t> &attr_value) const graphStatus GetInputAttr(const char_t *dst_name, const char_t *name, std::vector<float32_t> &attr_value) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
name |
Input |
Attribute name. |
index |
Input |
Input index. |
dst_name |
Input |
Input edge name. |
attr_value |
Output |
Attribute value of type int64_t. |
attr_value |
Output |
Attribute value of type int32_t. |
attr_value |
Output |
Attribute value of type uint32_t. |
attr_value |
Output |
Attribute value of type vector<int64_t>. |
attr_value |
Output |
Attribute value of type vector<int32_t>. |
attr_value |
Output |
Attribute value of type vector<uint32_t>. |
attr_value |
Output |
Attribute value of the floating-point type. |
attr_value |
Output |
Attribute value of the floating-point list type. |
attr_value |
Output |
Attribute value of the bool type. |
attr_value |
Output |
Attribute value of the bool list type. |
attr_value |
Output |
Attribute value of the string type. |
attr_value |
Output |
Attribute value of the string list type. |
Returns
graphStatus type. GRAPH_SUCCESS if the corresponding attribute is found; otherwise, GRAPH_FAILED.
Exception Handling
None
Constraints
None