Pull Request已成功合入, 合并人@CANN-robot
(感谢 liu-wei 的贡献)变更摘要
本 PR 是 ops-nn AICPU 算子告警整改的第二批,主要围绕三类静态检查告警进行重构与代码清理:将类型转换从 reinterpret_cast 统一替换为 PtrToPtr,为派生类析构函数补充 override,并将 lambda 的默认捕获改为显式捕获。涉及 scatter_nd_min、scatter_nd_max、sparse_segment_sum、sparse_to_dense、sparse_fill_empty_rows、log_softmax_v2、index_to_addr 等算子,属于不改变外部行为的等价改写。
主要改动
reinterpret_cast替换为PtrToPtr: 在scatter_nd_min、scatter_nd_max、sparse_segment_sum、sparse_to_dense、sparse_fill_empty_rows中将输入/输出及索引张量的裸指针转换改为PtrToPtr<void, T>,对应 G.EXP.15 告警整改。- 析构函数补充
override: 在index_to_addr_aicpu.h中为IndexToAddrCpuKernel的析构函数加上override,对应 G.CLS.12 告警整改。 - lambda 默认捕获改为显式捕获: 在
log_softmax_v2的ComputeSequential、ComputeParallel及scatter_nd_max的copy_output_shard中,将[&]改为显式列出所捕获的变量,对应 G.RES.06 告警整改。 - 宏与代码格式调整: 调整
DO_SCATTER_ND_MAX_COMPUTE_CASE、DO_SCATTER_ND_MIN_COMPUTE_CASE宏定义的缩进对齐,并整理部分KERNEL_CHECK_FALSE调用与三元表达式的换行排版。


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 |
|---|---|---|
| activation | ✅ 陈展熹, 陈琦 (2/2) | ✅ 陈展熹 (1/1) |
| index | ✅ 陈展熹, 陈琦 (2/2) | ✅ 陈展熹 (1/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. 👍


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: 陈琦


描述
ops-nn AICPU算子告警整改第二批,修复3类告警。
改动内容
关联的Issue
https://gitcode.com/cann/ops-nn/issues/5951
测试
类型标签