[compile] Skip FX graph deserialiaztion on loading, further reducing warm compile time. (#40151)

Signed-off-by: zhxchen17 <zhxchen17@fb.com>
This commit is contained in:
Zhengxu Chen
2026-04-23 13:43:18 +08:00
committed by GitHub
parent e4ee48da2d
commit 98a242ff61
3 changed files with 97 additions and 50 deletions
+4 -5
View File
@@ -23,6 +23,10 @@ from torch._logging._internal import trace_structured
from torch.fx._lazy_graph_module import _use_lazy_graph_module
import vllm.envs as envs
from vllm.compilation.codegen import (
compile_execution_fn,
generate_execution_code,
)
from vllm.config import CompilationConfig, CUDAGraphMode, VllmConfig
from vllm.config.compilation import DynamicShapesType
from vllm.config.utils import Range, hash_factors
@@ -1244,11 +1248,6 @@ class VllmBackend:
original_split_gm if envs.VLLM_USE_MEGA_AOT_ARTIFACT else self.graph
)
from vllm.compilation.codegen import (
compile_execution_fn,
generate_execution_code,
)
execution_code, submod_names = generate_execution_code(self.split_gm)
# Use getattr to get correct callables: __dict__ has PiecewiseBackend
# instances (from PiecewiseCompileInterpreter), _modules has originals.