Pull Request已成功合入, 合并人@CANN-robot
(感谢 liu-wei 的贡献)Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| math/tile | ✅ 宋凯, wangrui_ (2/2) | ✅ 宋凯, wangrui_ (2/1) |
| repo-cann/ops-math | ✅ 宋凯, wangrui_ (2/2) | ✅ wangrui_, 宋凯 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
liu-wei, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


流水线任务触发成功
任务链接 [9bcd5af8546a42b5bab0ca1d2d851c5f][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ❌ FAILED | >>>>> | |
| Compile_Ascend_X86_mobile_station | ❌ FAILED | >>>>> | |
| Compile_Ascend_ARM | ❌ FAILED | >>>>> | |
| Compile_Ascend_X86_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ❌ FAILED | >>>>> | |
| Compile_Ascend_X86_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ❌ FAILED | >>>>> | |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ❌ FAILED | >>>>> | |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_A5_ubuntu24 | ✅ SUCCESS | >>>>> | |
| harmony-infer | ✅ SUCCESS | ||
| Compile_Ascend_ARM_ubuntu24 | ❌ FAILED | >>>>> | |
| Compile_Ascend_ARM_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_single_ubuntu24 | ❌ FAILED | >>>>> | |
| Compile_Ascend_ARM_A5_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_X86_monitor_910b | ❌ FAILED | >>>>> | |
| Compile_X86_monitor_910c | ❌ FAILED | >>>>> | |
| Compile_X86_monitor_950 | ❌ FAILED | >>>>> |


流水线任务触发成功
任务链接 [4da19fa862cd436da90f3087f8b75e4b][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ⚠️ WARNING | ||
| codecheck_precommit | ✅ SUCCESS | >>>>> |
[2026-05-21 08:33:05] CI执行结束


compile


流水线任务触发成功
任务链接 [6fa1e1b65fe844258eba68a4e8a9a547][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_A5_ubuntu24 | ✅ SUCCESS | >>>>> | |
| harmony-infer | ✅ SUCCESS | ||
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_single_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM_A5_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test | ✅ SUCCESS | ||
| UT_Test_experimental | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |
[2026-05-21 12:03:10] CI执行结束


流水线任务触发成功
任务链接 [5cedd5f967ce40949aa0590e2afece16][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ⚠️ WARNING | ||
| codecheck_precommit | ✅ SUCCESS | >>>>> |
[2026-05-21 11:55:18] CI执行结束


compile


流水线任务触发成功
任务链接 [526a191f1b694e65a1701713f14f632b][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_A5_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_harmony-infer | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_single_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM_A5_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test | ✅ SUCCESS | ||
| UT_Test_experimental | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |
[2026-05-21 14:14:15] CI执行结束


流水线任务触发成功
任务链接 [0155db23216b4d44b5f261c99e73ba65][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ⚠️ WARNING | ||
| codecheck_precommit | ✅ SUCCESS | >>>>> |
[2026-05-21 14:06:42] CI执行结束


/lgtm
/approve


描述
本 PR 调整 Tile AICPU kernel 的注册方式,补充 host constant folding 场景下的 V2 注册兼容封装。
主要改动如下:
common/inc/aicpu/math_aicpu_register.h,封装OPS_MATH_REGISTER_CPU_KERNELV2注册宏。math/tile/op_kernel_aicpu/tile_aicpu.cpp改为通过封装宏注册 Tile AICPU kernel。OPS_MATH_AICPU_HOST_KERNEL宏;该路径在 host 库存在RegistCpuKernelV2时注册到 V2,旧版本libaicpu_context_host.a不提供 V2 注册符号时注册到 V1。REGISTER_CPU_KERNEL,保持 device/custom AICPU 注册行为不变。AICPU_INCLUDE补充${OPS_MATH_DIR}/common/inc,保证新增公共头文件可被 AICPU 编译目标引用。改动目的:
RegistCpuKernelV2时注册到 V2;旧库缺少该符号时注册到 V1,配合 opbase 的 V1 兜底路径保持可运行。关联的Issue
关联Issue #1634:https://gitcode.com/cann/ops-math/issues/1634
测试
git diff --check 7fac2495 96de8df2,结果通过。aicpu/math_aicpu_register.h可通过新增的AICPU_INCLUDE被 AICPU 目标引用。OPS_MATH_AICPU_HOST_KERNEL触发 V2 优先注册逻辑。IsRegisteredV2判断是否走 V2 路径;V2 查询未命中时由调度层选择 V1 路径,RunCpuKernelV2内部不再回退 V1。文档更新
无文档更新。
类型标签