Merged
fix(bias): remove hardcoded SoC from GEIR example #6999
fix(bias): remove hardcoded SoC from GEIR example #6999
Merged
raoliang_sacAdd on 8 days ago
raoliang_sacCollaborators
8 days ago

描述

Bias 图模式示例将 ge.socVersion 固定为 Ascend950DT_9592,在实际型号为 Ascend950PR_9579 的设备上会因型号不匹配导致 GE 初始化失败。

移除这项硬编码配置,由 GE/Runtime 获取运行环境的实际 SoC,保持与仓库其他在线图模式示例一致。

关联的Issue

https://gitcode.com/cann/ops-math/issues/4400

测试

  • Ascend950PR_9579,CANN 包时间戳 20260923_000324205(version.info:9.2.0),Python 3.12.9。
  • 执行 bash build.sh --run_example bias graph --example_name=bias --soc=ascend950 -j8,退出码 0。
  • 日志确认运行时识别 Ascend950PR_9579,图执行成功,示例输出校验通过:Bias GEIR example run success, outputs=1。
  • git diff --check 通过。本次验证为示例构建与上板执行,未运行全量本地 CI。

文档更新

无需更新。

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for raoliang_sac's contribution.)
Rraoliang_sacCollaborators
8 days ago Created pull request, commit 6ca3169f
atomgit-bot
atomgit-bot
8 days ago Comments:

变更摘要

本 PR 针对 Bias 图模式示例 test_geir_bias.cpp 中硬编码 SoC 版本导致 GE 初始化失败的问题,移除了传给 ge::GEInitialize 的全局配置项 ge.socVersion,改由 GE/Runtime 自动获取运行环境的实际 SoC 型号,使示例在不同昇腾型号设备上均可正常初始化并执行图。

主要改动

  • 移除硬编码 SoC 配置项:删除 globalOptions 中 ge.socVersion 对应 Ascend950DT_9592 的条目,避免实际设备型号与该值不一致时 GE 初始化失败。
  • 保留其余 GE 全局配置:ge.exec.deviceId(值为 0)与 ge.graphRunMode(值为 1)仍作为传入 ge::GEInitialize 的初始化选项保留,示例原有图执行流程不变。
  • 对齐仓库其他在线图模式示例:不再在示例侧指定 SoC 版本,改由 GE/Runtime 从运行环境获取实际 SoC,提升跨设备型号的兼容性。

🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
atomgit-bot
atomgit-bot
8 days ago Comments:

代码审查

✅ 未发现问题


🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
8 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
8 days ago 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
repo-cann/ops-math ✅ 宋恺, 张磊 (2/2) ✅ 宋恺, 张磊 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

raoliang_sac, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robotCollaborators
8 days ago Set yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,xuejinghui,onanfield,zhanw_coding,jiangjiawei,clinglai0517 as approver
CANN-robotCANN-robotCollaborators
8 days ago Set yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,xuejinghui,onanfield,zhanw_coding,jiangjiawei,clinglai0517 as approver
Rraoliang_sacCollaborators
8 days ago Modify description of pull request
raoliang_sacCollaborators
8 days ago Comments:

compile

likedislike
Rraoliang_sacCollaborators
8 days ago Pre merge succeeded (commit_id: 53889bdb12e6cd739d3565d3cbeaace08fe30208)
CANN-robot
CANN-robotCollaborators
8 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
8 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
8 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
8 days ago Added label: ci-pipeline-passed
zl_hwCollaborators
8 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
8 days ago Added label: approved
songkai111Collaborators
8 days ago Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
8 days ago Added label: lgtm
CANN-robotCANN-robotCollaborators
8 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
8 days ago Merged pull request