IrAttrDef【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge该结构体用于旧接口包含 std::string 字段。新代码推荐使用ABI安全的IrAttrDefV2。IR属性定义结构体定义如下struct IrAttrDef { std::string attr_name; IrAttrType ir_attr_type; std::string attr_data_type; // see kIrAttrTypesMap in operator.cc AttrValue attr_default_value; }参数说明如下成员名类型说明attr_namestd::string属性名。ir_attr_typeIrAttrType属性类型。attr_data_typestd::string取值为kIrAttrTypesMap中的key值const std::mapstd::string, std::string kIrAttrTypesMap {{Int, VT_INT},{Float, VT_FLOAT},{String, VT_STRING},{Bool, VT_BOOL},{Tensor, VT_TENSOR},{NamedAttrs, VT_NAMED_ATTRS},{ListInt, VT_LIST_INT},{ListFloat, VT_LIST_FLOAT},{ListString, VT_LIST_STRING},{ListBool, VT_LIST_BOOL},{ListTensor, VT_LIST_TENSOR},{Bytes, VT_BYTES},{ListListInt, VT_LIST_LIST_INT},{ListNamedAttrs, VT_LIST_NAMED_ATTRS},{Type, VT_DATA_TYPE},{ListType, VT_LIST_DATA_TYPE},}attr_default_valueAttrValue属性默认值。【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考