pti-gpu icon indicating copy to clipboard operation
pti-gpu copied to clipboard

Suggesting change in the name field in chrome tracing output

Open zhenghh04 opened this issue 1 year ago • 1 comments

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.

zhenghh04 avatar Dec 20 '23 21:12 zhenghh04