[UX] remove torch compile warning when using breakable cudagraph (#50750)
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
This commit is contained in:
+12
-8
@@ -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, "
|
||||
|
||||
Reference in New Issue
Block a user