Merged
fix(machine): Report queued errors on bundle launch failure #6171
W4termyAdd on Sep 11
fix(machine): Report queued errors on bundle launch failure #6171
Merged
W4termyAdd on Sep 11
W4termy
W4termyCollaborators
Sep 11
https://gitcode.com/cann/pypto/pull/6068
https://gitcode.com/cann/pypto/pull/6167
master同步9.2.0分支
likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for W4termy's contribution.)
W4termyW4termyCollaborators
Sep 11 Created pull request, commit f935c732
W4termyW4termyCollaborators
Sep 11 Associated issue: [Requirement|需求建议]: 增加aicore error调试脚本
atomgit-bot
atomgit-bot
Sep 11 Comments:

变更摘要

本 PR 修复了 bundle 启动失败时未上报排队错误的问题,并将 bundle 的 AICPU 启动路径从直接调用 RuntimeAicpuKernelLaunchExWithArgs 切换为通过新增的 LaunchPyptoRunWithHostArgs 接口(内部调用 LoadAicpuOp::LaunchBuiltInOpWithHostArgs(desc, "PyptoRun"))完成启动,同时把 AICPU 启动参数结构从 RtAicpuArgsEx/RtHostInputInfo 迁移为 AicpuLaunchDesc/AicpuHostInput。该改动属于 9.2.0 分支的 master 同步修复。

主要改动

  • 启动失败时上报排队错误:在 pypto_bundle_api.cpp 的 LaunchImpl 中,当 dynamic::LaunchBundleKernelOnce 返回非零错误码时,调用 ErrorManager::Instance().OutputErrorMessage() 输出错误管理器中的排队错误信息,使 bundle 启动失败的错误可被及时上报。
  • AICPU 启动入口切换:kernel_bundle_launch.cpp 中的 BundleLaunchAicpu 签名由 RtAicpuArgsEx& rtArgs 改为 AicpuLaunchDesc& launchDesc,ctrl/sched 两次启动均通过设置 launchDesc.stream、launchDesc.blockDim 后调用 LaunchPyptoRunWithHostArgs 代替原有的 RuntimeAicpuKernelLaunchExWithArgs。
  • 新增 LaunchPyptoRunWithHostArgs 接口:在 load_aicpu_op.cpp/load_aicpu_op.h 中新增该函数,委托 LoadAicpuOp::GetInstance().LaunchBuiltInOpWithHostArgs(desc, "PyptoRun") 完成启动;注释说明 bundle 调用方不应在自己的共享库中实例化头文件内联的 LoadAicpuOp 单例,而应解析运行时库内已初始化的内建句柄。
  • AICPU 启动参数结构迁移:LaunchBundleKernelOnce 中构建启动参数由 RtAicpuArgsEx + RtHostInputInfo 改为 AicpuLaunchDesc + AicpuHostInput,相应填充 hostInputs、hostInputNum、timeout、args、argsSize 等字段,仅保留输入张量指针的主机侧地址重定位逻辑。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
Sep 11 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Sep 11 Added label: stat/needs-squash
CANN-robotCANN-robotCollaborators
Sep 11 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Sep 11 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/machine ✅ jason_yuan_ye, gaoxingwang (2/2) ✅ jason_yuan_ye (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
Sep 11 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 11 Set jason_yuan_ye,yinjie27_,tsungl4,gaoxingwang,linjiashu as approver
W4termyW4termyCollaborators
Sep 11 Modify description of pull request
W4termy
W4termyCollaborators
Sep 11 Comments:

compile

likedislike
W4termyW4termyCollaborators
Sep 11 Pre merge succeeded (commit_id: c175ea7081cc40ff08165befb171344ce80e552a)
CANN-robot
CANN-robotCollaborators
Sep 11 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 11 Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 11 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 11 Added label: ci-pipeline-passed
袁野
袁野Collaborators
Sep 11 Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
Sep 11 Added label: approved
gaoxingwang
gaoxingwangCollaborators
Sep 11 Comments:

/lgtm

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