From 5a7fc3de4372dee8caf3326f4f459e08fa59c909 Mon Sep 17 00:00:00 2001 From: mgoin Date: Mon, 5 May 2025 17:32:02 +0000 Subject: [PATCH 1/2] [V1] Enable TPU V1 backend by default Signed-off-by: mgoin --- vllm/engine/arg_utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vllm/engine/arg_utils.py b/vllm/engine/arg_utils.py index 08dbb4c45039..56236f31dc5f 100644 --- a/vllm/engine/arg_utils.py +++ b/vllm/engine/arg_utils.py @@ -1354,9 +1354,10 @@ def _is_v1_supported_oracle(self, model_config: ModelConfig) -> bool: if is_eagle_enabled and _warn_or_fallback("Eagle"): return False - # Non-CUDA is supported on V1, but off by default for now. - not_cuda = not current_platform.is_cuda() - if not_cuda and _warn_or_fallback( # noqa: SIM103 + # Non-[CUDA, TPU] is supported on V1, but off by default for now. + v0_hardware = not any(current_platform.is_cuda(), + current_platform.is_tpu()) + if v0_hardware and _warn_or_fallback( # noqa: SIM103 current_platform.device_name): return False ############################################################# From 96069fb3aa0d0d02a0e37f3ed3b34b7a64d75053 Mon Sep 17 00:00:00 2001 From: mgoin Date: Mon, 5 May 2025 19:53:15 +0000 Subject: [PATCH 2/2] Fix error Signed-off-by: mgoin --- vllm/engine/arg_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vllm/engine/arg_utils.py b/vllm/engine/arg_utils.py index 56236f31dc5f..d20ef68434c7 100644 --- a/vllm/engine/arg_utils.py +++ b/vllm/engine/arg_utils.py @@ -1354,9 +1354,9 @@ def _is_v1_supported_oracle(self, model_config: ModelConfig) -> bool: if is_eagle_enabled and _warn_or_fallback("Eagle"): return False - # Non-[CUDA, TPU] is supported on V1, but off by default for now. - v0_hardware = not any(current_platform.is_cuda(), - current_platform.is_tpu()) + # Non-[CUDA, TPU] may be supported on V1, but off by default for now. + v0_hardware = not any( + (current_platform.is_cuda(), current_platform.is_tpu())) if v0_hardware and _warn_or_fallback( # noqa: SIM103 current_platform.device_name): return False