数据目录说明
原始的性能数据落盘目录结构为:
- 调用tensorboard_trace_handler函数时的落盘目录结构:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
└── localhost.localdomain_139247_20230628101435_ascend_pt // 解析结果目录,命名格式:{worker_name}_{时间戳}_ascend_pt,默认情况下{worker_name}为{hostname}_{pid} ├── profiler_info.json // 多卡或集群场景命名规则为profiler_info_{Rank_ID}.json,用于记录Profiler相关的元数据 ├── profiler_metadata.json ├── ASCEND_PROFILER_OUTPUT // Ascend PyTorch Profiler接口采集性能数据 │ ├── ascend_pytorch_profiler_{rank_id}.db // export_type=torch_npu.profiler.ExportType.Db时该目录下生成.db文件,其他.json和.csv文件不生成,使用MindStudio Insight工具展示 │ ├── analysis.db // 多卡或集群等存在通信的场景下,设置export_type=torch_npu.profiler.ExportType.Db时该目录下生成.db文件,其他.json和.csv文件不生成,使用MindStudio Insight工具展示 │ ├── communication.json // 为多卡或集群等存在通信的场景性能分析提供可视化数据基础,配置experimental_config的profiler_level=torch_npu.profiler.ProfilerLevel.Level1或profiler_level=torch_npu.profiler.ProfilerLevel.Level2生成 │ ├── communication_matrix.json // 通信小算子基本信息文件,配置experimental_config的profiler_level=torch_npu.profiler.ProfilerLevel.Level1或profiler_level=torch_npu.profiler.ProfilerLevel.Level2生成 │ ├── data_preprocess.csv // 配置experimental_config profiler_level=torch_npu.profiler.ProfilerLevel.Level2生成 │ ├── kernel_details.csv │ ├── l2_cache.csv // 配置experimental_config的l2_cache=True生成 │ ├── memory_record.csv │ ├── npu_module_mem.csv │ ├── operator_details.csv │ ├── operator_memory.csv │ ├── step_trace_time.csv // 迭代中计算和通信的时间统计 │ ├── op_statistic.csv // AI Core和AI CPU算子调用次数及耗时数据 │ ├── api_statistic.csv // 配置experimental_config的profiler_level=torch_npu.profiler.ProfilerLevel.Level1或profiler_level=torch_npu.profiler.ProfilerLevel.Level2生成 │ └── trace_view.json ├── FRAMEWORK // 框架侧的性能原始数据,无需关注,data_simplification=True时删除此目录 └── PROF_000001_20230628101435646_FKFLNPEPPRRCFCBA // CANN层的性能数据,命名格式:PROF_{数字}_{时间戳}_{字符串},data_simplification=True时,仅保留此目录下的原始性能数据,删除其他数据 ├── analyze // 配置experimental_config的profiler_level=torch_npu.profiler.ProfilerLevel.Level1或profiler_level=torch_npu.profiler.ProfilerLevel.Level2生成 ├── device_* ├── host ├── mindstudio_profiler_log └── mindstudio_profiler_output ├── localhost.localdomain_139247_20230628101435_ascend_pt_op_args // 算子信息统计文件目录,配置experimental_config的record_op_args=True生成
Ascend PyTorch Profiler接口将框架侧的数据与CANN Profling的数据关联整合,形成trace、kernel以及memory等性能数据文件。保存在ASCEND_PROFILER_OUTPUT目录下,包括json和csv格式的timeline和summary数据。
FRAMEWORK为框架侧的性能原始数据,无需关注;PROF目录下为CANN Profling采集的性能数据,主要保存在mindstudio_profiler_output目录下,数据介绍请参见性能数据文件参考。
- 调用export_chrome_trace方法时,Ascend PyTorch Profiler接口会将解析的trace数据写入到*.json文件中,其中*为文件名,不存在该文件时在指定路径下自动创建。