Why it matters

PyTorch profiler is first stop for framework perf. Easy to use and powerful.

Advertisement

The architecture

torch.profiler.profile() context.

Emit chrome_trace.json.

View in Chrome or Perfetto.

PyTorch profiler flowEnable profilertorch.profilerEmit tracechrome_trace.jsonViewChrome or PerfettoBuilt into PyTorch; combines op timeline with memory and CUDA events
PyTorch profiler flow.
Advertisement

How it works end to end

torch.profiler.profile.

Export chrome_trace.

View in chrome://tracing.