| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: complete Python compilable custom-op online and offline example Co-authored-by: shangdf<shangdongfang1@huawei.com> # message auto-generated for no-merge-commit merge: !4477 merge feature/python-compilable-example-develop into develop feat: complete Python compilable custom-op online and offline example Created-by: shangdf Commit-by: shangdf Merged-by: cann-robot Description: ## 描述 为 GE PR 4388 提供独立的 Python compilable custom-op 示例,完整覆盖 online + offline 两条链路。本 PR 只包含 examples/custom_op 下的示例、索引和离线验证工具,不重复提交 4388 的核心实现。 示例使用同一个 Python compile / declare_launch_args 实现覆盖两条链路: - 在线:run_online.sh 通过 GE Session 构图,验证 CustomGraphOptimizer 调用 Python compile、Bisheng 生成 Ascend C kernel,并在线执行 x + y。 - 离线:run_offline.sh 由 C++ 程序生成 AIR,ATC 在 Python 插件可加载时调用同一个 compile 回调生成 OM;随后清除 Python 插件路径,仅保留 C++ OPP 交付件加载 OM 并执行。 平台信息使用 4388 的最终 API get_compile_platform_info();ASCEND_CUSTOM_OPP_PATH 同时配置 OPP 根目录和 Python 插件目录。 ## 依赖关系 本 PR 依赖 GE PR 4388 提供的 Python compilable 接口(register_op_impl 的 compile 能力、get_compile_platform_info()、native bridge)。请使用 4388 合入后的 GE/CANN 运行包进行完整验证。 ## 如何测试 - python3 -m pytest -q examples/custom_op/python_compilable_add_custom/test/test_python_compilable_add_custom.py - ruff check examples/custom_op/python_compilable_add_custom/src/ge/python_compilable_add_custom.py examples/custom_op/python_compilable_add_custom/src/run.py examples/custom_op/python_compilable_add_custom/test/test_python_compilable_add_custom.py - 配置 CANN、Bisheng 和 NPU 后执行 bash examples/custom_op/python_compilable_add_custom/run_online.sh - 配置 ATC 后执行 bash examples/custom_op/python_compilable_add_custom/run_offline.sh;该脚本在最后一步移除 Python 插件,验证 OM 执行不依赖 Python callback。 See merge request: cann/ge!4477 | 1 个月前 | |
feat: complete Python compilable custom-op online and offline example Co-authored-by: shangdf<shangdongfang1@huawei.com> # message auto-generated for no-merge-commit merge: !4477 merge feature/python-compilable-example-develop into develop feat: complete Python compilable custom-op online and offline example Created-by: shangdf Commit-by: shangdf Merged-by: cann-robot Description: ## 描述 为 GE PR 4388 提供独立的 Python compilable custom-op 示例,完整覆盖 online + offline 两条链路。本 PR 只包含 examples/custom_op 下的示例、索引和离线验证工具,不重复提交 4388 的核心实现。 示例使用同一个 Python compile / declare_launch_args 实现覆盖两条链路: - 在线:run_online.sh 通过 GE Session 构图,验证 CustomGraphOptimizer 调用 Python compile、Bisheng 生成 Ascend C kernel,并在线执行 x + y。 - 离线:run_offline.sh 由 C++ 程序生成 AIR,ATC 在 Python 插件可加载时调用同一个 compile 回调生成 OM;随后清除 Python 插件路径,仅保留 C++ OPP 交付件加载 OM 并执行。 平台信息使用 4388 的最终 API get_compile_platform_info();ASCEND_CUSTOM_OPP_PATH 同时配置 OPP 根目录和 Python 插件目录。 ## 依赖关系 本 PR 依赖 GE PR 4388 提供的 Python compilable 接口(register_op_impl 的 compile 能力、get_compile_platform_info()、native bridge)。请使用 4388 合入后的 GE/CANN 运行包进行完整验证。 ## 如何测试 - python3 -m pytest -q examples/custom_op/python_compilable_add_custom/test/test_python_compilable_add_custom.py - ruff check examples/custom_op/python_compilable_add_custom/src/ge/python_compilable_add_custom.py examples/custom_op/python_compilable_add_custom/src/run.py examples/custom_op/python_compilable_add_custom/test/test_python_compilable_add_custom.py - 配置 CANN、Bisheng 和 NPU 后执行 bash examples/custom_op/python_compilable_add_custom/run_online.sh - 配置 ATC 后执行 bash examples/custom_op/python_compilable_add_custom/run_offline.sh;该脚本在最后一步移除 Python 插件,验证 OM 执行不依赖 Python callback。 See merge request: cann/ge!4477 | 1 个月前 | |
feat: complete Python compilable custom-op online and offline example Co-authored-by: shangdf<shangdongfang1@huawei.com> # message auto-generated for no-merge-commit merge: !4477 merge feature/python-compilable-example-develop into develop feat: complete Python compilable custom-op online and offline example Created-by: shangdf Commit-by: shangdf Merged-by: cann-robot Description: ## 描述 为 GE PR 4388 提供独立的 Python compilable custom-op 示例,完整覆盖 online + offline 两条链路。本 PR 只包含 examples/custom_op 下的示例、索引和离线验证工具,不重复提交 4388 的核心实现。 示例使用同一个 Python compile / declare_launch_args 实现覆盖两条链路: - 在线:run_online.sh 通过 GE Session 构图,验证 CustomGraphOptimizer 调用 Python compile、Bisheng 生成 Ascend C kernel,并在线执行 x + y。 - 离线:run_offline.sh 由 C++ 程序生成 AIR,ATC 在 Python 插件可加载时调用同一个 compile 回调生成 OM;随后清除 Python 插件路径,仅保留 C++ OPP 交付件加载 OM 并执行。 平台信息使用 4388 的最终 API get_compile_platform_info();ASCEND_CUSTOM_OPP_PATH 同时配置 OPP 根目录和 Python 插件目录。 ## 依赖关系 本 PR 依赖 GE PR 4388 提供的 Python compilable 接口(register_op_impl 的 compile 能力、get_compile_platform_info()、native bridge)。请使用 4388 合入后的 GE/CANN 运行包进行完整验证。 ## 如何测试 - python3 -m pytest -q examples/custom_op/python_compilable_add_custom/test/test_python_compilable_add_custom.py - ruff check examples/custom_op/python_compilable_add_custom/src/ge/python_compilable_add_custom.py examples/custom_op/python_compilable_add_custom/src/run.py examples/custom_op/python_compilable_add_custom/test/test_python_compilable_add_custom.py - 配置 CANN、Bisheng 和 NPU 后执行 bash examples/custom_op/python_compilable_add_custom/run_online.sh - 配置 ATC 后执行 bash examples/custom_op/python_compilable_add_custom/run_offline.sh;该脚本在最后一步移除 Python 插件,验证 OM 执行不依赖 Python callback。 See merge request: cann/ge!4477 | 1 个月前 | |
feat: complete Python compilable custom-op online and offline example Co-authored-by: shangdf<shangdongfang1@huawei.com> # message auto-generated for no-merge-commit merge: !4477 merge feature/python-compilable-example-develop into develop feat: complete Python compilable custom-op online and offline example Created-by: shangdf Commit-by: shangdf Merged-by: cann-robot Description: ## 描述 为 GE PR 4388 提供独立的 Python compilable custom-op 示例,完整覆盖 online + offline 两条链路。本 PR 只包含 examples/custom_op 下的示例、索引和离线验证工具,不重复提交 4388 的核心实现。 示例使用同一个 Python compile / declare_launch_args 实现覆盖两条链路: - 在线:run_online.sh 通过 GE Session 构图,验证 CustomGraphOptimizer 调用 Python compile、Bisheng 生成 Ascend C kernel,并在线执行 x + y。 - 离线:run_offline.sh 由 C++ 程序生成 AIR,ATC 在 Python 插件可加载时调用同一个 compile 回调生成 OM;随后清除 Python 插件路径,仅保留 C++ OPP 交付件加载 OM 并执行。 平台信息使用 4388 的最终 API get_compile_platform_info();ASCEND_CUSTOM_OPP_PATH 同时配置 OPP 根目录和 Python 插件目录。 ## 依赖关系 本 PR 依赖 GE PR 4388 提供的 Python compilable 接口(register_op_impl 的 compile 能力、get_compile_platform_info()、native bridge)。请使用 4388 合入后的 GE/CANN 运行包进行完整验证。 ## 如何测试 - python3 -m pytest -q examples/custom_op/python_compilable_add_custom/test/test_python_compilable_add_custom.py - ruff check examples/custom_op/python_compilable_add_custom/src/ge/python_compilable_add_custom.py examples/custom_op/python_compilable_add_custom/src/run.py examples/custom_op/python_compilable_add_custom/test/test_python_compilable_add_custom.py - 配置 CANN、Bisheng 和 NPU 后执行 bash examples/custom_op/python_compilable_add_custom/run_online.sh - 配置 ATC 后执行 bash examples/custom_op/python_compilable_add_custom/run_offline.sh;该脚本在最后一步移除 Python 插件,验证 OM 执行不依赖 Python callback。 See merge request: cann/ge!4477 | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |