已合并
fix: 修复 add_example 头文件 include guard 宏名错误 (#1616) #3637
songkai111创建于 6月30日
fix: 修复 add_example 头文件 include guard 宏名错误 (#1616) #3637
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 songkai111 的贡献)6月30日 创建了 pull request,commit 63ba2895
6月30日 添加了label:cann-cla/yes
CANN-robot
6月30日 评论:
6月30日 评论:
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 |
|---|---|---|
| */*/op_graph/*_proto.h | ✅ 王永光, 王林木, 张磊, zhanw_coding (4/2) | ✅ 王永光 (1/1) |
| repo-cann/ops-math | ✅ zhanw_coding, 张磊, 王林木 (3/2) | ✅ zhanw_coding, 张磊 (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. 👍


6月30日 修改标题为 “fix: 修复 add_example 头文件 include guard 宏名错误 (#1616)”,原标题为“test”
6月30日 修改了pull request 的描述
songkai111
6月30日 评论:
6月30日 评论:
compile


Ssongkai111
6月30日 update merge request[project id: 7649531, iid: 3637, commit_id: d5f6df57bfdd9cf1e5a3a0f2e441fe8f75a300f5] virtual merging success
6月30日 update merge request[project id: 7649531, iid: 3637, commit_id: d5f6df57bfdd9cf1e5a3a0f2e441fe8f75a300f5] virtual merging success
atomgit-bot
6月30日 评论:
6月30日 评论:
变更摘要
此 PR 主要修复了两个示例头文件中的 include guard 宏名称错误(疑似从其他文件复制而来未做修改),将其更正为与各自文件名匹配的宏名称,避免潜在的重复定义或编译问题。
主要改动
- 修正
add_example_tiling_data.h的 include guard:将宏_ROTARY_POSITION_EMBEDDING_GRAD_TILING_DATA_H_更正为_ADD_EXAMPLE_TILING_DATA_H_,与文件名add_example_tiling_data.h保持一致。 - 修正
add_example_proto.h的 include guard:将宏OPS_OP_PROTO_INC_AddEXAMPLE_H_更正为OPS_OP_PROTO_INC_AddEXAMPLEAICPU_H_,以区分 AICPU 示例与普通 AddExample 的头文件。


atomgit-bot
6月30日 评论:
6月30日 评论:
代码审查
审查总结
- 变更文件数:2
- 发现问题总数:1
| 优先级 | 数量 |
|---|---|
| P0 | 0 |
| P1 | 0 |
| P2 | 0 |
| P3 | 1 |
各文件审查结论
| 文件 | 结论 |
|---|---|
examples/add_example/op_kernel/add_example_tiling_data.h |
无问题 — #ifndef/#define 宏名从 _ROTARY_POSITION_EMBEDDING_GRAD_TILING_DATA_H_ 正确修改为 _ADD_EXAMPLE_TILING_DATA_H_,首尾一致。 |
examples/add_example_aicpu/op_graph/add_example_proto.h |
发现 1 个 P3 问题 — #ifndef/#define 宏名已正确修改为 OPS_OP_PROTO_INC_AddEXAMPLEAICPU_H_,但末尾 #endif 注释未同步更新,仍保留旧宏名。 |
整体风险判断:此变更风险极低。两个文件的 include guard 宏名修改本身准确完成了 Issue #1616 的要求,消除了与其他算子文件宏名冲突的隐患。仅存在一处 #endif 注释未同步更新的微小瑕疵,不影响编译和运行。
⚠️ 已识别出整体风险,但无法提取行内评论,请参考整体评估。


6月30日 添加了label:ci-pipeline-running
CANN-robot
6月30日 评论:
6月30日 评论:
流水线任务触发成功
任务链接 [12af90988718441897f0d15e8791f5e5][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 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 | >>>>> | >>>>> |
| Compile_harmony-infer-chs-math | ✅ SUCCESS | >>>>> | |
| UT_Test | ✅ SUCCESS | ||
| UT_Test_experimental | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |
[2026-06-30 09:58:28] CI执行结束


CANN-robot
6月30日 评论:
6月30日 评论:
流水线任务触发成功
任务链接 [e1f8cac776f940c49f86840e7d1eabdd][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 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 | ✅ SUCCESS | >>>>> |
[2026-06-30 09:57:34] CI执行结束


6月30日 添加了label:api-check-pass
6月30日 删除了label:ci-pipeline-running
6月30日 添加了label:ci-pipeline-passed
6月30日 添加了label:lgtm
zhanw_coding
6月30日 评论:
6月30日 评论:
/lgtm
/approve


wangyongguang
6月30日 评论:
6月30日 评论:
/approve


6月30日 添加了label:approved
6月30日 合入了pull request
修复内容
修复 issue #1616 中反馈的头文件 include guard 宏名错误:
add_example_tiling_data.h:include guard 从
_ROTARY_POSITION_EMBEDDING_GRAD_TILING_DATA_H_(从其他算子拷贝未修改)改为_ADD_EXAMPLE_TILING_DATA_H_add_example_aicpu/op_graph/add_example_proto.h:include guard 从
OPS_OP_PROTO_INC_AddEXAMPLE_H_改为OPS_OP_PROTO_INC_AddEXAMPLEAICPU_H_,避免与add_example版本两个不同算子使用相同 include guard 导致冲突涉及文件
Closes #1616