| 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 |
| feat(cmake): Delete BUILD_WITH_CANN_MOBILE and fix kirin python ut Co-authored-by: GBowen666<libowen58@huawei.com> # message auto-generated for no-merge-commit merge: !5170 merge master into master feat(cmake): Delete BUILD_WITH_CANN_MOBILE and fix kirin python ut Created-by: GBowen666 Commit-by: GBowen666 Merged-by: cann-robot Description: Related Issue: [ [[Requirement|需求建议]: 删除BUILD_WITH_CANN_MOBILE宏,解决kirin ut设置soc问题](https://gitcode.com/cann/pypto/issues/2816) 1. feat(cmake): delete BUILD_WITH_CANN_MOBILE and fix kirin python ut See merge request: cann/pypto!5170 | 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 |
| refactor(build): Remove third-party build scripts for unified build Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5215 merge refactor/unified-build-third-party into master refactor(build): Remove third-party build scripts for unified build Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: refactor(build): Remove third-party build scripts for unified build 适配 PyPTO 全量源码统一构建场景(ENABLE_UNIFIED_BUILD)。三方依赖(googletest、 libboundscheck、nlohmann_json)已由 cann/cmake 统一管理,仓库内的 ExternalProject 脚本与独立 build.sh 入口不再需要。 Changes: - 删除 build.sh 独立构建入口 - 删除 cmake/third_party 下 googletest、libboundscheck、nlohmann_json 构建脚本 - prepare.cmake 移除 third_party_path 默认回退;CANN_3RD_LIB_PATH 在未显式配置时回退到构建树 - build_ci.py 仅在显式提供时设置 PYPTO_THIRD_PARTY_PATH Related Issues: #2573 See merge request: cann/pypto!5215 | 3 months ago |
| fix(operation): Fix lrelu fp16 precision and negative_slope validation Co-authored-by: raoliang_sac<raoliang4@huawei.com> # message auto-generated for no-merge-commit merge: !5230 merge fix-lrelu-precision-and-validation into master fix(operation): Fix lrelu fp16 precision and negative_slope validation Created-by: raoliang_sac Commit-by: raoliang_sac Merged-by: cann-robot Description: ## 问题描述 pypto.lrelu 算子存在两个问题: ### 问题1:FP16/BF16 精度与 torch_npu 不一致 当输入 tensor 为 fp16/bf16 时,negative_slope(创建为 Element(DT_FP32))被 C++ 层 BinaryOperationScalar 截断为输入 dtype,导致硬件指令 TLRELU 做 fp16×fp16→fp16 乘法。而 torch_npu F.leaky_relu 和 AscendC leaky_relu 算子均在 fp32 下计算后 Cast 回原类型,两者精度存在系统性差异。 ### 问题2:negative_slope 缺少负数/NaN/inf 校验 negative_slope 接受负数、NaN、inf 时无报错,违反文档约束"必须为非负实数(≥ 0),不支持 nan、inf"。 ## 根因分析 **问题1根因链**: - 硬件指令 TLRELU(pto-isa/include/pto/npu/a2a3/TLRelu.hpp:59)要求 scalar 类型与 tile 类型一致 - Python 层 math.py:442 创建 Element(DT_FP32, negative_slope),但 C++ binary.cpp:1142 的 BinaryOperationScalar 将其截断为输入 dtype - AscendC leaky_relu 算子(leaky_relu_apt.cpp:34-38)通过 LeakyReluCastDag(leaky_relu_dag.h:68-78)正确处理:CopyIn<half> -> Cast<float> -> Muls(fp32 slope) -> Cast<half> -> CopyOut **问题2根因**:lrelu 函数缺少参数校验逻辑 ## 修复方案 ### 问题1:fp16/bf16 输入内部提升到 fp32 计算 参照 AscendC leaky_relu 算子和 Atan2 算子的处理模式,在 Python 层对 fp16/bf16 输入做: 1. Cast(input, DT_FP32) — 提升到 fp32 2. LReLU(fp32_input, fp32_slope) — 在 fp32 下计算 3. Cast(result, orig_dtype) — Cast 回原类型 同时统一 negative_slope 始终转为 Element(DT_FP32, ...),无论传入 float 还是 Element。 ### 问题2:添加 negative_slope 校验 对 negative_slope 值检查: - 负数 -> PyptoError(ValueError("negative_slope must be non-negative")) - NaN -> PyptoError(ValueError("negative_slope must not be NaN")) - inf -> PyptoError(ValueError("negative_slope must not be inf")) ## 验证结果 ### 精度验证(759x392 fp16, alpha=0.182676732) | 指标 | 修复前 | 修复后 | torch_npu | |------|--------|--------|-----------| | RMSE vs golden | 0.0016153 | **0.0007846** | 0.0007846 | | RMSE ratio | 2.0589 | **1.000000** | 1.0 | | 20 seed 通过率 | 12/20 PASS | **20/20 PASS** | - | | 逐元素一致性 | 有差异 | **完全一致** | - | ### 拦截验证 | 输入 | 修复前 | 修复后 | |------|--------|--------| | negative_slope=-0.1 | 无报错 | **PyptoError(ValueError)** | | negative_slope=NaN | 无报错 | **PyptoError(ValueError)** | | negative_slope=inf | 无报错 | **PyptoError(ValueError)** | | fp32 基础功能 | PASS | **PASS(无回归)** | ## 变更文件 | 文件 | 变更说明 | |------|---------| | python/pypto/op/math.py | fp16/bf16 输入 Cast->fp32 计算->Cast 回;统一 slope 为 DT_FP32;添加负数/NaN/inf 校验 | | docs/zh/api/operation/pypto-lrelu.md | 更新参数说明和约束说明,删除"fp16不保证正确性",改为"fp32内部计算后Cast回原类型" | Related Issue: #2853 See merge request: cann/pypto!5230 | 3 months ago |
| fix(examples): Add success messages to basic examples Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !5025 merge fix-examples-success-messages into master fix(examples): Add success messages to basic examples Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: - hello_world 和 basic_ops 用例执行成功后缺少明确提示,用户难以从终端输出判断用例是否已完成。 - 修复hello_world.py run_mode=sim配置不生效 - 修复多余logging日志打印 See merge request: cann/pypto!5025 | 4 months ago |
| test(machine): Supplement machine UT test cases_7. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5255 merge ut_8 into master test(machine): Supplement machine UT test cases_7. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut补充 See merge request: cann/pypto!5255 | 3 months ago |
| feat(python): A3 platform high performance version of glm_attention_s1_2_high_throughput. Co-authored-by: z00521416<zhangyongtao7@hisilicon.com> # message auto-generated for no-merge-commit merge: !5234 merge dfx_cloud into master feat(python): A3 platform high performance version of glm_attention_s1_2_high_throughput. Created-by: z00521416 Commit-by: z00521416 Merged-by: cann-robot Description: A3 platform high performance version of glm_attention_s1_2_high_throughput. See merge request: cann/pypto!5234 | 3 months ago |
| fix(ir): Support legacy is_loop_begin/end cross function | 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 |
| feat(skill): Fix scripts in precision debug Co-authored-by: yyyfff<yefan29@huawei.com> # message auto-generated for no-merge-commit merge: !5154 merge master into master feat(skill): Fix scripts in precision debug Created-by: yyyfff Commit-by: yyyfff Merged-by: cann-robot Description: feat(skill): Fix scripts in precision debug See merge request: cann/pypto!5154 | 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 |
| feat(cmake): Delete BUILD_WITH_CANN_MOBILE and fix kirin python ut Co-authored-by: GBowen666<libowen58@huawei.com> # message auto-generated for no-merge-commit merge: !5170 merge master into master feat(cmake): Delete BUILD_WITH_CANN_MOBILE and fix kirin python ut Created-by: GBowen666 Commit-by: GBowen666 Merged-by: cann-robot Description: Related Issue: [ [[Requirement|需求建议]: 删除BUILD_WITH_CANN_MOBILE宏,解决kirin ut设置soc问题](https://gitcode.com/cann/pypto/issues/2816) 1. feat(cmake): delete BUILD_WITH_CANN_MOBILE and fix kirin python ut See merge request: cann/pypto!5170 | 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 |
| feat(dfx): Add aicore error debug script Co-authored-by: meiqing2<meiqing2@hisilicon.com> # message auto-generated for no-merge-commit merge: !5210 merge aic into master feat(dfx): Add aicore error debug script Created-by: meiqing2 Commit-by: meiqing2 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!5210 | 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 |
| style(all): Remove trailing whitespace and add missing EOF newlines Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4916 merge style-cpp into master style(all): Remove trailing whitespace and add missing EOF newlines Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Remove trailing whitespace and add missing EOF newlines See merge request: cann/pypto!4916 | 4 months ago |
| style(all): Remove trailing whitespace and add missing EOF newlines Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4916 merge style-cpp into master style(all): Remove trailing whitespace and add missing EOF newlines Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Remove trailing whitespace and add missing EOF newlines See merge request: cann/pypto!4916 | 4 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 |
| refactor(build): Remove third-party build scripts for unified build Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5215 merge refactor/unified-build-third-party into master refactor(build): Remove third-party build scripts for unified build Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: refactor(build): Remove third-party build scripts for unified build 适配 PyPTO 全量源码统一构建场景(ENABLE_UNIFIED_BUILD)。三方依赖(googletest、 libboundscheck、nlohmann_json)已由 cann/cmake 统一管理,仓库内的 ExternalProject 脚本与独立 build.sh 入口不再需要。 Changes: - 删除 build.sh 独立构建入口 - 删除 cmake/third_party 下 googletest、libboundscheck、nlohmann_json 构建脚本 - prepare.cmake 移除 third_party_path 默认回退;CANN_3RD_LIB_PATH 在未显式配置时回退到构建树 - build_ci.py 仅在显式提供时设置 PYPTO_THIRD_PARTY_PATH Related Issues: #2573 See merge request: cann/pypto!5215 | 3 months ago |
| style(all): Remove trailing whitespace and add missing EOF newlines Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4916 merge style-cpp into master style(all): Remove trailing whitespace and add missing EOF newlines Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Remove trailing whitespace and add missing EOF newlines See merge request: cann/pypto!4916 | 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 |
| 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 |
| 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(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 |
| refactor(ci): Adapt common cmake build process. Co-authored-by: Feiteng Zheng<zhengfeiteng1@h-partners.com> # message auto-generated for no-merge-commit merge: !5145 merge 20260728-add-pre-package into master refactor(ci): Adapt common cmake build process. Created-by: zhengfeiteng Commit-by: Feiteng Zheng Merged-by: cann-robot Description: 适配通过cmake公共仓的build.sh拉起pypto编译,打出pypto的run包。该场景为“全量源码构建”的一个子场景。 - install命令添加COMPONENT参数,在通过cmake公共仓拉起多个子包编译时,用于区分不同子包的编译产物。 - add_pypto_device_project使用add_cann_device_project公共函数替换。 - ENABLE_UNIFIED_BUILD场景set_cann_cpack_config添加PRE_PKG参数,打包前调用pre_package.cmake脚本,打出whl包。 Related Issue: #2573 See merge request: cann/pypto!5145 | 3 months ago |
| refactor(build): Replace hardcoded paths with CMake imported targets Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5147 merge header-deps into master refactor(build): Replace hardcoded paths with CMake imported targets Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: 为实现全量源码构建场景(issue #2573),将 CMake 构建系统中对 cann-toolkit 头文件、库文件的硬编码路径依赖(ASCEND_CANN_PACKAGE_PATH) 替换为 CMake imported targets,通过 find_cann_package 查找 acl_rt、ascend_hal、hcomm/hccl、runtime、atrace、slog 等依赖。 Changes: - 顶层 CMakeLists.txt 增加 acl_rt、ascend_hal、hcomm、hccl、runtime 的 find_cann_package 调用,并处理 hcomm_headers 别名 - cmake/device/CMakeLists.txt 增加 ascend_hal、atrace、hcomm/hccl、slog 的依赖查找 - adapter/machine/device 各 CMakeLists.txt 移除硬编码 include/link 目录,改用 target_link_libraries 引用 imported targets - c_sec 安装改用 $<TARGET_FILE> 生成表达式,头文件安装改用 $<TARGET_PROPERTY> - version.cmake 增加 runtime、hcomm 的构建依赖声明 Related Issues: #2573 See merge request: cann/pypto!5147 | 3 months ago |