Pull Request已成功合入, 合并人@CANN-robot
(感谢 li-xingyue-lxy 的贡献)代码审查
我已经对唯一的变更文件 include/utils/tiling/platform/platform_ascendc.h 进行了彻底的审查,现在让我做一个最终分析。
让我确认一下旧代码和新代码中各枚举值的分布:
旧代码中 ASCEND350 的位置(原有第66行):
ASCEND950= 4ASCEND350= 5ASCEND910_55= 6ASCEND910_95 = ASCEND950→ 计数器重置为 4AS31XM1= 5 ← 与 ASCEND350 冲突!重复值 5
新代码中 ASCEND350 的位置(第85行):
MC32DM11A= 21ASCEND350= 22 ← 唯一值,无冲突RESERVED_VERSION = 99999
此变更将 ASCEND350 从原来与 AS31XM1 产生重复枚举值(5)的位置,移动到枚举末尾的独立位置(22),修复了重复枚举值的问题。所有对 SocVersion::ASCEND350 的引用都是符号化比较(如 == platform_ascendc::SocVersion::ASCEND350),因此底层整数值的变化在重新编译后是透明的,不会导致运行时行为异常。
context_builder.cpp 和 ascendc_runtime.cpp 中各自维护了独立的 SocVersion 枚举,与头文件中的枚举位于不同命名空间,互不影响。platform_ascendc.cpp 中的 convertMap 使用符号名映射,也不受底层整数值变化影响。
审查结论
审查的变更文件:
include/utils/tiling/platform/platform_ascendc.h— 没有问题
发现统计:
- P0: 0
- P1: 0
- P2: 0
- P3: 0
总体风险评估: 该变更是安全的。它将 ASCEND350 从枚举中间位置(与 AS31XM1 产生重复值 5)移动到末尾位置(独立值 22),修复了重复枚举值的问题。所有调用点均使用符号化枚举比较,重新编译后不会产生回归。
⚠️ 已识别出整体风险,但无法提取行内评论,请参考整体评估。


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 |
|---|---|---|
| include/utils | ✅ wuzhaolin, wuyang_hw (2/2) | ✅ wuzhaolin (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
li-xingyue-lxy, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


li-xingyue-lxy,感谢您的提交,建议在完成PR充分自验证后,再触发线上构建任务。
若您的PR已具备检视条件,可根据下表的责任田,@对应的committer进行代码检视,我们会在第一时间对您的提交进行处理。
代码责任田:
| module | committer |
|---|---|
| adv_api | chenyiyuan, wuyang_hw |
| basic_api | chenyiyuan, wuyang_hw |
| c_api | pangfd, haipingmao |
| cmake | xun_zhuge, DragonBornHD84 |
| docs | munanhw, ai_xin |
| examples | changxianyu, bianque |
| simt_api | wulinyu, zhanghao_0689 |
| scripts | xun_zhuge, kevin365 |
| tools | YANXI_ZHAO, XuebinYang, sjtulxh |
💡 如您不确定可以@谁,可以直接@我或者ascend-c sig的maintainer,xun_zhuge和ascendhjh,我们会为您分配合适的committer进行代码检视。
再次感谢您参与CANN的社区贡献。


流水线任务触发成功
任务链接 [60ad5e4fc1164b179265b2eccd651d8b][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> |
[2026-07-20 19:18:25] CI执行结束


流水线任务触发成功
任务链接 [8d3fa436e1574a9a93fb5b0297ef4686][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-07-20 19:25:09] CI执行结束


流水线任务触发成功
任务链接 [48b235461e1d4e20a52d7544418807bb][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_adv_test_one | ✅ SUCCESS | ||
| UT_Test_adv_test_two | ✅ SUCCESS | ||
| UT_Test_basic_test_one | ✅ SUCCESS | ||
| UT_Test_basic_test_two | ✅ SUCCESS | ||
| UT_Test_basic_test_three | ✅ SUCCESS | ||
| UT_Test_basic_test_four | ✅ SUCCESS | ||
| UT_Test_basic_test_five | ✅ SUCCESS | ||
| UT_Test_arm | ✅ SUCCESS | ||
| API_Check | ✅ SUCCESS | >>>>> | |
| UT_Test_report | ✅ SUCCESS | >>>>> |
[2026-07-20 19:28:02] CI执行结束


描述
SocVersion枚举类中ASCEND350添加位置挪到RESERVED_VERSION前
关联的Issue
关联Issue #1290
测试
冒烟自验证
文档更新
不涉及
类型标签