Merged
fix(machine): export std::any<long> manager for bundle cross-DSO type identity #6079
W4termyAdd on Sep 9
fix(machine): export std::any<long> manager for bundle cross-DSO type identity #6079
Merged
W4termyAdd on Sep 9
W4termy
W4termyCollaborators
Sep 9
fix(machine): export std::any<long> manager for bundle cross-DSO type identity
fix(machine): prevent offline exception dump segfault on bundle launch
合入9.2.0
likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for W4termy's contribution.)
W4termyW4termyCollaborators
Sep 9 Created pull request, commit daab6639
W4termyW4termyCollaborators
Sep 9 Associated issue: [Requirement|需求建议]: 增加aicore error调试脚本
atomgit-bot
atomgit-bot
Sep 9 Comments:

变更摘要

本 PR 围绕 bundle 的跨 DSO 类型标识与异常离线 dump 修复展开:一方面在 tile_fwk_bundle.version 中导出 std::any<long> 的内部管理器符号 _ZNSt3any17_Manager_internalIlE9_S_manage*,解决 bundle 跨 DSO 的类型标识问题;另一方面为 bundle 引入稳定的 displayName(由 bundle key 或文件路径生成),贯穿 kernel_bundle_loader、LaunchBundleKernelOnce 直至 AICPU 的 opName 与 kernel 名称,并重构 AICORE/AICPU 异常 dump 逻辑(校验参数、改用 mixed 操作数计数、离线场景回退),从而避免 bundle 启动时离线异常 dump 段错误。

主要改动

  • 导出 std::any<long> 管理器符号: 在 tile_fwk_bundle.version 中新增导出 _ZNSt3any17_Manager_internalIlE9_S_manage*,保证 std::any<long> 跨 DSO 的类型身份一致。
  • 引入 bundle displayName 并传入启动链路: kernel_bundle_loader 新增 BundleKeyName/BundlePathName 生成稳定名称,LoadedBundle 新增 displayName 字段,LaunchBundleKernelOnce 签名新增 displayName 参数并经 pypto_bundle_api.cpp 透传,AICPU 启动时通过新增的 MakeAicpuOpName 写入 aicpuArgs->opName,kernel 名称由固定的 "PyPTO_bundle_kernel" 改为实际 displayName。
  • 修复离线异常 dump 段错误并加参数校验: device_exception_dump.cpp 用 TILE_FWK_BUNDLE_STANDALONE 宏隔离 aicore_compiler.h 依赖的 DumpNoSubFuncBundledKernel 调用;GetAicoreExceptionDumpInfo 增加对 kernel 参数完整性及负 tensor 计数的校验,GetDeviceExceptionDumpInfo 新增 exceptionDumpSize 参数并批量填充 kernelDisplayName。
  • 重构 AICPU 异常 dump 的命名与 tensor 解析: GetAicpuExceptionDumpInfo 不再从上次编译函数构造 "PyPTO_Aicpu_" 前缀,而是优先取运行时 kernelName/functionName,显示名优先取 aicpuArgs->opName,离线时回退到 "PyPTO_Aicpu_bundle_kernel";tensor 计数统一按 mixed 操作数列表(nMixed,nOut 弃用)解析,并新增 FillExceptionKernelDisplayName。
  • 调整 AiCpuArgs 结构与测试: machine_ws_intf.h 中将 opName 由 const char[32] 改为可写的 char[32];UT 新增离线 AICPU 异常(opName/functionName/bundle 回退)用例,并更新 mixed tensor 计数与 displayName 相关断言。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
Sep 9 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
W4termy
W4termyCollaborators
Sep 9 Comments:

compile

likedislike
CANN-robotCANN-robotCollaborators
Sep 9 Added label: stat/needs-squash
W4termyW4termyCollaborators
Sep 9 Pre merge succeeded (commit_id: b4289ae698f56d00a7bda7702a80ebf0fcf0306d)
CANN-robotCANN-robotCollaborators
Sep 9 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Sep 9 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)
repo-cann/pypto ✅ gaoxingwang, jason_yuan_ye (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 9 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 9 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-robot
CANN-robotCollaborators
Sep 9 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 9 Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 9 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 9 Added label: ci-pipeline-passed
袁野
袁野Collaborators
Sep 9 Comments:

/approve

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

/lgtm

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