CANN/ge GeUtils工具类API文档 GeUtils【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/geProduct Support StatusProductSupport StatusAtlas A3 Training Series Products/Atlas A3 Inference Series Products√Atlas A2 Training Series Products/Atlas A2 Inference Series Products√Module Importfrom ge.utils import GeUtilsFunctionality DescriptionGeUtilsprovides GE (Graph Engine) common utility interfaces, including Shape derivation and AICore operator support checking functionality.infer_shape: Performs Shape derivation on computation graph. This interface only executes Shape derivation, does not perform other graph optimizations (such as constant folding, dead edge elimination etc.).check_node_support_on_aicore: Checks if node is supported on AICore, returns boolean value for support status and unsupported reason string.ClassesGeUtilsGeUtilsclass only contains static methods, can be used without instantiation.Static MethodDescriptioninfer_shapePerforms Shape derivation on computation graphcheck_node_support_on_aicoreChecks if node is supported on AICoreFunction Prototypesinfer_shapestaticmethod def infer_shape(graph: Graph, input_shapes: List[List[int]]) - NonePerforms Shape derivation on computation graph. Only executes Shape derivation, does not perform constant folding, dead edge elimination and other graph optimizations.check_node_support_on_aicorestaticmethod def check_node_support_on_aicore(node: Node) - Tuple[bool, str]Checks if node is supported on AICore, returns boolean value for support status and unsupported reason.Parameter Descriptioninfer_shapeParameterTypeRequiredDescriptiongraphGraphYesComputation graph object to perform Shape derivationinput_shapesList[List[int]]YesInput shape list. Each element in list describes shape of a graph input, each shape is integer dimension listcheck_node_support_on_aicoreParameterTypeRequiredDescriptionnodeNodeYesComputation graph node object to be checkedReturn Value Descriptioninfer_shapeNo return value. Shape derivation result is directly updated in graph object.check_node_support_on_aicoreReturn ValueTypeDescriptionis_supportedboolWhether node is supported on AICore. True means supported, False means not supportedunsupported_reasonstrDescription of unsupported reason. If node is supported, returns empty stringConstraint Descriptioninfer_shapeonly executes Shape derivation, does not perform constant folding, dead edge elimination and other graph optimization operations.input_shapesforinfer_shapemust be list of lists, each sublist elements must be integer type.check_node_support_on_aicorerequires passing validNodeobject.All methods inGeUtilsare static methods, can be called without creating instance.Usage Examplefrom ge.utils import GeUtils from ge.graph import Graph, Node # Shape derivation graph Graph(my_graph) # ... build graph ... GeUtils.infer_shape(graph, [[1, 3, 224, 224], [1, 3, 224, 224]]) # Check if node is supported on AICore【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

相关新闻

最新新闻

Agent长期维护实战:基于Hermes的技能扩展与记忆管理

Agent长期维护实战:基于Hermes的技能扩展与记忆管理

我自己手头维护的Agent项目跑了大半年,最深的感受是——Agent部署上线只算完成了一半,真正的重体力活全在后面的更新与维护。你让它长期跟踪某个领域的知识变化,两个月后它开始“失忆”;你升级了底层模型,它原本稳定的…

2026/9/8 19:20:37
PostgreSQL库内机器学习实践:从数据出库到模型入库

PostgreSQL库内机器学习实践:从数据出库到模型入库

先交代一个背景:我在一个数据量不算夸张、但又足够让“导出CSV到服务器上训练”变得难受的团队里,完整摸索了一轮“数据库内机器学习”的落地路径。整个项目从最开始的数据出库、在Python环境里折腾数据清洗和特征工程,到后面把数据和训练全部…

2026/9/8 19:20:37
智能驾驶数据融合:从传感器标定到场景理解的完整拆解

智能驾驶数据融合:从传感器标定到场景理解的完整拆解

目前的智能驾驶行业里,传感器数量越堆越多,芯片算力越顶越高,但真正决定一辆车“开得好不好”的,恰恰是那个经常被聊得云里雾里的中间层:数据融合。最近解读了一批智驾感知相关的专利,很多平时在发布会上被…

2026/9/8 19:20:37
Anthropic 2万亿美元估值背后:外部信托如何重塑AI公司治理

Anthropic 2万亿美元估值背后:外部信托如何重塑AI公司治理

最近科技圈里有一条新闻,热度不比任何一款新模型发布低——Anthropic的IPO计划浮出水面,媒体估算里甚至出现了“最高2万亿美元估值”这个量级的数字。这直接把原本已经不算低调的Claude推向更大的牌桌。但比起“又要多一家超级公司”这种感叹&#xff0c…

2026/9/8 19:20:37
YOLOv5烟叶病害检测:数据集、训练配置与避坑实战

YOLOv5烟叶病害检测:数据集、训练配置与避坑实战

简介:YOLOv5烟叶病害识别项目资料包,面向计算机、电子信息工程、数学等专业的大学生,适用于课程设计、期末大作业和毕业设计,也适合目标检测方向初学者快速上手。整套资料包含完整YOLOv5源码、已标注的烟叶病害数据集、对应标注文…

2026/9/8 19:20:37
从混乱到可信:diagram-design 让架构图成为工程资产

从混乱到可信:diagram-design 让架构图成为工程资产

两年前,我接手维护一套内部微服务文档时,发现光“业务订单流转”这个话题,四个团队就各自画了六张“架构图”,每一张的图例、箭头和分组方式都不一样。最要命的是,这些图里没有一张能回答最简单的那个问题:…

2026/9/8 19:15:37