已合并
增加sparseaply算子宏保护,防止冲突 #8484
李鑫创建于 13 天前
增加sparseaply算子宏保护,防止冲突 #8484
已合并
李鑫创建于 13 天前
李鑫
李鑫成员
13 天前

描述

增加sparseaply算子宏保护,防止冲突

关联的Issue

测试

无业务代码修改,geir测试通过,冒烟通过

文档更新

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 李鑫 的贡献)
李鑫李鑫成员
13 天前 创建了 pull request,commit 871fc8e4
atomgit-bot
atomgit-bot
13 天前 评论:

变更摘要

此变更对三个稀疏优化算子(SparseApplyFtrlV2SparseApplyProximalAdagradSparseApplyRMSProp)的头文件增加了 #ifndef/#define/#endif 宏保护,防止这些头文件被多次包含时 REG_OP 宏重复注册算子而导致编译或链接冲突。

主要改动

  • sparse_apply_ftrl_v2_proto.h 添加头文件保护宏:在 REG_OP(SparseApplyFtrlV2) 前后添加 #ifndef/#define OPS_PROTO_DEF_SPARSEAPPLYFTRLV2#endif,防止 SparseApplyFtrlV2 算子重复注册。
  • sparse_apply_proximal_adagrad_proto.h 添加头文件保护宏:在 REG_OP(SparseApplyProximalAdagrad) 前后添加 #ifndef/#define OPS_PROTO_DEF_SPARSEAPPLYPROXIMALADAGRAD#endif,防止 SparseApplyProximalAdagrad 算子重复注册。
  • sparse_apply_rms_prop_proto.h 添加头文件保护宏:在 REG_OP(SparseApplyRMSProp) 前后添加 #ifndef/#define OPS_PROTO_DEF_SPARSEAPPLYRMSPROP#endif,防止 SparseApplyRMSProp 算子重复注册。
likedislike
atomgit-bot
atomgit-bot
13 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
13 天前 评论:

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 汤磊, 王永光 (2/2) 汤磊, 王永光 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

lixin433, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
13 天前 将zengjuan,chaotang233,crystalhu,yangyang016,fanqirui,tang-lei01,chenqi317,liubo75,tangweiwei2,pingchuantang,wangyongguang设为评审人
CANN-robotCANN-robot成员
13 天前 将tang-lei01,wangyongguang设为审查人
李鑫李鑫成员
13 天前 修改了pull request 的描述
李鑫李鑫成员
13 天前 修改了pull request 的描述
李鑫
李鑫成员
13 天前 评论:

compile

likedislike
李鑫李鑫成员
13 天前 update merge request[project id: 7665709, iid: 8484, commit_id: 69e7a48c4414d2caf6ff99d5277ed9fadd5e710d] virtual merging success
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [1fd90909f7d545ee992ce4d3ce518c7c][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>

[2026-08-10 17:19:18]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [7fd2903e2a334ac3ad4ee87517e48ea1][流水线指导]

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ❌ FAILED >>>>> >>>>>
SCA ✅ SUCCESS >>>>>
likedislike
李鑫李鑫成员
13 天前 update merge request[project id: 7665709, iid: 8484, commit_id: 7373ace0114d983cb5a6587c19c58eb227586b15] virtual merging success
李鑫李鑫成员
13 天前 强制推送  1 个提交:03493eef-增加sparseaply算子宏保护,防止冲突
李鑫李鑫成员
13 天前 update merge request[project id: 7665709, iid: 8484, commit_id: 6fe4ffedfe6d53d492efb0d916c28de603f531dd] virtual merging success
CANN-robotCANN-robot成员
13 天前 删除了label:cann-cla/yes
CANN-robotCANN-robot成员
13 天前 添加了label:cann-cla/yes
李鑫
李鑫成员
13 天前 评论:

compile

likedislike
李鑫李鑫成员
13 天前 update merge request[project id: 7665709, iid: 8484, commit_id: d1ca8d6fdd2ea79ef306965b9a0e03ef0b9e83bb] virtual merging success
CANN-robotCANN-robot成员
13 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-failed
CANN-robotCANN-robot成员
13 天前 删除了label:ci-pipeline-failed
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [a54731d1947749d1b39f4822d5655ab6][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_harmony-infer-chs-nn ✅ SUCCESS
UT_Test_harmony-infer-chs-nn-1 ✅ SUCCESS
UT_Test_harmony-infer-cpro-nn ✅ SUCCESS
UT_Test_report_lcov ⚠️ WARNING >>>>>

[2026-08-10 17:35:34]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [e5ae934d78be477cae90d0ff7626b515][流水线指导]

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-08-10 17:21:36]    CI执行结束

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:api-check-pass
CANN-robotCANN-robot成员
13 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-passed
李鑫李鑫成员
12 天前 修改了pull request 的描述
tang-lei01成员
12 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
12 天前 添加了label:approved
wangyongguang成员
12 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
12 天前 添加了label:lgtm
CANN-robotCANN-robot成员
12 天前 合入了pull request