[XPU] Disable xpu graph by default (#38193)

Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
Kunshang Ji
2026-03-26 01:53:45 -07:00
committed by GitHub
parent a9213c0ffe
commit 6ae8bbd0c2
2 changed files with 12 additions and 0 deletions
+7
View File
@@ -12,6 +12,7 @@ import vllm_xpu_kernels._C # noqa
import vllm_xpu_kernels._moe_C # noqa
import vllm_xpu_kernels._xpu_C # noqa
import vllm.envs as envs
from vllm.logger import init_logger
from vllm.utils.torch_utils import supports_xpu_graph
from vllm.v1.attention.backends.registry import AttentionBackendEnum
@@ -181,6 +182,12 @@ class XPUPlatform(Platform):
"XPU Graph is not supported in the current PyTorch version, "
"disabling cudagraph_mode."
)
elif not envs.VLLM_XPU_ENABLE_XPU_GRAPH:
compilation_config.cudagraph_mode = CUDAGraphMode.NONE
logger.warning(
"XPU Graph is disabled by environment variable, "
"please set VLLM_XPU_ENABLE_XPU_GRAPH=1 to enable it."
)
elif parallel_config.world_size_across_dp > 1:
compilation_config.cudagraph_mode = CUDAGraphMode.NONE
logger.warning(