[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."
|
"Set VLLM_USE_BREAKABLE_CUDAGRAPH=0 to opt out."
|
||||||
)
|
)
|
||||||
|
|
||||||
if envs.VLLM_USE_BREAKABLE_CUDAGRAPH:
|
from vllm.compilation.breakable_cudagraph import (
|
||||||
logger.warning_once(
|
is_breakable_cudagraph_enabled,
|
||||||
"VLLM_USE_BREAKABLE_CUDAGRAPH is set, disabling vLLM's "
|
)
|
||||||
"torch.compile pipeline. Equivalent to -cc.mode=none."
|
|
||||||
)
|
breakable_cudagraph_enabled = is_breakable_cudagraph_enabled()
|
||||||
|
if breakable_cudagraph_enabled:
|
||||||
self.compilation_config.mode = CompilationMode.NONE
|
self.compilation_config.mode = CompilationMode.NONE
|
||||||
|
|
||||||
if self.compilation_config.backend == "eager" or (
|
if not breakable_cudagraph_enabled and (
|
||||||
self.compilation_config.mode is not None
|
self.compilation_config.backend == "eager"
|
||||||
and self.compilation_config.mode != CompilationMode.VLLM_COMPILE
|
or (
|
||||||
|
self.compilation_config.mode is not None
|
||||||
|
and self.compilation_config.mode != CompilationMode.VLLM_COMPILE
|
||||||
|
)
|
||||||
):
|
):
|
||||||
logger.warning_once(
|
logger.warning_once(
|
||||||
"Inductor compilation was disabled by user settings, "
|
"Inductor compilation was disabled by user settings, "
|
||||||
|
|||||||
Reference in New Issue
Block a user