Pull Request已成功合入, 合并人@CANN-robot
(感谢 SimonZzz 的贡献)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_host/*_def.cpp | ✅ tang-lei01, wangyongguang (2/2) | ✅ wangyongguang (1/1) |
| index | ✅ wangyongguang, tangweiwei2 (2/2) | ✅ wangyongguang, tangweiwei2 (2/1) |
| pooling | ✅ wangyongguang, tangweiwei2 (2/2) | ✅ wangyongguang, tangweiwei2 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


问题/功能描述
本次PR对MaxPoolWithArgmax算子及其V3版本的C++实现文件进行了代码风格与类型安全性的优化。核心目标是统一将多处C风格的reinterpret_cast指针类型转换替换为更安全、意图更明确的C++风格static_cast,以提升代码的健壮性、可读性,并消除潜在的未定义行为风险。
修改方案描述
修改涉及max_pool_with_argmax_infershape.cpp、max_pool_with_argmax_tiling_base.cpp及max_pool_with_argmax_v3_infershape.cpp三个文件。具体方案是将从通用数据结构(如ContinuousVector)中获取的ksize、strides、pads等属性数据的指针,以及特定的编译信息指针,统一由reinterpret_cast改为使用static_cast进行类型转换。此修改确保了转换在编译时得到更严格的类型检查,符合C++最佳实践,同时保持了所有功能逻辑完全不变。


🔵 source code change are detected, tasks labels is removed in this pull request!


流水线任务触发成功 [流水线指导]
任务链接 [ca1a2b68ba8c45f0b2b6fda6e9ec83e2]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ 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 | >>>>> | >>>>> |
| API_Check | ✅ SUCCESS | >>>>> | |
| Pre_Compile | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| Smoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-02-13 16:08:58] CI执行结束


🔵 source code change are detected, tasks labels is removed in this pull request!


🔵 source code change are detected, tasks labels is removed in this pull request!


🔵 source code change are detected, tasks labels is removed in this pull request!


流水线任务触发成功 [流水线指导]
任务链接 [e8b2b74715e94edfa4148183c30fae74]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ 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 | >>>>> | >>>>> |
| API_Check | ⚠️ WARNING | >>>>> | |
| Pre_Compile | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| Smoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-02-14 11:04:59] CI执行结束


/approve


/approve
/lgtm


/lgtm


Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: tangweiwei2, wangyongguang.
Reviewers who wrote a comment of /lgtm are: wangyongguang, tang-lei01, tangweiwei2.


描述
修改embeddingBag、maxPoolWithArgmax、maxPoolWithArgmaxV3、maxPoolGradWithArgmax、maxPool3DGradWithArgmax、MaxPoolV3、MaxPoolV2、MaxPool3D、MaskScatterWithPosition编译告警
关联的Issue
https://gitcode.com/cann/ops-nn/issues/1087
测试
本地测试通过,冒烟已过
文档更新
类型标签