msproftx数据说明

总体说明

msproftx采集的是用户和上层框架程序输出性能数据,数据保存在mindstudio_profiler_output目录下。

msproftx主要AscendCL API扩展接口采集性能数据进行打点采集,相关数据如表1所示。

表1 数据文件介绍

文件名

说明

msprof_*.json

timeline汇总数据。详情请参见msproftx timeline数据汇总

msprof_tx_*.json

msproftx timeline数据。可直接查看msprof_*.json。

msprof_tx_*.csv

msproftx summary数据。对采集到的host msproftx summary数据按线程进行拼接,并进行数据关联性展示。详情请参见msprof_tx summary数据

msproftx timeline数据汇总

msproftx的timeline汇总数据在msprof_*.json展示。如下所示。

图1 timeline汇总展示(Atlas 200/300/500 推理产品)(Atlas 推理系列产品(Ascend 310P处理器))(Atlas 训练系列产品)(Atlas A2训练系列产品

图1所示,timeline汇总数据主要展示如下区域:

  • 区域1:msproftx数据,即上层应用数据,包含上层应用算子的耗时信息。
  • 区域2:task_queue数据。仅PyTorch训练场景E2E Profiling采集后展示。
  • 区域3:CANN层数据,主要包含AscendCL、Runtime组件以及Node(算子)的耗时数据。
  • 区域4:底层NPU数据,主要包含Task Scheduler组件耗时数据和迭代轨迹数据以及其他昇腾AI处理器系统数据。
  • 区域5:展示timeline中各算子、接口的详细信息。单击各个timeline时展示。

图中的箭头连线为PyTorch训练场景采集后展示,表示上层应用、AscendCL API以及底层NPU算子之间的关联关系,详细分析方法请参见查看算子下发方向,其中HCCL算子不支持展示上层应用到AscendCL API接口的映射关系。

msprof_tx summary数据

msprof_tx summary数据文件为msprof_tx.csv。

msprof_tx.csv文件内容格式示例如下。

表2 字段说明

字段名

字段解释

pid

进程ID。

tid

Thread ID,AscendCL API所在线程ID。

category

Profiling msproftx采集进程类别,用于标识msproftx采集进程的采集内容。(预留字段,暂未开放)

event_type

事件类型。

payload_type

Profiling msproftx采集进程中携带额外的信息Payload的数据类型。(预留字段,暂未开放)

payload_value

Profiling msproftx采集进程中携带额外的信息Payload的指针。(预留字段,暂未开放)

Start_time(us)

Profiling msproftx采集进程开始时间,单位us。

End_time(us)

Profiling msproftx采集进程结束时间,单位us。

message_type

Profiling msproftx采集进程中携带字符串类型。(预留字段,暂未开放)

message

Profiling msproftx采集进程中携带的字符串描述。