Merged
fix(presmoke): 自动探测的卡号折成可见设备下标,修复 A5 冒烟批量 SIGSEGV #7366
zhangyujia77Add on 12 days ago
fix(presmoke): 自动探测的卡号折成可见设备下标,修复 A5 冒烟批量 SIGSEGV #7366
Merged
Pull Request has been successfully merged by CANN-robot.
(Thank you for zhangyujia77's contribution.)12 days ago Created pull request, commit ee7806dd
atomgit-bot
12 days ago Comments:
12 days ago Comments:
atomgit-bot
12 days ago Comments:
12 days ago Comments:
zhangyujia77
12 days ago Comments:
12 days ago Comments:
compile


12 days ago Added label: cann-cla/yes
12 days ago Pre merge succeeded (commit_id: b37e94e00f36e1127e6cad8651f7abca7090c08a)
CANN-robot
12 days ago Comments:
12 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 |
|---|---|---|
| scripts | ✅ 诸葛洵, hujiawen_kaven (2/2) | ✅ 诸葛洵 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
zhangyujia77, thanks for your pull request. All authors of the commits have signed the CLA. 👍


12 days ago Set zengjuan,zhanghao_0689,suqwe,kevin365,wulinyu,kong0808,dengjing_aoe,YeZZzzz1,yangbinhua,zhudi22,chenyiyuan,xun_zhuge,XuebinYang,sjtulxh,bianque,houyuyang,Lycheeeee,YANXI_ZHAO,chentianyu19,shi_nanxiang,wuyang_hw,jiangxinyu3,ascendhjh,hujiawen_kaven,wangxiaozhi,DragonBornHD84,louyuxuan,hyolee,chenma,yukangchen as approver
12 days ago Set zengjuan,zhanghao_0689,suqwe,kevin365,wulinyu,kong0808,dengjing_aoe,YeZZzzz1,yangbinhua,zhudi22,chenyiyuan,xun_zhuge,XuebinYang,sjtulxh,bianque,houyuyang,Lycheeeee,YANXI_ZHAO,chentianyu19,shi_nanxiang,wuyang_hw,jiangxinyu3,ascendhjh,hujiawen_kaven,wangxiaozhi,DragonBornHD84,louyuxuan,hyolee,chenma,yukangchen as approver
12 days ago Set kevin365,xun_zhuge as approver
CANN-robot
12 days ago Comments:
12 days ago Comments:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


12 days ago Added label: ci-pipeline-running
zhugexun_sjtu
12 days ago Comments:
12 days ago Comments:
/approve


12 days ago Added label: approved
6 event messages are collapsed here。 See more
12 days ago Removed label: approved
CANN-robot
12 days ago Comments:
12 days ago Comments:
zhugexun_sjtu
12 days ago Comments:
12 days ago Comments:
/approve


12 days ago Added label: approved
hujiawen_kaven
12 days ago Comments:
12 days ago Comments:
/approve
/lgtm


CANN-robot
12 days ago Comments:
12 days ago Comments:
The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: hujiawen_kaven


12 days ago Added label: lgtm
12 days ago Removed label: ci-pipeline-running
12 days ago Added label: ci-pipeline-passed
12 days ago Merged pull request
现象
上游 run#7680(PR !7338,一个纯空行改动)的
PreSmoke_A5750 例里 703 例失败,rc 分布139(SIGSEGV) 358 个、134(SIGABRT) 200 个、1141 个,连add、matmul_basic_api这种最基础的样例都挂。根因
plog 第一现场(
slog_dav-3510.tar.gz→log/debug/plog/):ASCEND_RT_VISIBLE_DEVICES要的是运行时可见设备集合里的下标,范围恒为[0, deviceCnt)。而resolve_npu_cards的自动探测拿到的是宿主机物理编号 ——/dev/davinciN的N,或npu-smi的 NPU id。两者只在「卡从 0 开始连续透传」时才相等。A5 runner(
npu=4)是从整机里挑 4 个设备节点透进容器的。挑到davinci4..7就全挂,挑到davinci0..3就全绿 —— 所以这是个随机复现、约一半概率的坑。本次status.txt里是multi_card_start cards=4 5 6 7。修复
自动探测的结果折成
0..N-1。显式传NPU_CARDS的走normalize_card_list,行为不变。分片不受影响:
load_fixed_shards是按enumerate(cards)的下标去找card_{index}.txt的,不认卡号本身(本次失败的那轮分片计数仍然是正确的207/181/181/181)。验证
附带发现(本单不改)
同一轮里
hello_world日志写着[ERROR] [Bisheng] Get kernel function failure! ret 107002,rc 却是 0 → 记成 PASS。所以设备全废时 pass/fail 计数仍会给出 25 个「通过」。光看计数会被骗,另开单跟。