已合并
refactor: 统一 soc version chipType 获取链路 #1795
daijinling创建于 4月24日
refactor: 统一 soc version chipType 获取链路 #1795
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 daijinling 的贡献)4月24日 创建了 pull request,commit 77f4083a
4月24日 添加了label:stat/needs-squash
CANN-robot
4月24日 评论:
4月24日 评论:
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 |
|---|---|---|
| src/platform | ✅ shikai-1, 卢煜坤, 王涛 (3/2) | ✅ shikai-1 (1/1) |
| src/runtime | ✅ 王涛, 卢煜坤 (2/2) | ✅ 王涛, 卢煜坤 (2/1) |
| src/runtime/cmake/runtime.cmake | ✅ 王涛, 卢煜坤 (2/2) | ✅ 王涛, 卢煜坤 (2/1) |
| src/runtime/config | ✅ 卢煜坤, 王涛 (2/2) | ✅ 王涛, 卢煜坤 (2/1) |
| tests/ut/runtime | ✅ 王涛, 卢煜坤 (2/2) | ✅ 王涛, 卢煜坤 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
daijinling, thanks for your pull request. All authors of the commits have signed the CLA. 👍


4月24日 添加了label:cann-cla/yes
4月24日 将zhaozhixuan,wda1991,wangtao43,zhangpengpeng8,changhaixun,yanmingxiang,turing_yhy,Reyn52166,gcw_9B2nSsjo,luoyuzhou2,Turing_JasonWen,shikai-1,Axiaolei,ykl999,sunnana_004434229,houyanbao,wangluyao17,zhou-wuxiao,tingwood设为评审人
4月24日 将zhaozhixuan,wda1991,wangtao43,zhangpengpeng8,changhaixun,yanmingxiang,turing_yhy,Reyn52166,gcw_9B2nSsjo,luoyuzhou2,Turing_JasonWen,shikai-1,Axiaolei,ykl999,sunnana_004434229,houyanbao,wangluyao17,zhou-wuxiao,tingwood设为评审人
此处折叠了209条消息 查看更多
ykl999
5月13日 评论:
5月13日 评论:
/lgtm
/approve


5月13日 添加了label:lgtm
5月13日 合入了pull request
描述
本次改动统一了 Runtime 中
socVersion -> chipType的获取链路,将原先依赖各平台dev_info_reg.cc静态注册表的方式,迁移为从平台 ini 配置[version]段的Chip_type字段读取。主要改动包括:
GetChipTypeFromPlatform接口,通过PlatformManagerV2::GetSocSpec读取并解析Chip_type,同时补充空指针、字段缺失、非法值和越界等异常校验。rtSetSocVersion,使用平台配置获取chipType,移除对SOC_INFO注册表的依赖,并保留硬件 SoC 版本一致性校验和设备属性更新逻辑。halGetSocVersion成功返回有效socVersion时,直接从平台配置获取chipType;在旧硬件版本路径中保留 legacy fallback。DevInfoManage中不再使用的socInfo/devInfo注册、批量注册、查询接口及相关容器和锁,删除各平台BATCH_REGISTER_DEV_INFO、BATCH_REGISTER_SOC_INFO相关注册数据。[version]段的Chip_type字段,使chipType映射归一到配置文件。关联的Issue
https://gitcode.com/cann/runtime/issues/431
测试
新增/更新了
GetChipTypeFromPlatform、rtSetSocVersion、Runtime 初始化及DevInfoManage相关 LLT 用例,覆盖Chip_type获取成功、字段缺失、非法值、越界、查询失败、空指针输入以及硬件 SoC 版本不一致等场景。文档更新
新增
docs/runtime_soc_version_chiptype_refactor_design.md,说明 SoC Version / ChipType 重构背景、目标、总体方案、接口改造、初始化流程、配置迁移、测试适配和风险分析。类型标签