已合并
feat: 增加 ONNX Plugin Python API 基础能力 #4353
gentle-knight创建于 11 天前
feat: 增加 ONNX Plugin Python API 基础能力 #4353
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 gentle-knight 的贡献)11 天前 创建了 pull request,commit c5b3472a
11 天前 添加了label:stat/needs-squash
11 天前 添加了label:cann-cla/yes
CANN-robot
11 天前 评论:
11 天前 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/ge | ✅ 张德鹏, kobemini, hugo111 (3/2) | ✅ 张德鹏 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
gentle-knight, thanks for your pull request. All authors of the commits have signed the CLA. 👍


11 天前 将yangyongqiang0606,kobemini,tangqunzhang,xchu42,hugo111,lining23666,fu-jun2,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为评审人
11 天前 将yangyongqiang0606,kobemini,tangqunzhang,xchu42,hugo111,lining23666,fu-jun2,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为评审人
此处折叠了220条消息 查看更多
10 天前 添加了label:lgtm
9 天前 添加了label:approved
9 天前 合入了pull request
Pull Request
描述
新增 ONNX Plugin Python API 功能包 A,并修正 ATC 未知错误兜底文案。
业务背景:ONNX Plugin Python 化需要先提供稳定的 Python API、descriptor registry 和共享插件发现能力。ONNX Plugin 与 Python custom op 复用
ASCEND_CUSTOM_OPP_PATH,因此同一物理模块必须避免被不同入口重复执行。主要变更:
ge.onnx_pluginAPI、只读OnnxNode和 callback-boundge.graph.Operator。plugin_loader使用 canonical physical path 保证同一文件或 package 经相对路径、绝对路径、符号链接或 custom op/ONNX Plugin 不同入口发现时只执行一次,并在 import 失败时清理半初始化模块。新增测试覆盖同目录不同文件分别实现 custom op 与 ONNX Plugin,以及环境变量显式列出两个不同文件的场景。api/atc/main_impl.cc中 E19999 兜底文案从Inner Error修正为Internal Error,并在 ErrorManager 返回空字符串时输出该兜底文案。本 PR 仅包含功能包 A,不包含 Native Bridge、ONNX Parser 注册、Parser C++ 代码、Parser UT/ST 或工作包 B 内容。
变更类型
关联的Issue
暂无。
如何测试
ge_python_main_wheel并刷新install_ge_py_for_tests,构建通过。8 passed,新增不同文件 custom op/ONNX Plugin 场景2 passed。49 passed。ut_libge_multiparts_utest和graph_engine_test,均通过。1 passed。1 passed。api/atc/main_impl.cc编译及atc_static生成通过;本地atc_atc.bin最终链接受现有libascendalog.so链接依赖缺失阻塞。git diff --check upstream/develop...HEAD,检查通过。核对清单
其他信息
cann/ge:develop。ASCEND_CUSTOM_OPP_PATH时 custom op 与 ONNX Plugin 可以安全共存。