文件最后提交记录最后更新时间
docs: 优化融合 pattern pass 文档&&Python pass API/行为调整 Co-authored-by: kobemini<gengchao4@huawei.com> # message auto-generated for no-merge-commit merge: !3248 merge doc/pass-reade-me into develop docs: 优化融合 pattern pass 文档&&Python pass API/行为调整 Created-by: kobemini Commit-by: kobemini Merged-by: cann-robot Description: # Pull Request ## 描述 本 PR 优化融合 Pattern Pass 的机制说明、开发指南和 Python 写法体验,目标是让用户能按文档理解机制并完成自定义融合 pass 开发。 主要变更: - 新增融合 Pattern Pass 特性文档,按“匹配 → 条件过滤 → 替换 → 边界规则 → capture tensor → DecomposePass → 执行阶段”说明统一机制。 - 新增 Python / C++ 融合 Pass 开发指南,Python 侧突出运行时接入、@pattern 表达式写法和 replacement 表达式返回。 - 删除旧的混合指南,将内容拆分到特性文档和 C++/Python 指南中,并更新 examples、架构文档和 ASCEND_GE_PY_PASS_PATH 文档入口。 - 收口 Python capture tensor 写法:去掉公开的独立 capture_tensor() helper,统一使用 Pattern.capture_tensor(...)。 - 增强 Pattern.capture_tensor:支持直接传入 TensorHolderNodeNodeIo,示例写法从 pat.capture_tensor(capture_tensor(matmul)) 简化为 pat.capture_tensor(matmul)。 - 增强 @pattern 自动 capture 规则:从“只捕获已访问输入”提升为“先捕获已访问输入,再捕获 return 的 pattern 输出”,并在文档中明确 capture 顺序。 ## 变更类型 - [ ] Bug 修复 - [x] 新功能 - [ ] 代码风格更新(格式化,局部变量) - [ ] 重构(既不修复错误也不增加功能的代码变动) - [ ] 构建过程或辅助工具的变动 - [x] 文档内容更新 ## 关联的 Issue 无 ## 如何测试 已执行: - git diff --check - python3 -m py_compile 检查修改过的 Python pass 框架文件、示例和 Python 测试文件 - 检查本 PR 修改文档中的相对链接均存在 - 检索确认旧的 capture_tensor(capture_tensor(...)) 嵌套写法、独立 capture_tensor 导出和旧文档入口已清理 - python3 -m pytest tests/ge/ut/ge/graph/pyge_tests/python_pattern_pass_test.py::... - ut_fusion_pass_executor_utest ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md) ## 其他信息 当前 PR 包含文档和 Python pass API/行为调整。@pattern 自动 capture 顺序为:先按输入序号捕获已访问的 inputs,再按 return 结构顺序捕获 pattern 输出。 See merge request: cann/ge!32483 天前
docs: 优化融合 pattern pass 文档&&Python pass API/行为调整 Co-authored-by: kobemini<gengchao4@huawei.com> # message auto-generated for no-merge-commit merge: !3248 merge doc/pass-reade-me into develop docs: 优化融合 pattern pass 文档&&Python pass API/行为调整 Created-by: kobemini Commit-by: kobemini Merged-by: cann-robot Description: # Pull Request ## 描述 本 PR 优化融合 Pattern Pass 的机制说明、开发指南和 Python 写法体验,目标是让用户能按文档理解机制并完成自定义融合 pass 开发。 主要变更: - 新增融合 Pattern Pass 特性文档,按“匹配 → 条件过滤 → 替换 → 边界规则 → capture tensor → DecomposePass → 执行阶段”说明统一机制。 - 新增 Python / C++ 融合 Pass 开发指南,Python 侧突出运行时接入、@pattern 表达式写法和 replacement 表达式返回。 - 删除旧的混合指南,将内容拆分到特性文档和 C++/Python 指南中,并更新 examples、架构文档和 ASCEND_GE_PY_PASS_PATH 文档入口。 - 收口 Python capture tensor 写法:去掉公开的独立 capture_tensor() helper,统一使用 Pattern.capture_tensor(...)。 - 增强 Pattern.capture_tensor:支持直接传入 TensorHolderNodeNodeIo,示例写法从 pat.capture_tensor(capture_tensor(matmul)) 简化为 pat.capture_tensor(matmul)。 - 增强 @pattern 自动 capture 规则:从“只捕获已访问输入”提升为“先捕获已访问输入,再捕获 return 的 pattern 输出”,并在文档中明确 capture 顺序。 ## 变更类型 - [ ] Bug 修复 - [x] 新功能 - [ ] 代码风格更新(格式化,局部变量) - [ ] 重构(既不修复错误也不增加功能的代码变动) - [ ] 构建过程或辅助工具的变动 - [x] 文档内容更新 ## 关联的 Issue 无 ## 如何测试 已执行: - git diff --check - python3 -m py_compile 检查修改过的 Python pass 框架文件、示例和 Python 测试文件 - 检查本 PR 修改文档中的相对链接均存在 - 检索确认旧的 capture_tensor(capture_tensor(...)) 嵌套写法、独立 capture_tensor 导出和旧文档入口已清理 - python3 -m pytest tests/ge/ut/ge/graph/pyge_tests/python_pattern_pass_test.py::... - ut_fusion_pass_executor_utest ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md) ## 其他信息 当前 PR 包含文档和 Python pass API/行为调整。@pattern 自动 capture 顺序为:先按输入序号捕获已访问的 inputs,再按 return 结构顺序捕获 pattern 输出。 See merge request: cann/ge!32483 天前
feat: 支持 pyatc 命令行入口 Co-authored-by: du-hua1024<duhua2@huawei.com> # message auto-generated for no-merge-commit merge: !2561 merge master into develop feat: 支持 pyatc 命令行入口 Created-by: du-hua1024 Commit-by: du-hua1024 Merged-by: cann-robot Description: 20260428 # Pull Request ## 描述 本 PR 为 ge-py 增加 pyatc 命令行入口,使用户可以通过 pyatcpython3 -m ge.pyatc 使用与 atc 等价的离线编译能力,并复用原有 ge::main_impl() 主流程。 主要变更: - 新增 api/atc/pyatc shell wrapper 和 ge.pyatc Python 模块,负责补齐 CANN 运行环境、转发命令行参数并保留原始 argv0。 - 新增 libpyatc_wrapper.so,封装 ge::main_impl() 调用;调整 ATC usage 和失败提示中的程序名显示。 - 拆分 ge-py C wrapper 动态库为 graph_wrapperge_runtime_wrapperoffline_compile_wrapperpyatc_wrapper,降低不同 Python 能力之间的链接依赖耦合。 - 将 Tensor host/device 拷贝接口迁移到 pytensor_runtime_wrapper,并更新 ge-py 相关 loader。 - 更新 ge-compiler 打包配置,将 pyatc 安装到 bin;补充 ge-py README、设计文档和 pyatc pytest 用例。 ## 变更类型 请选择本次引入的变更类型: - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 - [x] 📝 文档内容更新 ## 关联的Issue 暂无 ## 如何测试 - 新增 tests/ge/ut/ge/graph/pyge_tests/pyatc_test.py,覆盖 ge.pyatc 参数转发、GE_PYATC_CMDLINE_ARGV0python3 -m ge.pyatc usage 名称设置和 wrapper 加载检查。 - 建议运行:pytest tests/ge/ut/ge/graph/pyge_tests/pyatc_test.py - 建议在打包环境验证:pyatc --helppython3 -m ge.pyatc --helpatc --help 行为一致。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于 commit message 的格式、无效 commit 的合并等 ## 其他信息 pyatc 不在 Python 层重新解析 ATC 参数;命令行参数、help 文案、stdout/stderr 和退出码继续由既有 ATC 主流程处理。 See merge request: cann/ge!256124 天前