intel / pti-gpu

Profiling Tools Interfaces for GPU (PTI for GPU) is a set of Getting Started Documentation and Tools Library to start performance analysis on Intel(R) Processor Graphics easily
MIT License
198 stars 52 forks source link

Suggesting change in the name field in chrome tracing output #52

Open zhenghh04 opened 9 months ago

zhenghh04 commented 9 months ago

Hello, I was using the unitrace to trace an AI application. Below is part of my output.

{"ph": "X", "tid": 4294950910, "pid": 4294950911, "name": "gen9_eltwise_bwd[SIMD32 {1568; 1; 1} {512; 1; 1}]", "cat": "gpu_op", "ts": 1703105438709308, "dur": 9, "args": {\
"id": "3418"}},
{"ph": "X", "tid": 4294950910, "pid": 4294950911, "name": "gen9_fused_reduce_init[SIMD32 {128; 1; 1} {1; 1; 1}]", "cat": "gpu_op", "ts": 1703105438709404, "dur": 3, "args"\
: {"id": "3419"}},

Many events with the same kernel name but different SIMD shapes. It would be good in the "name" field, it only shows the kernel name, and put the SIMD information in the "args" filed, like follows:

{"ph": "X", "tid": 4294950910, "pid": 4294950911, "name": "gen9_eltwise_bwd", "cat": "gpu_op", "ts": 1703105438709308, "dur": 9, "args": {"id": "3418", "shape": "[SIMD32 {1568; 1; 1} {512; 1; 1}]"}},
{"ph": "X", "tid": 4294950910, "pid": 4294950911, "name": "gen9_fused_reduce_init", "cat": "gpu_op", "ts": 1703105438709404, "dur": 3, "args"\
: {"id": "3419", "shape":"[SIMD32 {128; 1; 1} {1; 1; 1}]"}},

In this way, it is easy to combine information for all the events related to the same kernel.

Sarbojit2019 commented 8 months ago

@zhenghh04, Thanks for raising it. I wanted to understand the visualization tool that you are using and how are you analyzing your data. We use Perfetto.ui and we found it is easy to identify issues with kernel name + SIMDs info together.