已合并
支持解析launchKernel接口上报额外的profiling信息 #252
xfeng创建于 5月26日
支持解析launchKernel接口上报额外的profiling信息 #252
已合并
xfeng创建于 5月26日
xfeng
xfeng成员
5月26日

PR 合入模板

注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。


1. 修改描述

  • 修改原因:
    数据结构更改,runtime上通过修改数据结构上报额外的profiling信息。
struct MsporfKernelInfo {
    uint16_t numBlocks;
    uint16_t argsSize;
    uint8_t ratio : 3;
   uint8_t schedMode : 2;
   uint8_t rsv : 3;
   uint8_t reserved[11];
};

struct MsprofDim3 {
    uint16_t x;
    uint16_t y;
    uint16_t z;
};

struct MsprofSimtKernelInfo {
    MsprofDim3 gridDim;
    MsprofDim3 blockDim;
    uint16_t argsSize;
    uint8_t schedMode: 2;
    uint8_t rsv: 6;
    uint8_t reserved;
};

struct MsprofRuntimeTrack {  // for MsprofReportCompactInfo buffer data
    uint16_t deviceId;
    uint16_t streamId;
    uint32_t taskId;
    uint64_t taskType;       // task message hash id
    uint64_t kernelName;     // kernelname hash id
    union {
        struct MsporfKernelInfo kernelInfo;
        struct MsprofSimtKernelInfo simtKernelInfo;
    } extInfo;
};

  • 修改内容:
  • prof_common.h里面增加数据结构定义
  • 分析树的时候,HostTask有个op指针,里面包含算子描述信息,带上runtime层的:
struct OpDesc
{
    std::shared_ptr<MsprofCompactInfo> nodeDesc = nullptr;
    std::shared_ptr<MsprofCompactInfo> nodeAttr = nullptr;
    std::shared_ptr<MsprofCompactInfo> runtimeTrackDesc = nullptr;   //新增
    std::shared_ptr<ConcatTensorInfo> tensorDesc = nullptr;
    std::shared_ptr<MsprofAdditionalInfo> ctxId = nullptr;
};
  • 分析树的时候,除了计算、通信、还有其他,这个其他的有一种白名单可以判断也是计算算子,这里也要带上SIMT类型
  • cann落盘db的时候,增加新数据结构的处理:
    根据dataLen字段可以保持兼容性;计算block_dim和mix_block_dim;ge_info.db的TaskInfo表新增两列:gridDim和blockDim
  • json导出的时候根据数据类型是否是SIMT做额外的处理
  • db导出COMPUTE_TASK_INFO表新增两列gridDim和blockDim

2. 功能验证

kernelLaunch直调:
image.png


3. 分支合并要求


3. 代码检视

  • 要求:

    • 合入代码超过 200 行,需三人以上会议检视。
    • 检视密度≥1个/100行。
    • 检视缺陷密度未达要求需提供说明。
    • 大于 1000 行代码原则上不允许合入,需进行备案。
  • 检视意见数:____ 条 (请填写本次检视的意见总数,用于commit合入前审视)


4. 安全自检

Python、C++

C++


5. 变更知会


likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 xfeng 的贡献)
ascend-robot
ascend-robot成员
5月26日 评论:

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


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-Ascend/msprof Seanesmhxocism, 陈豪 (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

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

likedislike
ascend-robotascend-robot成员
5月26日 添加了label:ascend-cla/yes
xfeng
xfeng成员
5月26日 评论:

compile

likedislike
ascend-robotascend-robot成员
5月26日 添加了label:ci-pipeline-running
此处折叠了374条消息 查看更多
wangzixuan成员
6月1日 评论:

/lgtm

likedislike
chenhao_1209成员
6月1日 评论:

/approve

likedislike
ascend-robotascend-robot成员
6月1日 添加了label:approvedlgtm
ascend-robotascend-robot成员
6月1日 合入了pull request
ascend-robot
ascend-robot成员
6月1日 评论:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike