| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: migrate to supported ACL constants Co-authored-by: Geminiver<zhengjianwei10@huawei.com> # message auto-generated for no-merge-commit merge: !7268 merge master into master fix: migrate to supported ACL constants Created-by: Geminiver Commit-by: Geminiver Merged-by: cann-robot Description: ## 描述 为配合 ACL 旧常量下线,批量迁移示例、运行时、HCCL 和测试桩中的用法: - ACL_ERROR_NONE → ACL_SUCCESS - ACL_RT_BINARY_LOAD_OPT_LAZY_MAGIC → ACL_RT_BINARY_LOAD_OPT_MAGIC - ACL_DEV_ATTR_SUPER_POD_DEVIDE_ID → ACL_DEV_ATTR_SUPER_POD_DEVICE_ID ## 关联的Issue 无。 ## 测试 全仓精确搜索确认三个旧标识符均无残留。未运行构建或功能测试。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!7268 | 19 天前 | |
fix: migrate to supported ACL constants Co-authored-by: Geminiver<zhengjianwei10@huawei.com> # message auto-generated for no-merge-commit merge: !7268 merge master into master fix: migrate to supported ACL constants Created-by: Geminiver Commit-by: Geminiver Merged-by: cann-robot Description: ## 描述 为配合 ACL 旧常量下线,批量迁移示例、运行时、HCCL 和测试桩中的用法: - ACL_ERROR_NONE → ACL_SUCCESS - ACL_RT_BINARY_LOAD_OPT_LAZY_MAGIC → ACL_RT_BINARY_LOAD_OPT_MAGIC - ACL_DEV_ATTR_SUPER_POD_DEVIDE_ID → ACL_DEV_ATTR_SUPER_POD_DEVICE_ID ## 关联的Issue 无。 ## 测试 全仓精确搜索确认三个旧标识符均无残留。未运行构建或功能测试。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!7268 | 19 天前 | |
ci: presmoke 从装编译产物起跑,并修掉日志上传的几个问题 Co-authored-by: xun_zhuge<zhugexun@hisilicon.com> # message auto-generated for no-merge-commit merge: !7332 merge zgx/ci-presmoke-base into master ci: presmoke 从装编译产物起跑,并修掉日志上传的几个问题 Created-by: xun_zhuge Commit-by: xun_zhuge Merged-by: cann-robot Description: 拆分提交的第一步,只含与架构无关的基础改动。A5 presmoke job 和用例仓侧的改动不在本 PR。 ## .gitcode/scripts/pre_smoke.sh 脚本原先是个占位:ops 列表写死单元素 "is_finite",循环体里的 $op / $mode 从没被用到,包名硬编码 cann-asc-devkit_linux-aarch64.run。改成从 job 传入的 run_url 取包,不在脚本里猜架构。 顺带修掉三个会影响定位的问题: | # | 问题 | 后果 | |---|---|---| | 1 | run_test.log 用相对路径且不清理 | runner 工作目录跨轮复用,残留的 execute samples success 会让**失败的一轮被判成通过** | | 2 | slog 固定叫 slog.tar.gz | 多个 presmoke job 上传后互相覆盖,先跑完的那份拿不到 | | 3 | object-prefix: ${obs_smoke_path}/plog/ | ${...} 在 yml 里不展开,slog 一直传到字面量路径下 | 第 1 条是门禁完整性问题,建议优先看。 另外两处环境相关的: - **mc2_server.tar.gz**:装 devkit 包会把镜像自带的签名版覆盖掉,而开源 CI 构建的那份没有 CMS 签名,装进去后设备侧验签失败,**整轮用例一张卡都打不开**。改成装前存、装后换回,并把三次 md5 写进诊断日志,便于确认换回确实生效。 - **npu-smi 输出**:原先只写 ./npu_log/,不在 /root/ascend/log 打包范围内,所以每轮的卡状态从来没进过 slog。现在 tee 一份进 ci_env_report.log,并把整段 NPU 状态检查挪到 tar **之前** —— 写在 tar 之后等于写进一个已经被归档的文件。dcmi 的判定和 exit 1 仍留在 tar 之后:机器挂掉的那轮最需要日志,exit 不能跑在打包前面。 没包时的 exit 0("This PR no need execute smoke")语义**保持不变**。 > 顺带提一个我没动的点:那条早退把「包确实不存在」和「下载出错」当成同一种情况,两者都 exit 0。后者静默放过是个门禁缺口,但改它会改变现有语义,留给维护者定。 ## .gitcode/workflows/asc-devkit_action.yml 只有 4 行: - export run_url=... —— 新 pre_smoke.sh 靠它定位包 - ARCH=dav-2201 —— slog 按 arch 命名要用 - upload step 补 if: ${{ always() }} - object-prefix 改成会展开的写法 always() 不是新写法,本仓 staticcheck_action.yml 里同一个 obs-upload 插件就是这么用的。没有它,smoke executor 一失败 upload 就被跳过 —— 实测在一个失败轮次里,这个 step 的 OBS key 是 404。 ## .devcontainer/requirements.txt torch_npu 升到 v26.2.0-pytorch2.7.1 / post11(原 v26.0.0 / post4),四个 wheel 一起。 ## examples/.../fixpipe_params_switch/README{,_en}.md 切场景的步骤照着做会对不上 golden:SCENARIO_NUM 是编译期宏(add_definitions),而 verify_result.py 又从**环境变量**读同一个值来决定 golden 排布,原文只在一处传。改成两处都传,并说明原因。 ## 删掉 /home/aa/check_npu.py 那段 原先 npu-smi 之后有一段:grep "dcmi module initialize failed" 命中就调 python3 /home/aa/check_npu.py 并 exit 1。**这段在 A2 和 A5 两种 runner 上都是死代码**,实测两边都是: ls: cannot access '/home/aa/': No such file or directory (做法:临时加一行 ls -l /home/aa/ 把输出写进 ci_env_report.log,跑一轮从 slog 里读,确认后把诊断行一起删掉。) 就算 /home/aa/ 存在,那个 exit 1 也不改变任何结论:这段跑在 presmoke **之后**,dcmi 真挂了的话用例早就全挂,下面 grep "execute samples success" 已经会 exit 1。 诊断能力没有减少,反而变强了:npu-smi 的输出现在进了 slog(原先只写 ./npu_log/,不在打包范围内),所以 dcmi module initialize failed 这行照样能从归档里看到,只是不再走一条调用不存在脚本的死分支。./npu_log/npu_info.log 唯一的读者就是那个 grep,一并清掉。 See merge request: cann/asc-devkit!7332 | 19 天前 | |
fix: migrate to supported ACL constants Co-authored-by: Geminiver<zhengjianwei10@huawei.com> # message auto-generated for no-merge-commit merge: !7268 merge master into master fix: migrate to supported ACL constants Created-by: Geminiver Commit-by: Geminiver Merged-by: cann-robot Description: ## 描述 为配合 ACL 旧常量下线,批量迁移示例、运行时、HCCL 和测试桩中的用法: - ACL_ERROR_NONE → ACL_SUCCESS - ACL_RT_BINARY_LOAD_OPT_LAZY_MAGIC → ACL_RT_BINARY_LOAD_OPT_MAGIC - ACL_DEV_ATTR_SUPER_POD_DEVIDE_ID → ACL_DEV_ATTR_SUPER_POD_DEVICE_ID ## 关联的Issue 无。 ## 测试 全仓精确搜索确认三个旧标识符均无残留。未运行构建或功能测试。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!7268 | 19 天前 | |
fix: migrate to supported ACL constants Co-authored-by: Geminiver<zhengjianwei10@huawei.com> # message auto-generated for no-merge-commit merge: !7268 merge master into master fix: migrate to supported ACL constants Created-by: Geminiver Commit-by: Geminiver Merged-by: cann-robot Description: ## 描述 为配合 ACL 旧常量下线,批量迁移示例、运行时、HCCL 和测试桩中的用法: - ACL_ERROR_NONE → ACL_SUCCESS - ACL_RT_BINARY_LOAD_OPT_LAZY_MAGIC → ACL_RT_BINARY_LOAD_OPT_MAGIC - ACL_DEV_ATTR_SUPER_POD_DEVIDE_ID → ACL_DEV_ATTR_SUPER_POD_DEVICE_ID ## 关联的Issue 无。 ## 测试 全仓精确搜索确认三个旧标识符均无残留。未运行构建或功能测试。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!7268 | 19 天前 | |
fix: migrate to supported ACL constants Co-authored-by: Geminiver<zhengjianwei10@huawei.com> # message auto-generated for no-merge-commit merge: !7268 merge master into master fix: migrate to supported ACL constants Created-by: Geminiver Commit-by: Geminiver Merged-by: cann-robot Description: ## 描述 为配合 ACL 旧常量下线,批量迁移示例、运行时、HCCL 和测试桩中的用法: - ACL_ERROR_NONE → ACL_SUCCESS - ACL_RT_BINARY_LOAD_OPT_LAZY_MAGIC → ACL_RT_BINARY_LOAD_OPT_MAGIC - ACL_DEV_ATTR_SUPER_POD_DEVIDE_ID → ACL_DEV_ATTR_SUPER_POD_DEVICE_ID ## 关联的Issue 无。 ## 测试 全仓精确搜索确认三个旧标识符均无残留。未运行构建或功能测试。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!7268 | 19 天前 | |
fix: migrate to supported ACL constants Co-authored-by: Geminiver<zhengjianwei10@huawei.com> # message auto-generated for no-merge-commit merge: !7268 merge master into master fix: migrate to supported ACL constants Created-by: Geminiver Commit-by: Geminiver Merged-by: cann-robot Description: ## 描述 为配合 ACL 旧常量下线,批量迁移示例、运行时、HCCL 和测试桩中的用法: - ACL_ERROR_NONE → ACL_SUCCESS - ACL_RT_BINARY_LOAD_OPT_LAZY_MAGIC → ACL_RT_BINARY_LOAD_OPT_MAGIC - ACL_DEV_ATTR_SUPER_POD_DEVIDE_ID → ACL_DEV_ATTR_SUPER_POD_DEVICE_ID ## 关联的Issue 无。 ## 测试 全仓精确搜索确认三个旧标识符均无残留。未运行构建或功能测试。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!7268 | 19 天前 | |
fix: migrate to supported ACL constants Co-authored-by: Geminiver<zhengjianwei10@huawei.com> # message auto-generated for no-merge-commit merge: !7268 merge master into master fix: migrate to supported ACL constants Created-by: Geminiver Commit-by: Geminiver Merged-by: cann-robot Description: ## 描述 为配合 ACL 旧常量下线,批量迁移示例、运行时、HCCL 和测试桩中的用法: - ACL_ERROR_NONE → ACL_SUCCESS - ACL_RT_BINARY_LOAD_OPT_LAZY_MAGIC → ACL_RT_BINARY_LOAD_OPT_MAGIC - ACL_DEV_ATTR_SUPER_POD_DEVIDE_ID → ACL_DEV_ATTR_SUPER_POD_DEVICE_ID ## 关联的Issue 无。 ## 测试 全仓精确搜索确认三个旧标识符均无残留。未运行构建或功能测试。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [ ] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!7268 | 19 天前 | |
docs: 按产品名称映射表统一产品名称(样例) Co-authored-by: munanhw<munan@huawei.com> # message auto-generated for no-merge-commit merge: !6571 merge docs/product-name-examples into master docs: 按产品名称映射表统一产品名称(样例) Created-by: munanhw Commit-by: munanhw Merged-by: cann-robot Description: ## 描述 从 #6524 拆分:examples/ 目录下全部样例文档(856 个文件,中英文 README 成对同步修改) 整改规则(依据产品名称映射表): - Ascend 950PR/Ascend 950DT 系列(含衍生/简写/带空格斜杠变体)统一为 Ascend 950PR&950DT系列产品(英文:Ascend 950PR&950DT products) - Atlas A2/A3 训练系列产品与推理系列产品合并为 Atlas A2系列产品 / Atlas A3系列产品(英文:Atlas A2/A3 products) - Atlas 200I/500 A2 推理产品、Atlas 推理/训练系列产品(含 AI Core / Vector Core 场景)去空格 - 同名并列对按合并语义收敛为单一规范名(如 Atlas A3 products/Atlas A3 products -> Atlas A3 products) ## 关联的Issue 无 ## 测试 - 全量改动已在 #6524 上通过完整 CI(compile 流水线 ci-pipeline-passed),本 PR 为其按目录拆分的等价子集 - 旧名称形式残留为 0、叠字残留为 0;图片路径与文件链接未做任何改动 ## 文档更新 本 PR 为文档产品名称整改 ## 类型标签 - [ ] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [x] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!6571 | 1 个月前 | |
docs: 按产品名称映射表统一产品名称(样例) Co-authored-by: munanhw<munan@huawei.com> # message auto-generated for no-merge-commit merge: !6571 merge docs/product-name-examples into master docs: 按产品名称映射表统一产品名称(样例) Created-by: munanhw Commit-by: munanhw Merged-by: cann-robot Description: ## 描述 从 #6524 拆分:examples/ 目录下全部样例文档(856 个文件,中英文 README 成对同步修改) 整改规则(依据产品名称映射表): - Ascend 950PR/Ascend 950DT 系列(含衍生/简写/带空格斜杠变体)统一为 Ascend 950PR&950DT系列产品(英文:Ascend 950PR&950DT products) - Atlas A2/A3 训练系列产品与推理系列产品合并为 Atlas A2系列产品 / Atlas A3系列产品(英文:Atlas A2/A3 products) - Atlas 200I/500 A2 推理产品、Atlas 推理/训练系列产品(含 AI Core / Vector Core 场景)去空格 - 同名并列对按合并语义收敛为单一规范名(如 Atlas A3 products/Atlas A3 products -> Atlas A3 products) ## 关联的Issue 无 ## 测试 - 全量改动已在 #6524 上通过完整 CI(compile 流水线 ci-pipeline-passed),本 PR 为其按目录拆分的等价子集 - 旧名称形式残留为 0、叠字残留为 0;图片路径与文件链接未做任何改动 ## 文档更新 本 PR 为文档产品名称整改 ## 类型标签 - [ ] 🐛 fix: Bug 修复 - [ ] ✨ feat: 新功能 - [ ] ⚡ perf: 性能优化 - [ ] ♻️ refactor: 代码重构 - [ ] 🧪 test: 新增或修改测试 - [x] 📝 docs: 文档更新 - [ ] 🔧 ci: CI/CD 配置修改 - [ ] ↩️ revert: 回退 - [ ] 🧹 chore: 其他,请具体描述 See merge request: cann/asc-devkit!6571 | 1 个月前 |
Compatibility Guide样例介绍
概述
针对Atlas A2系列产品、Atlas A3系列产品与Ascend 950PR&950DT系列产品之间存在兼容性差异的部分特性,本小节提供了若干样例,用户可以根据样例进行迁移适配。 本小节样例使用<<<>>>内核调用符来完成算子核函数在NPU侧运行验证的基础流程,给出了对应的端到端实现。
样例列表
| 目录名称 | 功能描述 | 支持的产品 |
|---|---|---|
| data_copy_l1togm | 本样例演示L1数据搬运到GM的端到端流程。 | Ascend 950PR&950DT系列产品 Atlas A3系列产品 Atlas A2系列产品 |
| fill | 本样例展示如何使用Fill接口对L0A Buffer和L0B Buffer进行初始化。 | Ascend 950PR&950DT系列产品 Atlas A3系列产品 Atlas A2系列产品 |
| fixpipe_params_switch | 本样例演示Fixpipe接口在2201/3510两种架构下的参数结构体切换。 | Ascend 950PR&950DT系列产品 Atlas A3系列产品 Atlas A2系列产品 |
| matmul_s4 | 本样例演示 int4 矩阵乘计算的端到端实现。 | Ascend 950PR&950DT系列产品 Atlas A3系列产品 Atlas A2系列产品 |
| pattern_transformation | 本样例基于基础的mmad样例,演示了 L1 Buffer -> L0A Buffer 通路的分形转换逻辑。 | Ascend 950PR&950DT系列产品 Atlas A3系列产品 Atlas A2系列产品 |
| scatter | 本样例演示数据离散功能,可根据输入张量和目的地址偏移张量,将输入张量分散到结果张量中。 | Ascend 950PR&950DT系列产品 Atlas A3系列产品 Atlas A2系列产品 |
| set_loaddata_boundary | 本样例实现L1 Buffer边界值的设置。 | Ascend 950PR&950DT系列产品 Atlas A3系列产品 Atlas A2系列产品 |
| subnormal | 本样例以Ln接口为例,演示矢量计算接口的Subnormal计算模式兼容性适配。 | Ascend 950PR&950DT系列产品 Atlas A3系列产品 Atlas A2系列产品 |