[UX] remove torch compile warning when using breakable cudagraph (#50750)
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Jiangyun Zhu committed
Aug 3, 2026 at 19:25 UTC
32c42c4f2f894bfd18e9b2fff1fede7fea4885e8
1 file changed
+12
-8
vllm/config/vllm.py
+12
-8
@@ -1233,16 +1233,20 @@ class VllmConfig:
1233
"Set VLLM_USE_BREAKABLE_CUDAGRAPH=0 to opt out."
1234
)
1235
1236
- if envs.VLLM_USE_BREAKABLE_CUDAGRAPH:
1237
- logger.warning_once(
1238
- "VLLM_USE_BREAKABLE_CUDAGRAPH is set, disabling vLLM's "
1239
- "torch.compile pipeline. Equivalent to -cc.mode=none."
1240
- )
1236
+ from vllm.compilation.breakable_cudagraph import (
1237
+ is_breakable_cudagraph_enabled,
1238
+ )
1239
+
1240
+ breakable_cudagraph_enabled = is_breakable_cudagraph_enabled()
1241
+ if breakable_cudagraph_enabled:
1242
self.compilation_config.mode = CompilationMode.NONE
1243
1243
- if self.compilation_config.backend == "eager" or (
1244
- self.compilation_config.mode is not None
1245
- and self.compilation_config.mode != CompilationMode.VLLM_COMPILE
1244
+ if not breakable_cudagraph_enabled and (
1245
+ self.compilation_config.backend == "eager"
1246
+ or (
1247
+ self.compilation_config.mode is not None
1248
+ and self.compilation_config.mode != CompilationMode.VLLM_COMPILE
1249
+ )
1250
):
1251
logger.warning_once(
1252
"Inductor compilation was disabled by user settings, "