| fix(function): Update frontend example Co-authored-by: z00471782<zhangjiarui6@huawei.com> # message auto-generated for no-merge-commit merge: !1871 merge master into master fix(function): Update frontend example Created-by: blue_jan Commit-by: z00471782 Merged-by: cann-robot Description: description: Update frontend docs&test,ensure md file is right Related Issue: #830 See merge request: cann/pypto!1871 | 8 months ago |
| fix(front): Adapting to the new paradigm of the frontend for examples Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !1572 merge change_example into master fix(front): Adapting to the new paradigm of the frontend for examples Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: # PyPTO Frontend JIT 测试用例范式修改 ## 修改意图 将 python/examples 目录下使用 pypto.frontend.jit 的测试用例从旧编程范式迁移到新范式,以适配 PyPTO frontend 的新接口规范。 ## 主要变更 ### 1. 去除 wrapper 函数 - **旧写法**:在测试函数内部定义 kernel,或通过 factory 函数动态创建 kernel (旧写法依然支持) - **新写法**:kernel 函数直接定义在模块顶层 ### 2. Shape 参数声明 无需设置shape的具体值,使用枚举值标记动态轴pypto.STATIC - **旧写法**:pypto.Tensor((32, 32), dtype) 或 pypto.Tensor(shape, dtype) - **新写法**:pypto.Tensor([pypto.STATIC, pypto.STATIC], dtype) ### 3. 输出方式 - **旧写法**:使用 return 返回计算结果 - **新写法**:添加输出参数,使用 out.move() 方式输出 ### 4. 调用方式 - **旧写法**:result = kernel(a, b) - **新写法**:预先创建输出 tensor,kernel(a, b, out) See merge request: cann/pypto!1572 | 8 months ago |
| fix(front): Adapting to the new paradigm of the frontend, remove return in kernel Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !1615 merge remove_return into master fix(front): Adapting to the new paradigm of the frontend, remove return in kernel Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: # PyPTO Frontend JIT 测试用例范式修改 - **旧写法**:使用 return 返回计算结果 - **新写法**:添加输出参数,使用 out.move() 方式输出 See merge request: cann/pypto!1615 | 8 months ago |
| fix(front): Adapting to the new paradigm of the frontend, remove return in kernel Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !1615 merge remove_return into master fix(front): Adapting to the new paradigm of the frontend, remove return in kernel Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: # PyPTO Frontend JIT 测试用例范式修改 - **旧写法**:使用 return 返回计算结果 - **新写法**:添加输出参数,使用 out.move() 方式输出 See merge request: cann/pypto!1615 | 8 months ago |
| feat(docs): Fix docs error Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !1483 merge interpreter into master feat(docs): Fix docs error Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: feat(docs): Fix docs error Related Issue: https://gitcode.com/cann/pypto/issues/544 Related Issue: https://gitcode.com/cann/pypto/issues/269 Related Issue: https://gitcode.com/cann/pypto/issues/205 Related Issue: https://gitcode.com/cann/pypto/issues/610 See merge request: cann/pypto!1483 | 8 months ago |
| feat(tools): Refactor validate_examples with reliable subprocess cleanup, modular execution flow, and AST parsing optimization Co-authored-by: chenshengxin<chenshengxin@huawei.com> # message auto-generated for no-merge-commit merge: !646 merge examples/CI-batch-run into master feat(tools): Refactor validate_examples with reliable subprocess cleanup, modular execution flow, and AST parsing optimization Created-by: shengxinchen Commit-by: chenshengxin Merged-by: cann-robot Description: ## 描述 本次 PR 对 validate_examples.py 进行全面重构,显著提升代码质量、可维护性和健壮性。核心改进包括: - 可靠的子进程清理机制:新增 ProcessManager 类封装进程生命周期管理,实现 SIGINT/SIGTERM 信号处理,支持 Ctrl+C 关闭;采用协作式关闭机制和原子化进程注册/注销操作,确保所有子进程在脚本中断时被完整清理,彻底解决残留进程问题; - 执行流程模块化:将 run_script() 拆分为职责单一的辅助函数,ExecutionStrategy 提取公共串行重试逻辑,提升可维护性与可读性; - AST 解析性能优化:合并四个独立的 AST 解析函数为单一 analyze_script() 函数,避免重复解析同一文件; - 其他改进:消除魔法数字(引入模块级常量),参数命名规范化,新增 CANCELLED 状态区分被中断的脚本; ## 测试 - 在单卡和多卡环境下运行脚本,验证进程调度和执行功能正常 - 模拟 Ctrl+C 中断场景,确认所有子进程被正确清理 - 测试参数规范化后的功能兼容性,确保单卡和多卡环境下 SIM/NPU 模式运行正常 ## 文档更新 脚本内部已更新代码注释与参数说明,暂无需更新外部用户文档。 ## 类型标签 - [x] Bug 修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:全面重构 **说明**:含可靠子进程清理、竞态条件修复、AST 解析性能优化及执行流程模块化 See merge request: cann/pypto!646 | 9 months ago |
| feat(tools): Refactor validate_examples with reliable subprocess cleanup, modular execution flow, and AST parsing optimization Co-authored-by: chenshengxin<chenshengxin@huawei.com> # message auto-generated for no-merge-commit merge: !646 merge examples/CI-batch-run into master feat(tools): Refactor validate_examples with reliable subprocess cleanup, modular execution flow, and AST parsing optimization Created-by: shengxinchen Commit-by: chenshengxin Merged-by: cann-robot Description: ## 描述 本次 PR 对 validate_examples.py 进行全面重构,显著提升代码质量、可维护性和健壮性。核心改进包括: - 可靠的子进程清理机制:新增 ProcessManager 类封装进程生命周期管理,实现 SIGINT/SIGTERM 信号处理,支持 Ctrl+C 关闭;采用协作式关闭机制和原子化进程注册/注销操作,确保所有子进程在脚本中断时被完整清理,彻底解决残留进程问题; - 执行流程模块化:将 run_script() 拆分为职责单一的辅助函数,ExecutionStrategy 提取公共串行重试逻辑,提升可维护性与可读性; - AST 解析性能优化:合并四个独立的 AST 解析函数为单一 analyze_script() 函数,避免重复解析同一文件; - 其他改进:消除魔法数字(引入模块级常量),参数命名规范化,新增 CANCELLED 状态区分被中断的脚本; ## 测试 - 在单卡和多卡环境下运行脚本,验证进程调度和执行功能正常 - 模拟 Ctrl+C 中断场景,确认所有子进程被正确清理 - 测试参数规范化后的功能兼容性,确保单卡和多卡环境下 SIM/NPU 模式运行正常 ## 文档更新 脚本内部已更新代码注释与参数说明,暂无需更新外部用户文档。 ## 类型标签 - [x] Bug 修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:全面重构 **说明**:含可靠子进程清理、竞态条件修复、AST 解析性能优化及执行流程模块化 See merge request: cann/pypto!646 | 9 months ago |