Merged
fix(pypto_pro): Fix pro_repro support singlecommit #6240
fix(pypto_pro): Fix pro_repro support singlecommit #6240
Merged
liulufang_gitcodeAdd on Sep 14
liulufang_gitcode
liulufang_gitcodeCollaborators
Sep 14

PR 应该避免没有描述信息,描述信息的最重要的作用是描述修改意图,应该清晰明了。例如:标题中包含了 fix 标签,如果没有描述信息,就需要Review人员猜测PR具体修复了哪些内容,或者怀疑修改的必要性。如果PR和特定的Issue相关,可以单独包含一行 Related Issue: 放到描述信息最后。

下面是一个典型的PR描述信息:

The origin issue template brings too many noise, it's not suitable for git message. eg: comments
are not removed, labels are redundant as the PR tile already contains the tag.

The guide gives a clear suggestion on how to write the PR body.

Related Issue: #1234,#5678

更多描述信息见:Commit Message 规范

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for liulufang_gitcode's contribution.)
liulufang_gitcodeliulufang_gitcodeCollaborators
Sep 14 Created pull request, commit d6a2bce3
atomgit-bot
atomgit-bot
Sep 14 Comments:

变更摘要

该 PR 修复 pypto_pro 离线复现工具(debug_aicore_error_pro_repro.py)对纯 pl.Ptr + scalar 入参 kernel(无 shape 签名)以及 timeout 类异常的支持。核心思路是在异常 dump 回调中新增 launch-args sidecar(<kernel>_launch_args.json)持久化完整启动 ABI(ptr/scalar/tiling 参数与 block_dim),复现脚本据此重建精确调用;对 timeout/trap 类故障则通过 msnpureport 的 singlecommit 模式串行化重跑并收集所有卡死核的 ErrorPC,以判断是否为核间同步问题。

主要改动

  • 新增 launch-args sidecar 写入链路: C++ 回调侧(exception_dump_callback.cpp)新增 pro_set_launch_meta() 与 WriteLaunchMetaFile(),Python 侧 _record_launch_meta() 在 set_dump_info 中记录 ptr/scalar/tiling 参数与 block_dim,仅当异常 dump 回调触发时才写入 <dump_dir>/<kernel>_launch_args.json,launch 时不再触碰 dump 目录。

  • 复现脚本重建精确 ABI: debug_aicore_error_pro_repro.py 新增 _load_launch_meta()、_parse_call_kernel_signature() 与 _C_CTYPE_MAP,以 sidecar 为主(call_kernel.cpp 签名兜底)生成启动参数表达式,并为 call_kernel 绑定 argtypes 防止宽 int64 scalar 被 ctypes 默认类型截断,同时恢复 sidecar 中记录的 block_dim 而非固定为 1。

  • singlecommit 超时诊断: 新增 run_singlecommit_diagnosis()、_msnpureport_set_singlecommit()、_find_msnpureport(),对 timeout/trap 类失败通过 msnpureport config --set --singlecommit 1 串行化重跑(结束后恢复设备配置),并输出 reproduction_report--singlecommit.txt 以判定是否为核间同步(并发/时序)问题。

  • 全核 ErrorPC 定位升级: 新增 _locate_error_pcs() 与 _format_error_pc_records() 聚合所有卡死核的 ErrorPC 并按 (coreType, PC, symbol) 去重,_resolve_pc_via_symbolizer() 改用 llvm-symbolizer --inlines 解析完整内联调用链(_resolve_pc_via_objdump() 作为兜底),_find_bisheng_tools() 相应扩展为查找 ld.lld + llvm-objdump + llvm-symbolizer 三元组,并将内核 *.cpp/*.h 源码拷入 dump 目录保证报告自包含。

  • 配套测试与运行时调整: test_exception_dump_callback.cpp 新增 pro_set_launch_meta 单测(含 sidecar 文件内容校验),test_aicore_error.py 新增 test_ptr_scalar_dump_and_repro 端到端用例(MTE3 越界写触发);exception_dump.py 新增 _dump_dir_path()(ASCEND_WORK_PATH 未设置时回退到当前工作目录)并让调试编译命令同时拷贝 *.h 头文件,jit.py 将 block_dim 传入 _set_dump_info。

likedislike
Incorrect?
atomgit-bot
atomgit-bot
Sep 14 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Sep 14 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Sep 14 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
framework/src/interface/pypto_pro ✅ wangbing110, 尹杰 (2/2) ✅ 尹杰, wangbing110 (2/1)
python/pypto_pro ✅ 尹杰, wangbing110 (2/2) ✅ 尹杰, wangbing110 (2/1)
repo-cann/pypto ✅ 尹杰, wangbing110 (2/2) ✅ 尹杰, wangbing110 (2/1)
tools/scripts ✅ 尹杰, wangbing110 (2/2) ✅ 尹杰 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
Sep 14 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
CANN-robotCANN-robotCollaborators
Sep 14 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
liulufang_gitcode
liulufang_gitcodeCollaborators
Sep 14 Comments:

compile

likedislike
liulufang_gitcodeliulufang_gitcodeCollaborators
Sep 14 Pre merge succeeded (commit_id: 7e3d6318a2b280621d2042185dc3443c68533ece)
CANN-robot
CANN-robotCollaborators
Sep 14 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 14 Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 14 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 14 Added label: ci-pipeline-passed
Jie Yin
Jie YinCollaborators
Sep 14 Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
Sep 14 Added label: approved
poorwillpoorwillCollaborators
Sep 14 Approval passed
poorwillpoorwillCollaborators
Sep 14 Approval passed
poorwill
poorwillCollaborators
Sep 14 Comments:

/approve
/lgtm

likedislike
CANN-robotCANN-robotCollaborators
Sep 14 Added label: lgtm
CANN-robotCANN-robotCollaborators
Sep 14 Merged pull request