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),仅供参考

相关新闻

最新新闻

B站会员购票自动化工具:告别手动抢票的烦恼

B站会员购票自动化工具:告别手动抢票的烦恼

B站会员购票自动化工具:告别手动抢票的烦恼 【免费下载链接】biliTickerBuy b站会员购购票辅助工具 项目地址: https://gitcode.com/GitHub_Trending/bi/biliTickerBuy 还在为抢不到心仪的B站会员购门票而焦虑吗?每次热门活动开售时,页…

2026/7/4 8:45:57
Instatic缓存策略:CDN集成与缓存控制头配置

Instatic缓存策略:CDN集成与缓存控制头配置

Instatic缓存策略:CDN集成与缓存控制头配置 【免费下载链接】Instatic Instatic is a modern self-hosted visual CMS - get it running in 1 minute 项目地址: https://gitcode.com/GitHub_Trending/in/Instatic Instatic作为现代自托管视觉CMS,…

2026/7/4 8:45:57
西工大软院大二数据库并发控制:nwpu-cram实验完全指南

西工大软院大二数据库并发控制:nwpu-cram实验完全指南

西工大软院大二数据库并发控制:nwpu-cram实验完全指南 【免费下载链接】nwpu-cram 西北工业大学/西工大/nwpu/npu软件学院复习(突击)资料!! 项目地址: https://gitcode.com/GitHub_Trending/nw/nwpu-cram 在数据库系统中,并…

2026/7/4 8:45:57
Wireshark实战解析SSL/TLS握手:从密码学原理到网络包诊断

Wireshark实战解析SSL/TLS握手:从密码学原理到网络包诊断

1. 项目概述:为什么我们需要亲手“看见”SSL/TLS握手?如果你是一名开发者、运维工程师或者网络安全爱好者,那么“SSL/TLS”这个词组对你来说一定不陌生。我们每天都在使用它——当浏览器地址栏出现那个小锁图标,当你的手机App与服…

2026/7/4 8:45:57
uiv开发实战:从零开始构建一个完整的管理后台界面

uiv开发实战:从零开始构建一个完整的管理后台界面

uiv开发实战:从零开始构建一个完整的管理后台界面 【免费下载链接】uiv Bootstrap 3 components implemented by Vue.js. 项目地址: https://gitcode.com/gh_mirrors/ui/uiv uiv是基于Vue.js实现的Bootstrap 3组件库,它轻量级且功能丰富&#xff…

2026/7/4 8:45:57
10分钟快速上手ItChat-UOS:Python微信自动化入门完整教程

10分钟快速上手ItChat-UOS:Python微信自动化入门完整教程

10分钟快速上手ItChat-UOS:Python微信自动化入门完整教程 【免费下载链接】ItChat-UOS 复活Itchat,你只需要 pip install itchat-uos 项目地址: https://gitcode.com/gh_mirrors/it/ItChat-UOS 想要轻松实现Python微信自动化吗?ItChat-UOS是你的终…

2026/7/4 8:40:56

周新闻

月新闻