已合并
ClipByNormNoDivSum 算子原型增加去重宏保护 #4544
songkai111创建于 3 天前
ClipByNormNoDivSum 算子原型增加去重宏保护 #4544
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 songkai111 的贡献)3 天前 创建了 pull request,commit f3c4c1ee
atomgit-bot
3 天前 评论:
3 天前 评论:
变更摘要
此 PR 为 ClipByNormNoDivSum 算子原型增加去重宏保护,防止该算子原型在多个翻译单元中被重复定义而导致编译错误。改动仅在 clip_by_norm_no_div_sum_proto.h 文件中添加了一对 #ifndef/#define/#endif 头文件保护宏。
主要改动
- 新增头文件去重宏保护: 在
REG_OP(ClipByNormNoDivSum)算子注册代码块前后添加#ifndef OPS_PROTO_DEF_CLIPBYNORMNODIVSUM/#define OPS_PROTO_DEF_CLIPBYNORMNODIVSUM和#endif,确保该算子原型在多处包含时仅被定义一次。


atomgit-bot
3 天前 评论:
3 天前 评论:
3 天前 添加了label:cann-cla/yes
CANN-robot
3 天前 评论:
3 天前 评论:
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 | ✅ 王永光, 汤平川, 张磊 (3/2) | ✅ 王永光 (1/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. 👍


3 天前 将zhou-qilong,wangrui_,rxtfeng,loov1,tang-lei01,zhangzijie,jia0liang,zl_hw,pingchuantang,llimwang,gubaocheng,andong_hw,wangyongguang,xuejinghui,zhanw_coding设为评审人
3 天前 将zhou-qilong,wangrui_,rxtfeng,loov1,tang-lei01,zhangzijie,jia0liang,zl_hw,pingchuantang,llimwang,gubaocheng,andong_hw,wangyongguang,xuejinghui,zhanw_coding设为评审人
3 天前 将tang-lei01,wangyongguang设为审查人
songkai111
3 天前 评论:
3 天前 评论:
compile


Ssongkai111
3 天前 update merge request[project id: 7649531, iid: 4544, commit_id: 4b652ead94fe36a0a13d26b1de99dc39523c2a94] virtual merging success
3 天前 update merge request[project id: 7649531, iid: 4544, commit_id: 4b652ead94fe36a0a13d26b1de99dc39523c2a94] virtual merging success
3 天前 添加了label:ci-pipeline-running
CANN-robot
3 天前 评论:
3 天前 评论:
流水线任务触发成功
任务链接 [9477d416ad4d48ab9835f6f0d8f439ff][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_harmony-infer | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_A5_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_9030_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test | ✅ SUCCESS | ||
| UT_Test_experimental | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> | |
| UT_Test_harmony-infer-chs-math | ✅ SUCCESS | ||
| UT_Test_harmony-infer-cpro-math | ✅ SUCCESS |
[2026-08-10 23:09:44] CI执行结束


CANN-robot
3 天前 评论:
3 天前 评论:
流水线任务触发成功
任务链接 [2eeabb64e8df40ad8c9e6bf865cc84ee][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_precommit | ✅ SUCCESS | >>>>> |
[2026-08-10 22:59:43] CI执行结束


3 天前 添加了label:api-check-pass
3 天前 删除了label:ci-pipeline-running
3 天前 添加了label:ci-pipeline-passed
TangPC
1 天前 评论:
1 天前 评论:
/lgtm
/approve


1 天前 添加了label:lgtm
wangyongguang
1 天前 评论:
1 天前 评论:
/approve


1 天前 添加了label:approved
1 天前 合入了pull request
1 天前 修改了pull request 的描述
描述
为 ClipByNormNoDivSum 算子原型增加去重宏保护:
clip_by_norm_no_div_sum_proto.h中REG_OP(ClipByNormNoDivSum)外层增加#ifndef OPS_PROTO_DEF_CLIPBYNORMNODIVSUM/#define OPS_PROTO_DEF_CLIPBYNORMNODIVSUM/#endif守卫,避免多仓组合编译或头文件交叉包含场景下REG_OP重复展开导致算子重复注册、引发编译/链接冲突。关联的Issue
测试
文档更新
无
类型标签