vllm.compilation.monitor
¶
Functions:
-
monitor_profiling_run–Context manager that times the initial profiling run.
-
monitor_torch_compile–Context manager that times torch.compile and manages depyf debugging.
monitor_profiling_run(tag='')
¶
Context manager that times the initial profiling run.
Asserts that no backend compilation occurs during the profiling run (all compilation should have completed before this point).
Source code in vllm/compilation/monitor.py
monitor_torch_compile(vllm_config, message='%storch.compile took %.2f s in total', is_encoder=False, tag='', announce_start=True)
¶
Context manager that times torch.compile and manages depyf debugging.
On normal exit: logs the compile time and exits depyf. On exception: cleans up depyf without logging (compilation failed).
announce_start=False suppresses the "Starting torch.compile" line;
used by the AOT-load probe so a failed load attempt doesn't announce a
compile it didn't perform.