Pull Request has been successfully merged by CANN-robot.
(Thank you for yhkz9211's contribution.)yhkz9211,感谢您的提交,建议在完成PR充分自验证后,再触发线上构建任务。
若您的PR已具备检视条件,可根据下表的责任田,@对应的committer进行代码检视,我们会在第一时间对您的提交进行处理。
代码责任田:
| module | committer |
|---|---|
| adv_api | chenyiyuan, wuyang_hw |
| basic_api | chenyiyuan, wuyang_hw |
| c_api | pangfd, yue_mo_du_qian |
| cmake | xun_zhuge, DragonBornHD84 |
| docs | munanhw, ai_xin |
| examples | changxianyu, bianque |
| simt_api | wulinyu, zhanghao_0689 |
| scripts | xun_zhuge, kevin365 |
| tools | YANXI_ZHAO, XuebinYang, sjtulxh |
💡 如您不确定可以@谁,可以直接@我或者ascend-c sig的maintainer,xun_zhuge和ascendhjh,我们会为您分配合适的committer进行代码检视。
再次感谢您参与CANN的社区贡献。


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 |
|---|---|---|
| impl/basic_api | ✅ wuyang_hw, wulinyu (2/2) | ✅ wuyang_hw (1/1) |
| impl/simt_api | ✅ wulinyu, wuyang_hw (2/2) | ✅ wulinyu (1/1) |
| include/adv_api | ✅ 黄金华, wulinyu, wuyang_hw (3/2) | ✅ 黄金华 (1/1) |
| include/basic_api | ✅ 黄金华, wulinyu, wuyang_hw (3/2) | ✅ 黄金华 (1/1) |
| include/basic_api/reg_compute | ✅ 黄金华, wulinyu, wuyang_hw (3/2) | ✅ 黄金华 (1/1) |
| include/simt_api | ✅ 黄金华, wulinyu, wuyang_hw (3/2) | ✅ 黄金华 (1/1) |
| include/utils | ✅ 黄金华, wulinyu, wuyang_hw (3/2) | ✅ 黄金华 (1/1) |
| repo-cann/asc-devkit | ✅ wuyang_hw, wulinyu, 黄金华 (3/2) | ✅ wulinyu, 黄金华, wuyang_hw (3/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yhkz9211, thanks for your pull request. All authors of the commits have signed the CLA. 👍


变更摘要
该 PR 配合融合编译路径调整,将项目中大量源文件的 #include 头文件引用方式从短名称形式改为相对路径形式。具体而言,原先依赖编译系统 include path 的写法如 #include "kernel_basic_intf.h" 被统一替换为向上多级目录的相对路径(如 #include "../../../../../include/basic_api/kernel_basic_intf.h"),同时 classify_rule.yaml 中 asc-devkit 模块的文件分类规则也进行了大规模重组和扩展。变更覆盖了 impl/ 和 include/ 目录下约 887 个文件,属于基础设施层面的重构,不涉及业务逻辑修改。
主要改动
-
classify_rule.yaml规则重组:asc-devkit模块下新增了大量文件匹配模式(如impl/basic_api/dav_m510/kfc/*.h、impl/adv_api/detail/conv/conv3d/*.h等),原有规则被重新排序和扩展,以适配新的融合编译文件组织结构。 -
头文件
#include路径批量从短名称改为相对路径:所有原先以短文件名引用的 AscendC 框架头文件(如kernel_basic_intf.h、kernel_tensor.h、kernel_pop_stack_buffer.h、kernel_utils.h、kernel_log.h等)统一替换为以../../.../include/起始的相对路径,涉及impl/adv_api/detail/、impl/basic_api/、include/等目录下的数百个.h和.cpp文件。 -
include/目录下公共头文件同步适配:include/basic_api/和include/adv_api/下的大量接口头文件(如kernel_operator_mm_intf.h、kernel_operator_vec_binary_intf.h、matmul_client.h、layernorm_utils.h等)内部的#include也进行了对应的相对路径转换。 -
impl/adv_api/detail/hccl/尾随空格清理:hcomm_primitives_dl.h和topo.cc中仅有行尾空格删除,无实质内容变更。


代码审查
经过对全部 887 个变更文件的审查,此次 PR 的主要内容是将 impl/ 和 include/ 目录下的大量头文件中的 #include 指令从裸文件名(依赖编译器 include path)改为相对于仓库根目录的相对路径。所有路径转换的模式一致且经过抽样验证均正确。
审查总结
共审查 887 个文件,发现 1 个问题:
| 优先级 | 数量 | 说明 |
|---|---|---|
| P0 | 0 | — |
| P1 | 0 | — |
| P2 | 0 | — |
| P3 | 1 | 重复包含(变更前已存在的冗余代码) |
各文件审查结果:
classify_rule.yaml— 新增/调整了分类规则条目,无问题impl/adv_api/detail/hccl/cc/src/common/hcomm_dlsym/hcomm_primitives_dl.h— 仅删除行尾空白,无问题impl/adv_api/detail/hccl/cc/src/ops/op_common/topo/topo.cc— 仅删除行尾空白,无问题impl/adv_api/detail/math/sign/sign_common_impl.h— P3:kernel_basic_intf.h重复包含(变更前后均存在)- 其余 883 个文件 — 仅将
#include "xxx.h"转换为相对路径#include "../../.../xxx.h",路径深度经验证正确,无问题
整体风险评估:低风险。 此变更属于纯路径重构,不涉及逻辑修改。所有相对路径已通过抽样验证(验证了不同目录深度的文件),../ 的数量与头文件实际位置一致。若下游依赖的 include path 配置正确,此变更应为兼容性改进。
⚠️ 已识别出整体风险,但无法提取行内评论,请参考整体评估。


流水线任务触发成功
任务链接 [b855a306dfc44a29b66c144a0187bb41][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| pre_comment | ✅ 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-06-30 12:10:45] CI执行结束


流水线任务触发成功
任务链接 [7222e25f24e7417f98667901e6938694][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_adv_test_one | ✅ SUCCESS | ||
| UT_Test_adv_test_two | ✅ SUCCESS | ||
| UT_Test_basic_test_one | ✅ SUCCESS | ||
| UT_Test_basic_test_two | ✅ SUCCESS | ||
| UT_Test_basic_test_three | ✅ SUCCESS | ||
| UT_Test_basic_test_four | ✅ SUCCESS | ||
| UT_Test_basic_test_five | ✅ SUCCESS | ||
| UT_Test_arm | ✅ SUCCESS | ||
| UT_Test_report | ✅ SUCCESS | >>>>> |
[2026-06-30 12:28:20] CI执行结束


流水线任务触发成功
任务链接 [3d621a01de1840fbae83b840b8543b19][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| pre_comment | ✅ 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-06-30 14:58:14] CI执行结束


流水线任务触发成功
任务链接 [800d97cb48cc4f95be2a95c321c87e46][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_adv_test_one | ✅ SUCCESS | ||
| UT_Test_adv_test_two | ✅ SUCCESS | ||
| UT_Test_basic_test_one | ✅ SUCCESS | ||
| UT_Test_basic_test_two | ✅ SUCCESS | ||
| UT_Test_basic_test_three | ✅ SUCCESS | ||
| UT_Test_basic_test_four | ✅ SUCCESS | ||
| UT_Test_basic_test_five | ✅ SUCCESS | ||
| UT_Test_arm | ✅ SUCCESS | ||
| UT_Test_report | ✅ SUCCESS | >>>>> |
[2026-06-30 15:12:37] CI执行结束


描述
配合融合编译路径调整,修改包含头文件的路径为相对路径。
关联的Issue
关联Issue #945
测试
二级冒烟
文档更新
NA
类型标签