Pull Request已成功合入, 合并人@CANN-robot
(感谢 songkai111 的贡献)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/add | ✅ 张磊, 王林木 (2/2) | ✅ 张磊, 王林木 (2/1) |
| repo-cann/ops-math | ✅ 张磊, 王林木 (2/2) | ✅ 张磊, 王林木 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
songkai111, thanks for your pull request. All authors of the commits have signed the CLA. 👍


The repo or branch is not access to PR-cooperate, please check the current repo https://gitcode.com/cann/ops-math.git, branch=master


The repo or branch is not access to PR-cooperate, please check the current repo https://gitcode.com/cann/ops-math.git, branch=master


compile


流水线任务触发成功
任务链接 [087ca0dcadb248d8bfb5edffda582af1][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 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-29 09:57:31] CI执行结束


流水线任务触发成功
任务链接 [1799802e6d5744649f1dfa0b76a0c786][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ❌ FAILED | ||
| 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 | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |


The repo or branch is not access to PR-cooperate, please check the current repo https://gitcode.com/cann/ops-math.git, branch=master


The repo or branch is not access to PR-cooperate, please check the current repo https://gitcode.com/cann/ops-math.git, branch=master


compile


流水线任务触发成功
任务链接 [94d1e27f2f4a4a35835e5b16131771bd][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 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-30 10:59:59] CI执行结束


流水线任务触发成功
任务链接 [eeee6497311b499db6cd8e1429ab0938][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 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 | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
[2026-05-30 10:54:16] CI执行结束


The MR can not be merged, because of CodeReview discussion not resolved
If you want to solve this problem, you can click here to do it in the FAQs.


描述
本 PR 重构了 kernel 二进制编译的配置管理体系,将原来分散在
ascendc_config.json、*_simplified_key.ini、all_ops_impl_mode.ini等文件中的编译配置项(simplified_key_mode、impl_mode、auto_sync、compile_options)统一迁移为 CMake 声明式函数add_kernel_sources()的方式管理。改动原因
原有配置方式需要手动维护多处配置文件(JSON/INI),容易遗漏且难以追溯配置来源。通过将配置下沉到各算子目录的
op_kernel/CMakeLists.txt中,使配置与代码就近维护,降低出错概率。改动方法
add_kernel_sources()CMake 函数(cmake/func.cmake):算子通过在op_kernel/CMakeLists.txt中调用此函数声明编译参数(COMPUTE_UNITS、SIMPLIFIED_KEY、AUTO_SYNC、IMPL_MODE、OPTIONS),函数将配置收集到 CMake CACHE 变量列表中gen_ops_compile_ini.py脚本:在编译阶段将 CMake 收集的配置列表生成kernel-options-{soc_version}.ini文件build_binary_opc_gen_task.sh:优先从新生成的kernel-options-*.ini读取 simplified_key 和 impl_mode 配置,找不到时降级到原有 ini 文件gen_compile_option.sh:优先从kernel-options-*.ini读取 auto_sync 和 compile_options,降级到ascendc_config.jsonascendc_config.json迁移到math/add/op_kernel/CMakeLists.txt,删除math/add/op_host/config/ascend950/add_simplified_key.iniget_op_type_from_op_name函数:从gen_ops_info.cmake移至func.cmake,简化参数签名(移除 OP_DIR 参数)opp_uninstall.sh修复变量名拼写错误(_module_apth→_module_path);gen_binary_info_config.py将 WARNING 日志降级为 INFO关联的Issue
测试
文档更新
无
类型标签
Related Roadmap: https://gitcode.com/cann/ops-math/issues/1258