CANN/ge GNode图节点API文档
简介【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge用户构造Graph的节点数据。需要包含的头文件#include graph/gnode.hPublic成员函数GNode() ~ GNode() default graphStatus GetAttr(const AscendString name, int64_t attr_value) const graphStatus GetAttr(const AscendString name, int32_t attr_value) const graphStatus GetAttr(const AscendString name, uint32_t attr_value) const graphStatus GetAttr(const AscendString name, float32_t attr_value) const graphStatus GetAttr(const AscendString name, AscendString attr_value) const graphStatus GetAttr(const AscendString name, bool attr_value) const graphStatus GetAttr(const AscendString name, Tensor attr_value) const graphStatus GetAttr(const AscendString name, std::vectorint64_t attr_value) const graphStatus GetAttr(const AscendString name, std::vectorint32_t attr_value) const graphStatus GetAttr(const AscendString name, std::vectoruint32_t attr_value) const graphStatus GetAttr(const AscendString name, std::vectorfloat32_t attr_value) const graphStatus GetAttr(const AscendString name, std::vectorAscendString attr_values) const graphStatus GetAttr(const AscendString name, std::vectorbool attr_value) const graphStatus GetAttr(const AscendString name, std::vectorTensor attr_value) const graphStatus GetAttr(const AscendString name, OpBytes attr_value) const graphStatus GetAttr(const AscendString name, std::vectorstd::vectorint64_t attr_value) const graphStatus GetAttr(const AscendString name, std::vectorge::DataType attr_value) const graphStatus GetAttr(const AscendString name, ge::DataType attr_value) const graphStatus GetAttr(const AscendString name, AttrValue attr_value) const graphStatus GetALLSubgraphs(std::vectorGraphPtr graph_list) const graphStatus GetDynamicInputIndexesByName(const AscendString name, std::vectorint32_t indexes) graphStatus GetDynamicOutputIndexesByName(const AscendString name, std::vectorint32_t indexes) std::vectorGNodePtr GetInControlNodes() const std::pairGNodePtr, int32_t GetInDataNodesAndPortIndexs(const int32_t index) const graphStatus GetInputAttr(const AscendString name, uint32_t input_index, AttrValue attr_value) const graphStatus GetInputConstData(const int32_t index, Tensor data) const graphStatus GetInputDesc(const int32_t index, TensorDesc tensor_desc) const graphStatus GetInputIndexByName(const AscendString name, int32_t index) size_t GetInputsSize() const graphStatus GetName(ge::AscendString name) const std::vectorGNodePtr GetOutControlNodes() const std::vectorstd::pairGNodePtr, int32_t GetOutDataNodesAndPortIndexs(const int32_t index) const graphStatus GetOutputAttr(const AscendString name, uint32_t output_index, AttrValue attr_value) const; graphStatus GetOutputIndexByName(const AscendString name, int32_t index) graphStatus GetOutputDesc(const int32_t index, TensorDesc tensor_desc) const size_t GetOutputsSize() const graphStatus GetSubgraph(uint32_t index, GraphPtr graph) const graphStatus GetType(ge::AscendString type) const bool HasAttr(const AscendString name) graphStatus SetAttr(const AscendString name, int64_t attr_value) const graphStatus SetAttr(const AscendString name, int32_t attr_value) const graphStatus SetAttr(const AscendString name, uint32_t attr_value) const graphStatus SetAttr(const AscendString name, float32_t attr_value) const graphStatus SetAttr(const AscendString name, AscendString attr_value) const graphStatus SetAttr(const AscendString name, bool attr_value) const graphStatus SetAttr(const AscendString name, Tensor attr_value) const graphStatus SetAttr(const AscendString name, std::vectorint64_t attr_value) const graphStatus SetAttr(const AscendString name, std::vectorint32_t attr_value) const graphStatus SetAttr(const AscendString name, std::vectoruint32_t attr_value) const graphStatus SetAttr(const AscendString name, std::vectorfloat32_t attr_value) const graphStatus SetAttr(const AscendString name, std::vectorAscendString attr_values) const graphStatus SetAttr(const AscendString name, std::vectorbool attr_value) const graphStatus SetAttr(const AscendString name, std::vectorTensor attr_value) const graphStatus SetAttr(const AscendString name, OpBytes attr_value) const graphStatus SetAttr(const AscendString name, std::vectorstd::vectorint64_t attr_value) const graphStatus SetAttr(const AscendString name, std::vectorge::DataType attr_value) const graphStatus SetAttr(const AscendString name, ge::DataType attr_value) const graphStatus SetAttr(const AscendString name, AttrValue attr_value) const graphStatus SetInputAttr(const AscendString name, uint32_t input_index, const AttrValue attr_value) graphStatus SetOutputAttr(const AscendString name, uint32_t output_index, const AttrValue attr_value) graphStatus UpdateInputDesc(const int32_t index, const TensorDesc tensor_desc) graphStatus UpdateOutputDesc(const int32_t index, const TensorDesc tensor_desc)【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考