[Profiler] Unify platform-aware torch profiling (#57460)

This commit is contained in:
czhu-cohere
2026-09-20 19:17:23 -07:00
committed by GitHub
parent 6dfd87f596
commit 3918f3c5a3
9 changed files with 408 additions and 110 deletions
+4
View File
@@ -22,6 +22,10 @@ To use the `torch.profiler` module, set the `profiler` entry to `'torch'` and `t
- `torch_profiler_with_flops` to enable recording FLOPs, off by default
- `torch_profiler_use_gzip` to control gzip-compressing profiling files, on by default
- `torch_profiler_dump_cuda_time_total` to control dumping and printing the aggregated CUDA self time table, on by default
- `torch_profiler_activities` to select worker activities. Defaults are
platform-specific: `["CPU"]` on CPU, `["CPU", "CUDA"]` on NVIDIA GPUs, and
`["CPU", "XPU"]` on Intel GPUs. Selecting `["CUDA"]` omits CPU annotations
and the AsyncLLM CPU trace to reduce profiling overhead and trace size.
When using `vllm bench serve`, you can enable profiling by passing the `--profile` flag.