Merged
fix(codegen): Null-check taskStat before OPEN_MIX_PERF sys_cnt access #6187
anyangleAdd on Sep 11
fix(codegen): Null-check taskStat before OPEN_MIX_PERF sys_cnt access #6187
Merged
anyangleAdd on Sep 11
anyangle
anyangleCollaborators
Sep 11

背景:Capture(aclgraph / NPUGraph)模式下开启 runtime_debug_mode=1(泳道图相关 debug)后,用例执行异常

根因:编译期与 Capture 运行期对泳道能力的处理不一致:
编译期:runtime_debug_mode=1 会在 codegen 增加 -DOPEN_MIX_PERF,在 CV sync 等处插入对 taskStat 的时间戳写(codegen_npu.cpp / codegen_scalar.cpp)。
运行期 Capture:host 故意规避泳道采集:
debugEnable = !isCaptureMode && isDebugMode
Capture 不下发 toSubMachineConfig
RunWithProfile 在 Capture 直接 return(告警:swimlane not supported in CaptureMode)
因此 InitTaskStat 得到 taskStat == nullptr
冲突点:leaf kernel 中 OPEN_MIX_PERF 插桩此前 无空指针保护,仍解引用空 taskStat → AICore 271;后续 AICPU timeout / GetMetrics timeout 为连带现象

解决方法:在 codegen 生成的 OPEN_MIX_PERF 插桩处增加空指针保护

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for anyangle's contribution.)
anyangleanyangleCollaborators
Sep 11 Created pull request, commit 26a6dc3b
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/codegen ✅ lululu40888, gaoxingwang (2/2) ✅ lululu40888 (1/1)
repo-cann/pypto ✅ lululu40888, gaoxingwang (2/2) ✅ lululu40888 (1/1)

💡 Tip:

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

CLA Signature Pass

quadrate, 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 lululu40888,yinjie27_,make_pto,linjiashu as approver
anyangleanyangleCollaborators
Sep 11 Associated issue: [Bug-Report|缺陷反馈]: capture模式开启泳道图后用例执行报错
anyangle
anyangleCollaborators
Sep 11 Comments:

compile

likedislike
anyangleanyangleCollaborators
Sep 11 Pre merge succeeded (commit_id: 9b093424f104746632541b509668f053b7566f18)
CANN-robot
CANN-robotCollaborators
Sep 11 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 11 Added label: ci-pipeline-running
7 event messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
Sep 11 Removed label: ci-pipeline-passed
CANN-robot
CANN-robotCollaborators
Sep 11 Comments:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-passed.

likedislike
CANN-robotCANN-robotCollaborators
Sep 11 Added label: cann-cla/yes
5 event messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
Sep 11 Set xinweiliu,cam_bxh,dai-zhentao,shi-dingkun,gguuaanngg,codehjp423,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,zhoubotcam,wangbing110,WenboCodes as approver
anyangle
anyangleCollaborators
Sep 11 Comments:

compile

likedislike
anyangleanyangleCollaborators
Sep 11 Pre merge succeeded (commit_id: c716cf7ff9f9d4e65adb134eb0b3a3a0c0dbe429)
CANN-robot
CANN-robotCollaborators
Sep 11 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 11 Added label: ci-pipeline-running
7 event messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
Sep 11 Added label: cann-cla/yes
anyangle
anyangleCollaborators
Sep 11 Comments:

compile

likedislike
anyangleanyangleCollaborators
Sep 11 Pre merge succeeded (commit_id: 8d3c3e5800592063569bfa1e1a23b3309c457a68)
CANN-robot
CANN-robotCollaborators
Sep 11 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 11 Removed label: ci-pipeline-failed
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
huanglu
huangluCollaborators
Sep 12 Comments:

/approve

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

/lgtm

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