Pull Request已成功合入, 合并人@CANN-robot
(感谢 liu-wei 的贡献)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 |
|---|---|---|
| math/greater_equal | ✅ 王瑞, xuejinghui (2/2) | ✅ xuejinghui, 王瑞 (2/1) |
| math/tile | ✅ xuejinghui, 王瑞 (2/2) | ✅ xuejinghui, 王瑞 (2/1) |
| repo-cann/ops-math | ✅ xuejinghui, 王瑞 (2/2) | ✅ xuejinghui, 王瑞 (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. 👍


🔴 Critical | 这里把 input_data_temp 改成 const void* 后,下面仍调用 aicpu::PtrToPtr<void, T>(input_data_temp)。当前 AICPU 公共头 utils/kernel_util.h 里的 PtrToPtr 只有 TI* const 入参版本,没有 const TI* 重载;const void* 传入会丢 const,C++ 编译会报 no matching function / would lose const qualifier。建议这里改为 PtrToPtr<const void, const T>(input_data_temp),或不要把 input_data_temp 改为 const void*。


changed this line on 22d57055 view diff detail
PR 功能风险复检总结
PR: #5856 — [Fix] AICPU 算子代码规范告警清理
复检 head: 766e9fe8dcdc5e78a740f0acaeb0e8cb1bfbdc21
结论: 需要修改后再合入。
发现 1 个确定性编译问题,已发布 inline 评论:conversion/trans_data/op_kernel_aicpu/trans_data_aicpu.cpp 中 DispatchDealData 入参改为 const void*,但仍使用 aicpu::PtrToPtr<void, T>(input_data_temp)。当前 AICPU 公共头 utils/kernel_util.h 仅提供 TI* const 版本,没有 const TI* 重载,const void* 传入会丢 const 导致编译失败。
其余变更点如 const 成员函数补充、指针 const 修饰、bit mask 显式布尔比较、格式调整等,静态复查未发现功能逻辑变化。
本地验证: PR 范围 git diff --check 通过;使用最小 C++ 片段验证 const void* 调用 PtrToPtr<void, T> 会报 would lose const qualifier。未执行完整编译/UT。


compile


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


PR 功能风险复检总结
PR: #5856 — [Fix] AICPU 算子代码规范告警清理
复检 head: 29d54eb3d11e2337b1bb96faea9957b08d051f79
结论: ✅ 当前未发现可证明的功能或编译问题。
本轮相比上一轮已更新,TransDataCpuKernel::DispatchDealData 的 input_data_temp 已恢复为 void*,此前 const void* 调用 PtrToPtr<void, T> 导致的确定性编译问题已消除;当前 PR 文件列表也不再包含 conversion/trans_data 和 conversion/strided_slice。
当前剩余改动主要为:
greater_equal指针声明风格调整,语义等价;tile的GetMultiplesValue补const,实现未改;top_k_pq_distance的MakeHeap/SortHeap补const,PopHeap参数补顶层 const,堆逻辑未改;top_k_v2_d的DispatchByDtype补const,分派逻辑未改。
验证:当前 PR 范围 git diff --check 通过。未执行完整编译/UT,最终仍建议以 CI 编译和相关 AICPU UT 为准。


compile


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


/lgtm
/approve


告警清理
修复 6 条代码规范告警(G.FMT.14 / G.CNS.03 / G.FUN.02),共 7 个文件 +10/-10:
char const*统一为const char*风格(同一类型,纯风格修正)GetMultiplesValue补充const修饰PopHeap定义补充* const与声明一致MakeHeap/SortHeap补充const修饰DispatchByDtype补充const修饰未包含项(与初版正文的差异说明)
strided_slice的 G.EXP.27 ×4(有符号数位运算 UB)不在本 PR 范围,将另行跟进修复trans_data的 G.CNS.04 ×2 为误报:DispatchDealData的参数经aicpu::PtrToPtr写入,AICPU 公共头无 const 重载,加const编译失败(初版曾尝试修改,复检确认编译问题后已回退)关联的Issue
https://gitcode.com/cann/ops-math/issues/3268
验证
_ZN→_ZNK)及符号表/重定位元数据变化,均为 private 成员、无外部 ABI 影响——零功能影响类型
🧹 代码清理