Feature Request: better profiler to identify bottleneck in performance
Right now profiler.py does a single workflow to identify bottlenecks
- temporal breakdown: where the GPU is spending time for a given job. followed by
- kernel classification to pinpoint the kernel to optimise.
It would be better to give the whole suites of diagnostic tools to agent:
- holistic trace analysis analyses torch profiler dump.
- tlparse analyses torch compiler dump.
- mosaic analyses torch memory snapshot dump.
If the repo accepts non-python package, trace-blame has native support for agent with install-skills.
Thanks for the suggestion. We looked into all four tools:
HTA is built for distributed training analysis (multi-rank communication overlap, idle time). AutoKernel profiles a single model on one GPU so most of HTA's value doesn't apply here.
tlparse analyzes torch.compile logs. AutoKernel writes raw Triton/CUDA kernels and doesn't use torch.compile, so this is a different optimization path entirely.
mosaic analyzes memory usage. AutoKernel optimizes kernel throughput, not memory. Tangential to what we do.
trace-blame has some relevance for source-level attribution but our profiler already ranks kernels by GPU time which is exactly what the agent needs.
That said, we added opt-in flags for all of them (--export-trace, --memory-snapshot, --torch-compile-log) in case anyone finds them useful for debugging. They don't change the core workflow but they're there if you want them.
Great work! May I also suggest looking at nsight-python as a library for computing additional metrics? nsight-python runs ncu to extract metrics.