| feat(machine): Optimize perf Co-authored-by: dty_30041779<daitianyi1@h-partners.com> # message auto-generated for no-merge-commit merge: !5431 merge oom into master feat(machine): Optimize perf Created-by: LordOfMysteries Commit-by: dty_30041779 Merged-by: cann-robot Description: https://gitcode.com/cann/pypto/issues/2597 # AICPU Ctrl / Sche 代码优化摘要 面向动态图 EXEC_DYN 热路径的微优化(不改变语义;DEV_INFO 日志级别保持原样)。 ## 主要改动 1. **Fill I/O / ItemPool** - 新增 ItemPool::AllocateBump / MakeRuntimeOutcastTensorBump:在 RunInit 后首次填充 root I/O 时跳过 freelist 分支与逐元素 ItemAt 检查。 2. **Stitch 挂边** - DevAscendFunctionDuppedStitchList::PushBack 由 std::function 改为模板 AllocFn,避免类型擦除与间接调用。 - Partial-update 表基址由 &table[0] 改为 Data(),空表安全且去掉无意义的下标检查。 3. **Workspace / Dupped 尺寸** - DevFunctionDuppedSlabMemObjSize 对同一 DevAscendProgram 缓存最大 Dupped 尺寸,避免每轮 launch 重复全表扫描。 4. **Ctrl / Sche 其它热路径** - Slot / Stitch / Task / AICore 管理路径的小幅去冗余、指针/数据预取与分支收敛(见对应 device_*_context 与 aicore_manager 改动)。 See merge request: cann/pypto!5431 | 3 months ago |
| fix(ci): update CI smoke scripts Co-authored-by: tanghaoran7<tanghaoran7@huawei.com> # message auto-generated for no-merge-commit merge: !5543 merge master into master fix(ci): update CI smoke scripts Created-by: tanghaoran7 Commit-by: tanghaoran7 Merged-by: cann-robot Description: PR 应该避免没有描述信息,描述信息的最重要的作用是描述修改意图,应该清晰明了。例如:标题中包含了 fix 标签,如果没有描述信息,就需要Review人员猜测PR具体修复了哪些内容,或者怀疑修改的必要性。如果PR和特定的Issue相关,可以单独包含一行 Related Issue: 放到描述信息最后。 下面是一个典型的PR描述信息: The origin issue template brings too many noise, it's not suitable for git message. eg: comments are not removed, labels are redundant as the PR tile already contains the tag. The guide gives a clear suggestion on how to write the PR body. Related Issue: #1234,#5678 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!5543 | 3 months ago |
| refactor(agent): Remove operator-development skills and agents Co-authored-by: wangzheng97<wangzheng97@hisilicon.com> # message auto-generated for no-merge-commit merge: !4605 merge chore-remove-op-dev-skills into master refactor(agent): Remove operator-development skills and agents Created-by: wangzheng97 Commit-by: wangzheng97 Merged-by: cann-robot Description: refactor(agent): Remove operator-development skills and agents The agents and skills in this repository should focus on developing and maintaining the PyPTO framework itself: debugging and error location, compile-time Pass analysis, environment setup, and PR/Issue workflows. This PR removes the operator-development skills and agents together with their state-machine plugins and lint hook, so the tooling scope matches the repository. Changes: - Delete 17 operator-development skills (api-explore, golden-generate, op-design, op-develop, op-perf-tune, precision-compare, fused-op-integration, etc.) - Delete 9 operator-development agents (op-orchestrator, op-coder, op-verifier, etc.) - Delete state-machine plugins (.opencode/plugins/: op-lint, state-transition) and the lint engine (.agents/hooks/pypto-op-lint/) - Delete migrate-huggingface-to-npu (unrelated to framework maintenance) - Update .agents/README.md and AGENTS.md, and delete .agents/settings.json, to drop the now-dangling references; trim AGENTS.md to project scope, general principles and entry-point lookup - Consolidate AGENTS.md's general principles into 5 core rules: the 4 principles from Andrej Karpathy's CLAUDE.md (official Chinese translation, forrestchang/andrej-karpathy-skills) — think before coding, simplicity first, surgical changes, goal-driven execution — plus one evidence-before-conclusion rule for diagnostic work - Inline list_idle_chip_ids.sh into pypto-environment-setup and fix dangling references in pypto-skill-validation-prompt and docs/zh/trouble_shooting - Keep pypto-code-merge-agent and the framework debugging / Pass / environment / PR-Issue skills Related Issues: #2533 See merge request: cann/pypto!4605 | 4 months ago |
| fix(coverage): Isolate gcda writes per Cntr via GCOV_PREFIX to fix concurrent corruption Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !5381 merge ci_check into master fix(coverage): Isolate gcda writes per Cntr via GCOV_PREFIX to fix concurrent corruption Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Isolate gcda writes per Cntr via GCOV_PREFIX to fix concurrent corruption See merge request: cann/pypto!5381 | 3 months ago |
| feat(pypto-pro): Support mxfp8/mxfp4 Co-authored-by: fa<yangzf993@163.com> # message auto-generated for no-merge-commit merge: !5439 merge master into master feat(pypto-pro): Support mxfp8/mxfp4 Created-by: fafafafafa Commit-by: fa Merged-by: cann-robot Description: Support mxfp8/mxfp4 See merge request: cann/pypto!5439 | 3 months ago |
| feat(pass): Add slice contract feature for pass with some cases Co-authored-by: 2501_92924845<niulinkai@huawei.com> # message auto-generated for no-merge-commit merge: !5568 merge slice5close into master feat(pass): Add slice contract feature for pass with some cases Created-by: 2501_92924845 Commit-by: 2501_92924845 Merged-by: cann-robot Description: PR描述 1.背景 历史实现中,OP_VIEW 和 OP_ASSEMBLE 同时承担两类语义: 视图转换语义:描述 tensor 的 shape、offset、dyn offset、dyn valid shape 等逻辑视图关系。 搬运语义:在 tile graph 后段被 GenerateMoveOp 转换为 copy in / copy out 等真实搬运操作。 本需求将这两类语义拆开: OP_VIEW / OP_ASSEMBLE:保留为视图语义,表达逻辑视图关系。 OP_SLICE / OP_CONTRACT:表达搬运语义,分别对应原 copy in 方向和 copy out 方向的 tile 级搬运描述。 在 ExpandFunction 阶段,原先需要展开的 VIEW/ASSEMBLE 会被展开为 tile 级的 SLICE/CONTRACT。后续 tile graph pass 不能再默认 VIEW/ASSEMBLE 一定会生成真实搬运,而需要按新语义区分: 优化、合并、图结构分析类 pass 需要识别 view-like 和 assemble-like 两组 opcode。 内存推导和 move 生成类 pass 应以 SLICE/CONTRACT 作为真实搬运入口。 本设计覆盖 PVC2_OOO 策略中从 MergeViewAssemble 到 GenerateMoveOp 的相关 pass。 2.. 目标与非目标 2.1 目标 支持 ExpandFunction 后图中出现 OP_SLICE/OP_CONTRACT,并保证后续 pass 能正确识别、合并、拆分、分区和生成 move op。 将原来依赖 OP_VIEW/OP_ASSEMBLE 的搬运逻辑迁移到 OP_SLICE/OP_CONTRACT。 保留 OP_VIEW/OP_ASSEMBLE 的视图表达能力,避免把纯视图语义误转成 copy。 保持现有 offset、dyn offset、dyn valid shape、scope、atomic RMW 属性等关键信息在 pass 改写中正确传递。 兼容原有 pass 中 view/assemble 链路优化能力,使其覆盖 slice/contract 场景。 2.2 非目标 不改变用户侧 API 的 view/assemble 表达方式。 不改变 copy op 的最终执行语义。 不在 GenerateMoveOp 中继续把普通 OP_VIEW/OP_ASSEMBLE 当作搬运入口。 不引入新的 attribute 类型;OP_SLICE 复用 ViewOpAttribute,OP_CONTRACT 复用 AssembleOpAttribute。 2.3 相关验证 MergeViewAssemble UT:覆盖 view-view、slice-view、view-slice、assemble-contract 等链路合并,验证合并后 opcode 和 attribute 正确。 SplitReshape UT:覆盖 contract -> reshape -> slice、reduce_acc 前驱跳过、动态 shape 变轴跳过。 SplitLargeFanoutTensor UT:覆盖大 fanout 中 assemble-like producer 和 view-like consumer 的拆分、offset 更新和冗余删除。 AssignMemoryType UT:覆盖 slice/contract 的 original、requirement、convert 改写、LiteNPU reshape 特殊路径。 RemoveRedundantOp UT:覆盖 view/assemble-like perfect match、partial match、multi-contract-single-slice、single-contract-multi-slice。 ProcessAtomic UT:覆盖 AtomicRMW 属性下沉到 contract、offset 累加、VecDup 分支删除。 GraphPartition 与 IntraSubgraphAdapter UT:覆盖跨子图边界插入 slice/contract,以及 legacy view/assemble memory 不一致时的原地改写。 GenerateMoveOp UT:验证 OP_SLICE/OP_CONTRACT 正确生成 copy in/out,且普通 OP_VIEW/OP_ASSEMBLE 不再作为 move 入口。 See merge request: cann/pypto!5568 | 3 months ago |
| fix(machine): Add aicore-resolve macro Co-authored-by: huanglu<huanglu22@hisilicon.com> # message auto-generated for no-merge-commit merge: !5549 merge master into master fix(machine): Add aicore-resolve macro Created-by: lululu40888 Commit-by: huanglu Merged-by: cann-robot Description: fix(machine): Add aicore-resolve macro See merge request: cann/pypto!5549 | 3 months ago |
| feat(pass): Add slice contract feature for pass with some cases Co-authored-by: 2501_92924845<niulinkai@huawei.com> # message auto-generated for no-merge-commit merge: !5568 merge slice5close into master feat(pass): Add slice contract feature for pass with some cases Created-by: 2501_92924845 Commit-by: 2501_92924845 Merged-by: cann-robot Description: PR描述 1.背景 历史实现中,OP_VIEW 和 OP_ASSEMBLE 同时承担两类语义: 视图转换语义:描述 tensor 的 shape、offset、dyn offset、dyn valid shape 等逻辑视图关系。 搬运语义:在 tile graph 后段被 GenerateMoveOp 转换为 copy in / copy out 等真实搬运操作。 本需求将这两类语义拆开: OP_VIEW / OP_ASSEMBLE:保留为视图语义,表达逻辑视图关系。 OP_SLICE / OP_CONTRACT:表达搬运语义,分别对应原 copy in 方向和 copy out 方向的 tile 级搬运描述。 在 ExpandFunction 阶段,原先需要展开的 VIEW/ASSEMBLE 会被展开为 tile 级的 SLICE/CONTRACT。后续 tile graph pass 不能再默认 VIEW/ASSEMBLE 一定会生成真实搬运,而需要按新语义区分: 优化、合并、图结构分析类 pass 需要识别 view-like 和 assemble-like 两组 opcode。 内存推导和 move 生成类 pass 应以 SLICE/CONTRACT 作为真实搬运入口。 本设计覆盖 PVC2_OOO 策略中从 MergeViewAssemble 到 GenerateMoveOp 的相关 pass。 2.. 目标与非目标 2.1 目标 支持 ExpandFunction 后图中出现 OP_SLICE/OP_CONTRACT,并保证后续 pass 能正确识别、合并、拆分、分区和生成 move op。 将原来依赖 OP_VIEW/OP_ASSEMBLE 的搬运逻辑迁移到 OP_SLICE/OP_CONTRACT。 保留 OP_VIEW/OP_ASSEMBLE 的视图表达能力,避免把纯视图语义误转成 copy。 保持现有 offset、dyn offset、dyn valid shape、scope、atomic RMW 属性等关键信息在 pass 改写中正确传递。 兼容原有 pass 中 view/assemble 链路优化能力,使其覆盖 slice/contract 场景。 2.2 非目标 不改变用户侧 API 的 view/assemble 表达方式。 不改变 copy op 的最终执行语义。 不在 GenerateMoveOp 中继续把普通 OP_VIEW/OP_ASSEMBLE 当作搬运入口。 不引入新的 attribute 类型;OP_SLICE 复用 ViewOpAttribute,OP_CONTRACT 复用 AssembleOpAttribute。 2.3 相关验证 MergeViewAssemble UT:覆盖 view-view、slice-view、view-slice、assemble-contract 等链路合并,验证合并后 opcode 和 attribute 正确。 SplitReshape UT:覆盖 contract -> reshape -> slice、reduce_acc 前驱跳过、动态 shape 变轴跳过。 SplitLargeFanoutTensor UT:覆盖大 fanout 中 assemble-like producer 和 view-like consumer 的拆分、offset 更新和冗余删除。 AssignMemoryType UT:覆盖 slice/contract 的 original、requirement、convert 改写、LiteNPU reshape 特殊路径。 RemoveRedundantOp UT:覆盖 view/assemble-like perfect match、partial match、multi-contract-single-slice、single-contract-multi-slice。 ProcessAtomic UT:覆盖 AtomicRMW 属性下沉到 contract、offset 累加、VecDup 分支删除。 GraphPartition 与 IntraSubgraphAdapter UT:覆盖跨子图边界插入 slice/contract,以及 legacy view/assemble memory 不一致时的原地改写。 GenerateMoveOp UT:验证 OP_SLICE/OP_CONTRACT 正确生成 copy in/out,且普通 OP_VIEW/OP_ASSEMBLE 不再作为 move 入口。 See merge request: cann/pypto!5568 | 3 months ago |
| 回退严格检验 | 3 months ago |
| feat(build): Support RPM/DEB packaging in unified build scenarios. Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5277 merge feat/build-pkg-type-rpm-deb into master feat(build): Support RPM/DEB packaging in unified build scenarios. Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: feat(build): 支持统一构建场景下的 rpm/deb 打包 为支持 CANN 全量源码构建场景,新增 PACKAGE_TYPE CMake 选项与 --pkg-type 命令行参数,支持产出 run/rpm/deb/all 多种安装包格式。RPM/DEB 包通过自定义 postinst/prerm 钩子完成 PyPTO wheel 的安装与卸载,并统一安装包元数据文件权限。 主要改动: - CMakeLists.txt 新增 PACKAGE_TYPE 缓存变量,并透传至 set_cann_cpack_config - build_ci.py 新增 --pkg-type 参数(run/rpm/deb/all),并传递给 CMake - 新增 rpm_deb/custom_postinst.sh,在 RPM/DEB 安装时安装 PyPTO wheel - 新增 rpm_deb/custom_prerm.sh,在 RPM/DEB 卸载时卸载 PyPTO wheel - 修正 scripts/package/pypto/pypto.xml 中 install_mod 权限配置 Related Issues: #2573 See merge request: cann/pypto!5277 | 3 months ago |
| feat(pypto_pro): AICERR exception dump Co-authored-by: liulufang_gitcode<liulufang1@hisilicon.com> # message auto-generated for no-merge-commit merge: !5435 merge master into master feat(pypto_pro): AICERR exception dump Created-by: liulufang_gitcode Commit-by: liulufang_gitcode Merged-by: cann-robot Description: 本 PR 为 PyPTO Pro 增加 AICORE 异常(AICERR)的异常 dump 能力:通过编译并加载一段内嵌 C++ 代码,向 CANN 注册 ExceptionDumpCallback,在 kernel 启动前缓存张量信息,并在 synchronize() 触发异常时填充 ExceptionDumpInfo,从而支持 CANN 原生 dump 机制。同时补充了触发 AICORE 错误的单测以及一个离线复现工具,用于从异常 dump 数据生成并执行单算子复现脚本。 主要改动 新增异常 dump 回调管理模块 exception_dump.py:内嵌 C++ 源码并在运行时用 g++ 编译为缓存 .so,通过 register_callback() 调用 AdumpRegExceptionDumpCallback 注册回调,set_dump_info() 在启动前缓存 kernel 名与张量信息,clear_dump_info() 清空缓存,并内置 _PL_DTYPE_TO_ACL_DTYPE 完成 PL 类型到 ACL 类型的映射。 新增 C++ 回调实现 exception_dump_callback.cpp:实现 ProExceptionDumpCallback,将缓存的张量信息(类型、大小、数据类型、地址、shape 等)填入 ExceptionDumpInfo,并通过 pro_register_exception_dump_callback、pro_set_dump_info、pro_clear_dump_info 暴露给 Python。 改造 kernel 启动流程 jit.py:为 CompiledKernel 增加 kernel_name 字段,_load_lib 与 _launch 透传 kernel_name,并在 call_kernel 前调用 set_dump_info(kernel_name, args, param_specs) 缓存本次启动的 tensor 信息。 新增 AICORE 错误触发测试 test_aicore_error.py:通过 store_tile 越界写入触发硬件异常,验证 torch.npu.synchronize() 抛出异常,用于验证 dump 机制在 PyPTO Pro 下的可用性。 新增离线复现工具 debug_aicore_error_pro_repro.py:解析异常 dump 目录中的 tensor 元数据与二进制数据,定位 call_kernel.so,生成并执行单算子复现脚本,输出复现报告。 See merge request: cann/pypto!5435 | 3 months ago |
| style(config): Update .clang-format and .pre-commit-config.yaml rules Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4877 merge style-config-ci into master style(config): Update .clang-format and .pre-commit-config.yaml rules Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Update .clang-format and .pre-commit-config.yaml rules See merge request: cann/pypto!4877 | 4 months ago |
| fix(docs): Add the index files Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !5184 merge master into master fix(docs): Add the index files Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: 1、将pypto.isnan、pypto.pack、pypto.unpack接口文档写入目录文件index_hiascend.md 2、pypto.isnan、pypto.pack、pypto.unpack接口支持910DT,增加相关描述,并补充芯片标签。 3、删除目录中不存在的内容引用:pypto-copysign 4、图片lfs跟踪文件统一到仓库根目录下 Related Issue: [#2814](https://gitcode.com/cann/pypto/issues/2814) See merge request: cann/pypto!5184 | 3 months ago |
| style(config): Update .clang-format and .pre-commit-config.yaml rules Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4877 merge style-config-ci into master style(config): Update .clang-format and .pre-commit-config.yaml rules Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Update .clang-format and .pre-commit-config.yaml rules See merge request: cann/pypto!4877 | 4 months ago |
| style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago |
| feat(skill): Add pypto-machine-code-review skill, remove pypto-aicpu-perf-coding Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !5219 merge feat/machine-code-review-skill into master feat(skill): Add pypto-machine-code-review skill, remove pypto-aicpu-perf-coding Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: Merge pypto-aicpu-perf-coding into pypto-machine-code-review. See commit message for details. See merge request: cann/pypto!5219 | 3 months ago |
| refactor(machine): Remove DeviceRunner and redistribute init flow Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !5426 merge refactor/remove-device-runner into master refactor(machine): Remove DeviceRunner and redistribute init flow Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: refactor(machine): Remove DeviceRunner and redistribute init flow DeviceRunner was a god-class singleton that mixed device init, HostProf management, DevicePerf management, stream synchronization, and AiCpu .so loading. This PR dissolves it entirely, redistributing each responsibility to its natural module. Changes: - Move init flow (InitDeviceArgs / InitDeviceArgsCore / GetAicoreRegs / InitAiCpuSoBin / SetAiCpuSoOverride) into KernelBinary with static g_deviceArgs + std::call_once guard (EnsureInitialized / InitMetaData / GetEnableDumpDevPref) - Move HostProf methods (SetHostProfFunction / GetHostProfType / ReportHostProfInfo) into HostProf::GetInstance() singleton - Move DevicePerf methods (ResetPerData / SyncProfData / SetDebugEnable) into DevicePerf::GetInstance() singleton - Move DynamicLaunchSynchronize into DeviceLauncher - Move KernelLaunchInfo struct into device_launcher_types.h - Delete device_runner.h and device_runner.cpp - Update all call sites: device_launcher.cpp, kernel_bundle_launch.cpp, pypto_bundle_api.cpp, test_dev_func_runner.h, UT files - Remove device_runner.h from CMakeLists.txt install list Related Issues: #2967 See merge request: cann/pypto!5426 | 3 months ago |
| style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago |
| style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago |
| Initial commit | 10 months ago |
| 修复dump 数据bug Co-authored-by: s00454010<suntao37@huawei.com> # message auto-generated for no-merge-commit merge: !5436 merge bug/dumpdata into master 修复dump 数据bug Created-by: u010986451 Commit-by: s00454010 Merged-by: cann-robot Description: 修复dump 数据bug See merge request: cann/pypto!5436 | 3 months ago |
| feat(interface): Support getinputdata for all integral types Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2224 merge refactor/deadcode into master feat(interface): Support getinputdata for all integral types Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: 1. startArgsSymbolHandlerList of devProg does not used any more 2. Support getinputdata for all integral types Related Issue: [#408](https://gitcode.com/cann/pypto/issues/408) See merge request: cann/pypto!2224 | 7 months ago |
| fix(docs): Fix the docs Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !5246 merge master into master fix(docs): Fix the docs Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: 1、修改以下文件编码格式为UTF-8格式: README.md docs/zh/api/config/b.md docs/zh/install/prepare_environment.md docs/zh/tutorials/index_hiascend.md 2、部分链接修改。 3、部分简易图由png格式调整成mermaid格式,便于后续翻译 4、其他零星问题修正 Related Issue: [#2889](https://gitcode.com/cann/pypto/issues/2889) See merge request: cann/pypto!5246 | 3 months ago |
| fix(docs): Fix the docs Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !5246 merge master into master fix(docs): Fix the docs Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: 1、修改以下文件编码格式为UTF-8格式: README.md docs/zh/api/config/b.md docs/zh/install/prepare_environment.md docs/zh/tutorials/index_hiascend.md 2、部分链接修改。 3、部分简易图由png格式调整成mermaid格式,便于后续翻译 4、其他零星问题修正 Related Issue: [#2889](https://gitcode.com/cann/pypto/issues/2889) See merge request: cann/pypto!5246 | 3 months ago |
| fix(docs): Precision tools do not have a recompilation scenario Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !4153 merge master into master fix(docs): Precision tools do not have a recompilation scenario Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: 1、仓库文档国际化,新增英文readme文件,skill和docs暂不翻译 2、精度工具文档陈旧内容修改:1)删除精度工具重编译步骤 2)更新msaccucmp.py执行命令,明确执行路径、不带版本信息,便于用户在不同版本通用执行 3、webide安装方式的安装界面截图变更 Related Issue: #2345 See merge request: cann/pypto!4153 | 5 months ago |
| fix(docs): Precision tools do not have a recompilation scenario Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !4153 merge master into master fix(docs): Precision tools do not have a recompilation scenario Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: 1、仓库文档国际化,新增英文readme文件,skill和docs暂不翻译 2、精度工具文档陈旧内容修改:1)删除精度工具重编译步骤 2)更新msaccucmp.py执行命令,明确执行路径、不带版本信息,便于用户在不同版本通用执行 3、webide安装方式的安装界面截图变更 Related Issue: #2345 See merge request: cann/pypto!4153 | 5 months ago |
| fix(interpreter): Fix tile_fwk_calculator compiler error in g++ 13.3.0 Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !1453 merge interpreter into master fix(interpreter): Fix tile_fwk_calculator compiler error in g++ 13.3.0 Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: Fix tile_fwk_calculator compiler error in g++ 13.3.0 See merge request: cann/pypto!1453 | 8 months ago |
| feat(gcov): Support gcov of python scene Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !3250 merge master into master feat(gcov): Support gcov of python scene Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: 为 Python 前端用例增加 gcov 覆盖率统计能力。 主要修改: - 新增 gen_coverage_config.py 在 CMake POST_BUILD 阶段生成覆盖率配置 - setup.py 写入 build_dir 标记文件供 build_ci.py 定位配置文件 - build_ci.py 新增 py_generate_coverage 函数生成覆盖率报告 - 修复 CMake VERBATIM 问题,处理生成器表达式展开后的分号分隔路径(同时修复 C++ 覆盖率场景) See merge request: cann/pypto!3250 | 6 months ago |
| fix(all): Fix spelling errors in source comments and diagnostic messages Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5392 merge fix/spelling-errors-2908 into master fix(all): Fix spelling errors in source comments and diagnostic messages Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: fix(all): Fix spelling errors in source comments and diagnostic messages 修复源码注释、错误信息和调试日志中多处英文拼写错误,避免阅读诊断输出时产生误解。 Changes: - device_error_code.h:defalut -> default - codegen_vector.cpp:occured/unsupport -> occurred/unsupported - operation_impl.cpp:interger -> integer - device_task_context.cpp:Inital -> Initial - directed_graph_util.h:lenght -> length - tune_sync_for_vf.cpp:falied -> failed(4 处) - graph_utils.h / expand_function.cpp:seperate -> separate - cube_process.cpp:invlid -> invalid - pil2ir.py:funtion -> function - test_dynamic_mm.cpp:intput -> input(4 处) Related Issues: #2908 See merge request: cann/pypto!5392 | 3 months ago |
| feat(IR): Add ir text serialization Co-authored-by: Jie Yin<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !5455 merge normalize-ir-rw into master feat(IR): Add ir text serialization Created-by: yinjie27_ Commit-by: Jie Yin Merged-by: cann-robot Description: feat(IR): Add ir text serialization See merge request: cann/pypto!5455 | 3 months ago |
| feat(pass): Add slice contract feature for pass with some cases Co-authored-by: 2501_92924845<niulinkai@huawei.com> # message auto-generated for no-merge-commit merge: !5568 merge slice5close into master feat(pass): Add slice contract feature for pass with some cases Created-by: 2501_92924845 Commit-by: 2501_92924845 Merged-by: cann-robot Description: PR描述 1.背景 历史实现中,OP_VIEW 和 OP_ASSEMBLE 同时承担两类语义: 视图转换语义:描述 tensor 的 shape、offset、dyn offset、dyn valid shape 等逻辑视图关系。 搬运语义:在 tile graph 后段被 GenerateMoveOp 转换为 copy in / copy out 等真实搬运操作。 本需求将这两类语义拆开: OP_VIEW / OP_ASSEMBLE:保留为视图语义,表达逻辑视图关系。 OP_SLICE / OP_CONTRACT:表达搬运语义,分别对应原 copy in 方向和 copy out 方向的 tile 级搬运描述。 在 ExpandFunction 阶段,原先需要展开的 VIEW/ASSEMBLE 会被展开为 tile 级的 SLICE/CONTRACT。后续 tile graph pass 不能再默认 VIEW/ASSEMBLE 一定会生成真实搬运,而需要按新语义区分: 优化、合并、图结构分析类 pass 需要识别 view-like 和 assemble-like 两组 opcode。 内存推导和 move 生成类 pass 应以 SLICE/CONTRACT 作为真实搬运入口。 本设计覆盖 PVC2_OOO 策略中从 MergeViewAssemble 到 GenerateMoveOp 的相关 pass。 2.. 目标与非目标 2.1 目标 支持 ExpandFunction 后图中出现 OP_SLICE/OP_CONTRACT,并保证后续 pass 能正确识别、合并、拆分、分区和生成 move op。 将原来依赖 OP_VIEW/OP_ASSEMBLE 的搬运逻辑迁移到 OP_SLICE/OP_CONTRACT。 保留 OP_VIEW/OP_ASSEMBLE 的视图表达能力,避免把纯视图语义误转成 copy。 保持现有 offset、dyn offset、dyn valid shape、scope、atomic RMW 属性等关键信息在 pass 改写中正确传递。 兼容原有 pass 中 view/assemble 链路优化能力,使其覆盖 slice/contract 场景。 2.2 非目标 不改变用户侧 API 的 view/assemble 表达方式。 不改变 copy op 的最终执行语义。 不在 GenerateMoveOp 中继续把普通 OP_VIEW/OP_ASSEMBLE 当作搬运入口。 不引入新的 attribute 类型;OP_SLICE 复用 ViewOpAttribute,OP_CONTRACT 复用 AssembleOpAttribute。 2.3 相关验证 MergeViewAssemble UT:覆盖 view-view、slice-view、view-slice、assemble-contract 等链路合并,验证合并后 opcode 和 attribute 正确。 SplitReshape UT:覆盖 contract -> reshape -> slice、reduce_acc 前驱跳过、动态 shape 变轴跳过。 SplitLargeFanoutTensor UT:覆盖大 fanout 中 assemble-like producer 和 view-like consumer 的拆分、offset 更新和冗余删除。 AssignMemoryType UT:覆盖 slice/contract 的 original、requirement、convert 改写、LiteNPU reshape 特殊路径。 RemoveRedundantOp UT:覆盖 view/assemble-like perfect match、partial match、multi-contract-single-slice、single-contract-multi-slice。 ProcessAtomic UT:覆盖 AtomicRMW 属性下沉到 contract、offset 累加、VecDup 分支删除。 GraphPartition 与 IntraSubgraphAdapter UT:覆盖跨子图边界插入 slice/contract,以及 legacy view/assemble memory 不一致时的原地改写。 GenerateMoveOp UT:验证 OP_SLICE/OP_CONTRACT 正确生成 copy in/out,且普通 OP_VIEW/OP_ASSEMBLE 不再作为 move 入口。 See merge request: cann/pypto!5568 | 3 months ago |
| docs(agents): Add AICPU hot-path high-performance coding skill Co-authored-by: LordOfMysteries<duhongxiang@huawei.com> # message auto-generated for no-merge-commit merge: !5097 merge perf/item-pool-lazy-init into master docs(agents): Add AICPU hot-path high-performance coding skill Created-by: LordOfMysteries Commit-by: LordOfMysteries Merged-by: cann-robot Description: https://gitcode.com/cann/pypto/issues/2597 See merge request: cann/pypto!5097 | 4 months ago |
| 修复dump 数据bug Co-authored-by: s00454010<suntao37@huawei.com> # message auto-generated for no-merge-commit merge: !5436 merge bug/dumpdata into master 修复dump 数据bug Created-by: u010986451 Commit-by: s00454010 Merged-by: cann-robot Description: 修复dump 数据bug See merge request: cann/pypto!5436 | 3 months ago |
| feat(build): Support packing whl into run Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !4267 merge master into master feat(build): Support packing whl into run Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: ## 变更摘要 此 PR 为 PyPTO 项目新增了将 Python wheel (.whl) 包打入 CANN .run 安装包的能力。通过引入 ENABLE_FEATURE_PACKING_WHL_INTO_RUN 特性开关,将构建产物(whl 包及脚本)整合到 CANN 标准的 run 包交付流程中,使 whl 包能随 run 包一起分发和安装。整体改动涵盖 CMake 构建体系扩展、安装/卸载脚本框架搭建、包描述 XML 配置以及 CI 构建入口适配。 ## 主要改动 - **新增 CMake 打包基础设施**:新增 cmake/package.cmake(安装 whl 及脚本到 run 包目录结构)、cmake/prepare.cmake(第三方路径初始化)、cmake/fetch_cann_cmake.cmake(自动下载 CANN 公共 cmake 脚本)、version.cmake(版本声明 9.1.0),均在 ENABLE_FEATURE_PACKING_WHL_INTO_RUN 开关控制下生效;cmake/config.cmake 中移除了部分不再需要的配置(-17 行)。 - **新增 run 包安装/卸载脚本体系**:在 scripts/package/pypto/scripts/ 下新增 10 个 Shell 脚本,包括 install.sh(安装入口)、uninstall.sh(卸载入口)、run_pypto_install.sh(文件拷贝调度及 whl 的 pip install 后处理)、run_pypto_uninstall.sh(卸载流程)、pypto_custom_install.sh/pypto_custom_uninstall.sh(自定义安装/卸载逻辑)、pypto_func.sh(公共函数库,492 行)、ver_check.sh(版本校验)、cleanup.sh 和 help.info,构成了完整的 run 包生命周期管理。 - **新增包描述 XML 配置**:新增 scripts/package/pypto/pypto.xml 作为 run 包的主配置文件(定义包名 pypto、安装脚本路径、版本信息、目录结构等),并在 scripts/package/module/ascend/ 下新增 5 个模块级 XML(EngineeringCommon.xml、EngineeringFiles.xml、PyptoBin.xml、PyptoInc.xml、PyptoSo.xml),用于描述不同子模块的安装路径和权限。 - **CI 构建入口 build_ci.py 适配**:大幅扩展 build_ci.py(+80/-32),使其支持打包 whl 到 run 包的新构建模式,整合新的 CMake 流程和参数配置。 See merge request: cann/pypto!4267 | 5 months ago |
| feat(build): Support Python code coverage generation Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !5298 merge fix into master feat(build): Support Python code coverage generation Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Support Python code coverage generation See merge request: cann/pypto!5298 | 3 months ago |
| fix(all): Fix spelling errors in source comments and diagnostic messages Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5392 merge fix/spelling-errors-2908 into master fix(all): Fix spelling errors in source comments and diagnostic messages Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: fix(all): Fix spelling errors in source comments and diagnostic messages 修复源码注释、错误信息和调试日志中多处英文拼写错误,避免阅读诊断输出时产生误解。 Changes: - device_error_code.h:defalut -> default - codegen_vector.cpp:occured/unsupport -> occurred/unsupported - operation_impl.cpp:interger -> integer - device_task_context.cpp:Inital -> Initial - directed_graph_util.h:lenght -> length - tune_sync_for_vf.cpp:falied -> failed(4 处) - graph_utils.h / expand_function.cpp:seperate -> separate - cube_process.cpp:invlid -> invalid - pil2ir.py:funtion -> function - test_dynamic_mm.cpp:intput -> input(4 处) Related Issues: #2908 See merge request: cann/pypto!5392 | 3 months ago |