Merged
feat(platform): Modify Platform config #6227
niulinkaiAdd on Sep 12
feat(platform): Modify Platform config #6227
Merged
Merged from2501_92924845/pyptosfplatformintocann/pypto9.2.0
Pull Request has been successfully merged by CANN-robot.
(Thank you for niulinkai's contribution.)Sep 12 Added label: cann-cla/yes
CANN-robot
Sep 12 Comments:
Sep 12 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 |
|---|---|---|
| CMakeLists.txt | ✅ 尹杰, zhangyuebing (2/2) | ✅ 尹杰 (1/1) |
| framework/include/tilefwk | ✅ 尹杰, zhangyuebing (2/2) | ✅ 尹杰 (1/1) |
| framework/src/cost_model | ✅ 尹杰, zhangyuebing (2/2) | ✅ 尹杰 (1/1) |
| framework/src/interface/configs | ✅ 尹杰, zhangyuebing (2/2) | ✅ 尹杰 (1/1) |
| framework/src/platform | ✅ zhangyuebing, 尹杰 (2/2) | ✅ zhangyuebing, 尹杰 (2/1) |
| repo-cann/pypto | ✅ zhangyuebing, 尹杰 (2/2) | ✅ zhangyuebing, 尹杰 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
2501_92924845, thanks for your pull request. All authors of the commits have signed the CLA. 👍


CANN-robot
Sep 12 Comments:
Sep 12 Comments:
Sep 12 Set xinweiliu,cam_bxh,dai-zhentao,lululu40888,shi-dingkun,gguuaanngg,codehjp423,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,WenboCodes as approver
Sep 12 Set xinweiliu,cam_bxh,dai-zhentao,lululu40888,shi-dingkun,gguuaanngg,codehjp423,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,WenboCodes as approver
7 event messages are collapsed here。 See more
Sep 12 Associated issue: [Task|任务跟踪]: Platform概念规范化,消除一些特有名词
niulinkai
Sep 12 Comments:
Sep 12 Comments:
compile


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


Sep 12 Added label: ci-pipeline-running
Sep 12 Removed label: ci-pipeline-running
Sep 12 Added label: ci-pipeline-passed
Jie Yin
Sep 12 Comments:
Sep 12 Comments:
/approve


Sep 12 Added label: approved
Sep 12 Modify description of pull request
zhangyuebing
Sep 12 Comments:
Sep 12 Comments:
/approve


zhangyuebing
Sep 12 Comments:
Sep 12 Comments:
/lgtm


Sep 12 Added label: lgtm
Sep 12 Merged pull request
背景:
原始的platform信息并沿用了机器层面命名。
本 PR 对平台配置域做概念规范化,统一到三个标准概念:
soc_series:原 short_soc_version(ini 键 Short_SoC_version),如 Ascend950;
soc_version:芯片分 bin(ini 键 SoC_version,每个 soc_version 一个 ini 文件),如 Ascend950PR_9589;
NPU_ARCH:核架构名称(ini 键 NpuArch),如 3510/2201。
A2/A3/A5 属于整机(chip + host CPU/网卡/机箱)层面的机器概念,不再用于平台配置选择。
Changes:
platform_config 精简为实际交付的 13 个 soc_version ini(69 -> 13),规格与 CANN 9.2.0
包内文件一致;Ascend910_9363、Ascend950DT_9581X 按交付需求保留
DPlatform 枚举适配真实 soc_version,不再自定义枚举值:删除与实际芯片不符的
ASCEND_950DT_9579/ASCEND_950PR_9582(对应真实 bin 为 Ascend950DT_9572/Ascend950PR_9589),
补充 ASCEND_910_9363/ASCEND_950DT_9581X
platform.h 新增 DPlatformToNPUArch(),统一 soc_version -> NPU_ARCH 映射
(910B 系列 -> 2201,950 系列 -> 3510,Kirin -> 3113/3003)
GetCyclesForPass 仿真器选择改为按 NPU_ARCH 判断(3510 -> "A5",其余 -> "A2A3"),
不再按 A2A3/A5 机器名前缀匹配;A2A3/A5 仅作为 cost model 内部实现类型名保留
默认 device_platform 统一为标准格式 Ascend910B2(config_manager.h / tile_fwk_config.json)
CMakeLists 安装清单与交付 ini 清单保持一致
UT 同步更新:枚举映射、legacy 格式兼容、NPU_ARCH 映射、ini 规格加载用例,
新增 Ascend910_9363 / Ascend950DT_9581X 用例
兼容性:
旧格式 device_platform(如 "ASCEND_910B2")仍可识别,自动归一化为标准 soc_version 并打印告警;
其中 ASCEND_950DT_9579 -> Ascend950DT_9572、ASCEND_950PR_9582 -> Ascend950PR_9589,
与其原先实际加载的 ini 规格保持一致
ASCEND_910C4 为无效值,回落默认 Ascend910B2(与原行为一致)
Tests:
TestDevicePlatformConfig(16 例)、TestConfigManager、CostModelTest 相关用例全部通过;