From 32c42c4f2f894bfd18e9b2fff1fede7fea4885e8 Mon Sep 17 00:00:00 2001 From: Jiangyun Zhu Date: Mon, 3 Aug 2026 19:25:49 +0800 Subject: [PATCH] [UX] remove torch compile warning when using breakable cudagraph (#50750) Signed-off-by: zjy0516 --- vllm/config/vllm.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index d6e55798ca..df4a4a4384 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -1233,16 +1233,20 @@ class VllmConfig: "Set VLLM_USE_BREAKABLE_CUDAGRAPH=0 to opt out." ) - if envs.VLLM_USE_BREAKABLE_CUDAGRAPH: - logger.warning_once( - "VLLM_USE_BREAKABLE_CUDAGRAPH is set, disabling vLLM's " - "torch.compile pipeline. Equivalent to -cc.mode=none." - ) + from vllm.compilation.breakable_cudagraph import ( + is_breakable_cudagraph_enabled, + ) + + breakable_cudagraph_enabled = is_breakable_cudagraph_enabled() + if breakable_cudagraph_enabled: self.compilation_config.mode = CompilationMode.NONE - if self.compilation_config.backend == "eager" or ( - self.compilation_config.mode is not None - and self.compilation_config.mode != CompilationMode.VLLM_COMPILE + if not breakable_cudagraph_enabled and ( + self.compilation_config.backend == "eager" + or ( + self.compilation_config.mode is not None + and self.compilation_config.mode != CompilationMode.VLLM_COMPILE + ) ): logger.warning_once( "Inductor compilation was disabled by user settings, "