Closed
[Bug-Report|缺陷反馈]: Bias 图模式示例硬编码 SoC 导致其他受支持型号初始化失败 #4400
raoliang_sacAdd on  8 days agoClosed at  8 days ago
raoliang_sacCollaborators
8 days ago Create

一、问题描述(必填)

math/bias/examples/test_geir_bias.cpp 将 ge.socVersion 写死为 Ascend950DT_9592。在实际型号为 Ascend950PR_9579 的设备上执行示例,Runtime 因型号不匹配拒绝创建设备,最终 GEInitialize failed,进程退出码 255。

关键报错:

The soc version=Ascend950DT_9592 has been set, device cannot be created on real soc version=Ascend950PR_9579, the current input soc version does not match the NPU type.
rtSetDevice:ErrCode=507033
GEInitialize failed

二、环境信息(可选)

  • 硬件:Ascend950PR_9579,NpuArch 3510。
  • CANN 包时间戳:20260923_000324205;compiler/version.info 显示 Version=9.2.0。
  • Python:3.12.9。
  • 源码:ops-math master,修复基点 02fac8767727a4c215df92211fb1a38e70a46b5e。

三、重现步骤(可选)

在型号与硬编码值不同的上述设备上,使用未修改的 Bias 示例执行:

bash build.sh --run_example bias graph --example_name=bias --soc=ascend950 -j8

--soc=ascend950 不会覆盖示例内部的 ge.socVersion,因此出现上述初始化失败。

四、预期结果(可选)

在线图模式示例根据运行设备获取实际型号,在受支持设备上完成图执行及输出校验,无需修改源码中的型号字符串。

备注(选填)

修复删除 ge.socVersion 配置,使用 GE/Runtime 的默认识别行为。修复后同一命令在 Ascend950PR_9579 上返回 0,图执行及示例输出校验通过。

此 Issue 仅记录已确认的示例型号硬编码缺陷,不将其他现场的 RunGraph 失败归因于该问题。

关联 PR:https://gitcode.com/cann/ops-math/pull/6999

likedislike
Rraoliang_sacCollaborators
8 days ago Added label: bug-report
CANN-robotCANN-robotCollaborators
8 days ago Close issue
CANN-robotCANN-robotCollaborators
7 days ago Added label: resolved