Merged
feat(pro): report tensor shape via aclprof range in the JIT launcher #6221
feat(pro): report tensor shape via aclprof range in the JIT launcher #6221
Merged
gravel1997Add on Sep 12
gravel1997
gravel1997Collaborators
Sep 12

feat(pro): report tensor shape via aclprof range in the JIT launcher
Related Issue: #3299

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for gravel1997's contribution.)
gravel1997gravel1997Collaborators
Sep 12 Created pull request, commit 97667ca5
gravel1997gravel1997Collaborators
Sep 12 Associated issue: [Bug-Report|缺陷反馈] pypto_pro JIT 算子 msprof 采集缺少算子名/shape/核类型:bisheng stub 链遮蔽框架上报(附根因分析与已验证修复方案)
CANN-robotCANN-robotCollaborators
Sep 12 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Sep 12 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
python/pypto_pro ✅ gaoxiang618, congqiannan (2/2) ✅ gaoxiang618 (1/1)
repo-cann/pypto ✅ gaoxiang618, congqiannan (2/2) ✅ gaoxiang618 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
Sep 12 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
gravel1997
gravel1997Collaborators
Sep 12 Comments:

compile

likedislike
CANN-robotCANN-robotCollaborators
Sep 12 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
gravel1997gravel1997Collaborators
Sep 12 Pre merge succeeded (commit_id: 07e0ed48fcf2a58fcaed4fa47a53c2c46ce44416)
CANN-robot
CANN-robotCollaborators
Sep 12 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 12 Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 12 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 12 Added label: ci-pipeline-passed
gaoxiang618
gaoxiang618Collaborators
Sep 12 Comments:

image.png

likedislike
gaoxiang618
gaoxiang618Collaborators
Sep 12 Comments:

return (
"#include "acl/acl_prof.h"\n"
"// Weak: a toolkit without it links to null and we report unconditionally, as before.\n"
"extern "C" attribute((weak)) char *MsprofGetPath();\n",
" {\n"
" // Skip the ~1.5us push/pop pair unless a profiler is collecting; empty path means off.\n"
" const char *pyptoProfPath = (MsprofGetPath != nullptr) ? MsprofGetPath() : nullptr;\n"
" const bool pyptoProfOn =\n"
" (MsprofGetPath == nullptr) || (pyptoProfPath != nullptr && pyptoProfPath[0] != '\0');\n"
" // Outside the guard on purpose: libmsprofiler dereferences these pointers when the\n"
" // launch below is reported, so the storage has to outlive the <<<>>> line.\n"
" aclprofTensor pyptoProfTensors[] = {\n"
+ "\n".join(tensor_inits)
+ "\n };\n"
" aclprofTensorInfo pyptoProfInfo;\n"
" aclprofEventAttributes pyptoProfAttrs;\n"
" if (pyptoProfOn) {\n"
" pyptoProfInfo.opNameId = aclprofStr2Id("" + op_name + "");\n"
" pyptoProfInfo.opTypeId = aclprofStr2Id("PyPTO");\n"
" pyptoProfInfo.resv = 0;\n"
f" pyptoProfInfo.tensorNum = {len(tensor_inits)};\n"
" pyptoProfInfo.kernelType = 0;\n"
" pyptoProfInfo.blockNums = blockDim;\n"
" pyptoProfInfo.stream = stream;\n"
" pyptoProfInfo.tensors = pyptoProfTensors;\n"
" pyptoProfAttrs.version = 1;\n"
" pyptoProfAttrs.size = sizeof(pyptoProfAttrs.message);\n"
" pyptoProfAttrs.messageType = 0;\n"
" pyptoProfAttrs.message.tensorInfo = &pyptoProfInfo;\n"
" (void)aclprofRangePushEx(&pyptoProfAttrs);\n"
" }\n",
" if (pyptoProfOn) {\n"
" (void)aclprofRangePop();\n"
" }\n"
" }\n",
)

likedislike
gravel1997gravel1997Collaborators
Sep 12 Pre merge succeeded (commit_id: 9c98fc4c05fbe66b70421374bf2713eec3b858cd)
gravel1997gravel1997Collaborators
Sep 12 Force-pushed 1 commits:04b5361e-feat(pro): report tensor shape via aclprof range in the JIT launcher
gravel1997gravel1997Collaborators
Sep 12 Pre merge succeeded (commit_id: bd488b0877c8cbd4a6a703e850a33b83a1479d98)
CANN-robotCANN-robotCollaborators
Sep 12 Removed label: cann-cla/yes
CANN-robotCANN-robotCollaborators
Sep 12 Removed label: ci-pipeline-passed
CANN-robot
CANN-robotCollaborators
Sep 12 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 12 Added label: cann-cla/yes
gravel1997
gravel1997Collaborators
Sep 12 Comments:

compile

likedislike
gravel1997gravel1997Collaborators
Sep 12 Pre merge succeeded (commit_id: f78a0f709103f98b8f48517b05c57335e157c5af)
CANN-robot
CANN-robotCollaborators
Sep 12 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 12 Added label: ci-pipeline-running
gravel1997gravel1997Collaborators
Sep 12 Pre merge succeeded (commit_id: 577ef057ee7e9d62384ec1843f512d98773b9a76)
gravel1997gravel1997Collaborators
Sep 12 Force-pushed 4 commits:c9009a62-3 commits from branch master,2a64a429-feat(pro): report tensor shape via aclprof range in the JIT launcher
gravel1997gravel1997Collaborators
Sep 12 Pre merge succeeded (commit_id: 1a79dc2911f2eca47b48bf5eef5d1fbb8e88ce1e)
CANN-robotCANN-robotCollaborators
Sep 12 Removed label: cann-cla/yes
CANN-robotCANN-robotCollaborators
Sep 12 Added label: cann-cla/yes
gravel1997
gravel1997Collaborators
Sep 12 Comments:

compile

likedislike
gravel1997gravel1997Collaborators
Sep 12 Pre merge succeeded (commit_id: 8044cb0d7d538e38009f426188307de82d5271e0)
CANN-robotCANN-robotCollaborators
Sep 12 Removed label: ci-pipeline-running
CANN-robot
CANN-robotCollaborators
Sep 12 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 12 Added label: ci-pipeline-failed
CANN-robotCANN-robotCollaborators
Sep 12 Removed label: ci-pipeline-failed
CANN-robotCANN-robotCollaborators
Sep 12 Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 12 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 12 Added label: ci-pipeline-passed
gaoxiang618
gaoxiang618CollaboratorsSep 14Start code review1
python/pypto_pro/runtime/jit.py
@@ -470,0 +471,4 @@
471+ if (
472+ isinstance(node, _ast.Call)
473+ and isinstance(node.func, _ast.Attribute)
474+ and node.func.attr == "store"
gaoxiang618
gaoxiang618Sep 14Comments:

store和store_tile都要考虑

likedislike
gaoxiang618gaoxiang618Collaborators
Sep 14 Resolved final issue
gaoxiang618
gaoxiang618Collaborators
Sep 14 Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
Sep 14 Added label: approved
gaoxiang618
gaoxiang618CollaboratorsSep 14Start code review1
python/pypto_pro/runtime/jit.py
@@ -470,0 +473,4 @@
473+ and isinstance(node.func, _ast.Attribute)
474+ and node.func.attr == "store"
475+ and node.args
476+ and isinstance(node.args[0], _ast.Name)
gaoxiang618
gaoxiang618Sep 14Comments:

对于make_tensor场景或者赋值场景会有别名,需要在parser的时候记录一下

likedislike
gaoxiang618gaoxiang618Collaborators
Sep 14 Resolved final issue
congqiannan
congqiannanCollaborators
Sep 14 Comments:

/lgtm

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