diff --git a/vllm/compilation/backends.py b/vllm/compilation/backends.py index dc12acbaf4..f80498c813 100644 --- a/vllm/compilation/backends.py +++ b/vllm/compilation/backends.py @@ -1144,16 +1144,19 @@ class VllmBackend: compilation_counter.num_graphs_seen += 1 from .monitor import torch_compile_start_time - dynamo_time = time.perf_counter() - torch_compile_start_time + current_perf = time.perf_counter() + current_epoch = time.time() + dynamo_time = current_perf - torch_compile_start_time logger.info_once( "Dynamo bytecode transform time: %.2f s", dynamo_time, ) # Record Dynamo time in tracing if available - start_time = int(torch_compile_start_time * 1e9) + real_start_time = current_epoch - dynamo_time + start_time_ns = int(real_start_time * 1e9) attributes = {"dynamo.time_seconds": dynamo_time} - instrument_manual("Dynamo bytecode transform", start_time, None, attributes) + instrument_manual("Dynamo bytecode transform", start_time_ns, None, attributes) # we control the compilation process, each instance can only be # called once