From 47fcb8ca68c1027ba7eb7a9056bb4596ee284221 Mon Sep 17 00:00:00 2001 From: Frederik Gossen Date: Mon, 20 Apr 2026 13:40:52 -0400 Subject: [PATCH] [Core] Pass donate_graph_module=True to standalone_compile (#39733) Signed-off-by: Frederik Gossen --- vllm/compilation/compiler_interface.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vllm/compilation/compiler_interface.py b/vllm/compilation/compiler_interface.py index 79339ebaf8..ae280fbcb9 100644 --- a/vllm/compilation/compiler_interface.py +++ b/vllm/compilation/compiler_interface.py @@ -295,6 +295,9 @@ class InductorStandaloneAdaptor(CompilerInterface): }, } + if is_torch_equal_or_newer("2.13.0.dev"): + compile_kwargs["donate_graph_module"] = True # type: ignore[assignment] + use_aot: bool = supports_aot and envs.VLLM_USE_MEGA_AOT_ARTIFACT # only add 'aot' parameter if both supported and enabled... # this will set bundled_autograd_cache