Merged
fix(aicpu): 补充5处成员函数const修饰(G.CNS.03残留) #5897
liu-weiAdd on Sep 21
fix(aicpu): 补充5处成员函数const修饰(G.CNS.03残留) #5897
Merged
Pull Request has been successfully merged by CANN-robot.
(Thank you for liu-wei's contribution.)Sep 21 Associated issue: [Requirement|需求建议]: 清理 strided_slice AICPU 有符号数位运算告警(G.EXP.27 ×4)
atomgit-bot
Sep 21 Comments:
Sep 21 Comments:
变更摘要
本 PR 属于代码清理类型,针对 G.CNS.03 告警的残留项,为 5 处不修改成员变量的成员函数补充 const 修饰,涉及 conversion/strided_slice_v2、conversion/trans_data、math/mul、math/real_div 四个 AICPU 算子模块。每处修改均同步更新头文件声明与 .cpp 定义,以保证签名一致。根据 PR 描述,被修饰函数的依赖成员均已为 const 或为自由函数,二进制对比结果显示除符号修饰名由 _ZN 变为 _ZNK 外无其他差异,属于零功能影响的接口规范化。
主要改动
StridedSliceV2CpuKernel::CheckParam增加const: 在strided_slice_v2_aicpu.h声明与strided_slice_v2_aicpu.cpp定义中同步为该私有成员函数补充const修饰。TransDataCpuKernel::DealData模板函数增加const: 在trans_data_aicpu.h声明与trans_data_aicpu.cpp定义中同步为模板成员函数DealData补充const。TransDataCpuKernel::PaddingTwo增加const: 同步修改trans_data_aicpu.h声明与trans_data_aicpu.cpp定义,为该成员函数补充const。MulCpuKernel::MulSameTypeCompute增加const: 在mul_aicpu.h声明与mul_aicpu.cpp定义中同步补充const。RealDivKernel::RealDivSameTypeCompute增加const: 在real_div_aicpu.h声明与real_div_aicpu.cpp定义中同步补充const。


Incorrect?
atomgit-bot
Sep 21 Comments:
Sep 21 Comments:
Sep 21 Added label: cann-cla/yes
CANN-robot
Sep 21 Comments:
Sep 21 Comments:
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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| conversion/trans_data | ✅ 王瑞, yue-ma (2/2) | ✅ 王瑞, yue-ma (2/1) |
| math/mul | ✅ 王瑞, yue-ma (2/2) | ✅ 王瑞, yue-ma (2/1) |
| math/real_div | ✅ 王瑞, yue-ma (2/2) | ✅ 王瑞, yue-ma (2/1) |
| repo-cann/ops-math | ✅ yue-ma, 王瑞 (2/2) | ✅ yue-ma, 王瑞 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
liu-wei, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Sep 21 Set FelixTang7,yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,xuejinghui,zhanw_coding as approver
Sep 21 Set FelixTang7,yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,xuejinghui,zhanw_coding as approver
Sep 21 Set FelixTang7,yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,xuejinghui,zhanw_coding as approver
Sep 21 Set FelixTang7,yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,xuejinghui,zhanw_coding as approver
Sep 21 Modify description of pull request
liu-wei
Sep 21 Comments:
Sep 21 Comments:
compile


Sep 21 Pre merge succeeded (commit_id: 5327625e33498660cea05b52aa8926ed0e8b514b)
CANN-robot
Sep 21 Comments:
Sep 21 Comments:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


Sep 21 Added label: ci-pipeline-running
Sep 21 Removed label: ci-pipeline-running
Sep 21 Added label: ci-pipeline-passed
Sep 21 Added label: approved
Sep 21 Added label: lgtm
Sep 21 Merged pull request
描述
修复 5 条 G.CNS.03 告警(不修改成员变量的成员函数应使用 const 修饰),共 8 个文件 +10/-10,声明与定义同步修改:
CheckParam补充const(4 个被调成员均已为 const)DealData/PaddingTwo补充const(依赖均为已 const 成员或自由函数)RealDivSameTypeCompute补充const(依赖RealDivCompute已 const)MulSameTypeCompute补充const(依赖MulCompute已 const)未包含项
DispatchDealDataG.CNS.04 ×3:维持 PR #5856 的误报结论(aicpu::PtrToPtr<void, T>无 const 重载,且output_data_temp确实被写入,不可 const);验证
b7b3d0278vs 本提交b51424f97,同编译参数 g++ -O2 -std=c++14):4 个改动 TU 的全部非符号节(共 4598 节,含 trans_data 中 3 个DealData模板实例化节与 1 个字符串常量节的_ZN→_ZNK重命名配对比对)逐字节相同;_ZN→_ZNK,含_GLOBAL__sub_I辅助符号名内嵌变化),未定义符号集合一致——零功能影响;关联的Issue
https://gitcode.com/cann/ops-math/issues/3272
类型
🧹 代码清理