目录

GetInputAttr

Function Description

Obtains the attribute value of the operator input tensor based on the attribute name.

Function Prototype

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.

Return Value

Type Description
graphStatus GRAPH_SUCCESS if the corresponding attribute is found; otherwise, GRAPH_FAILED.

Exception Handling

None

Restrictions

None