A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[V0 deprecation] Remove platform v1 controling interface (#25410)
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Isotr0py committed
Sep 23, 2025 at 09:48 UTC
6fa78d8f23b88da47ce6e13815e5e82226f2af00
8 files changed
-81
tests/v1/test_async_llm_dp.py
-5
@@ -13,7 +13,6 @@ from vllm import SamplingParams
13
from vllm.config import VllmConfig
14
from vllm.engine.arg_utils import AsyncEngineArgs
15
from vllm.inputs import PromptType
16
-from vllm.platforms import current_platform
16
from vllm.sampling_params import RequestOutputKind
17
from vllm.v1.engine.async_llm import AsyncLLM
18
from vllm.v1.engine.core_client import DPAsyncMPClient
@@ -29,10 +28,6 @@ engine_args = AsyncEngineArgs(
28
data_parallel_size=DP_SIZE,
29
)
30
32
-if not current_platform.supports_v1(engine_args.create_model_config()):
33
- pytest.skip(reason="Requires V1-supporting platform.",
34
- allow_module_level=True)
35
-
31
32
async def generate(
33
engine: AsyncLLM,
vllm/engine/arg_utils.py
-27
@@ -1502,12 +1502,6 @@ class EngineArgs:
1502
_raise_or_fallback(feature_name=name, recommend_to_remove=True)
1503
return False
1504
1505
- # Platforms must decide if they can support v1 for this model
1506
- if not current_platform.supports_v1(model_config=model_config):
1507
- _raise_or_fallback(
1508
- feature_name=f"device type={current_platform.device_type}",
1509
- recommend_to_remove=False)
1510
- return False
1505
#############################################################
1506
# Experimental Features - allow users to opt in.
1507
@@ -1524,12 +1518,6 @@ class EngineArgs:
1518
recommend_to_remove=False)
1519
return False
1520
1527
- # The platform may be supported on V1, but off by default for now.
1528
- if not current_platform.default_v1( # noqa: SIM103
1529
- model_config=model_config) and _warn_or_fallback(
1530
- current_platform.device_name):
1531
- return False
1532
-
1521
if (current_platform.is_cpu()
1522
and model_config.get_sliding_window() is not None):
1523
_raise_or_fallback(feature_name="sliding window (CPU backend)",
@@ -1796,21 +1784,6 @@ def _raise_or_fallback(feature_name: str, recommend_to_remove: bool):
1784
logger.warning(msg)
1785
1786
1799
-def _warn_or_fallback(feature_name: str) -> bool:
1800
- if envs.is_set("VLLM_USE_V1") and envs.VLLM_USE_V1:
1801
- logger.warning(
1802
- "Detected VLLM_USE_V1=1 with %s. Usage should "
1803
- "be considered experimental. Please report any "
1804
- "issues on Github.", feature_name)
1805
- should_exit = False
1806
- else:
1807
- logger.info(
1808
- "%s is experimental on VLLM_USE_V1=1. "
1809
- "Falling back to V0 Engine.", feature_name)
1810
- should_exit = True
1811
- return should_exit
1812
-
1813
-
1787
def human_readable_int(value):
1788
"""Parse human-readable integers like '1k', '2M', etc.
1789
Including decimal values with decimal multipliers.
vllm/platforms/cpu.py
-17
@@ -328,23 +328,6 @@ class CpuPlatform(Platform):
328
def supports_structured_output(cls) -> bool:
329
return True
330
331
- @classmethod
332
- def supports_v1(cls, model_config) -> bool:
333
- """Returns whether the current platform can support v1 for the supplied
334
- model configuration.
335
- """
336
- return True
337
-
338
- @classmethod
339
- def default_v1(cls, model_config) -> bool:
340
- """Returns whether the current platform can use v1 by default for the
341
- supplied model configuration.
342
- """
343
- arch = cls.get_cpu_architecture()
344
- return (cls.supports_v1(model_config)
345
- and arch in (CpuArchEnum.X86, CpuArchEnum.POWERPC,
346
- CpuArchEnum.ARM, CpuArchEnum.S390X))
347
-
331
@classmethod
332
def opaque_attention_op(cls) -> bool:
333
return True
vllm/platforms/cuda.py
-4
@@ -384,10 +384,6 @@ class CudaPlatformBase(Platform):
384
def supports_fp8(cls) -> bool:
385
return cls.has_device_capability(89)
386
387
- @classmethod
388
- def supports_v1(cls, model_config: "ModelConfig") -> bool:
389
- return True
390
-
387
@classmethod
388
def use_custom_allreduce(cls) -> bool:
389
return True
vllm/platforms/interface.py
-14
@@ -482,20 +482,6 @@ class Platform:
482
or parallel_config.distributed_executor_backend
483
== "external_launcher")
484
485
- @classmethod
486
- def supports_v1(cls, model_config: ModelConfig) -> bool:
487
- """Returns whether the current platform can support v1 for the supplied
488
- model configuration.
489
- """
490
- return False
491
-
492
- @classmethod
493
- def default_v1(cls, model_config: ModelConfig) -> bool:
494
- """
495
- Returns whether the current platform supports v1 by default.
496
- """
497
- return cls.supports_v1(model_config)
498
-
485
@classmethod
486
def use_custom_allreduce(cls) -> bool:
487
"""
vllm/platforms/rocm.py
-5
@@ -396,11 +396,6 @@ class RocmPlatform(Platform):
396
else:
397
return torch.float8_e4m3fn
398
399
- @classmethod
400
- def supports_v1(cls, model_config: "ModelConfig") -> bool:
401
- # V1 support on AMD gpus is experimental
402
- return True
403
-
399
@classmethod
400
def use_custom_allreduce(cls) -> bool:
401
# We only enable custom allreduce for MI300 series
vllm/platforms/tpu.py
-5
@@ -174,11 +174,6 @@ class TpuPlatform(Platform):
174
def use_all_gather(cls) -> bool:
175
return True
176
177
- @classmethod
178
- def supports_v1(cls, model_config: ModelConfig) -> bool:
179
- # V1 support on TPU is experimental
180
- return True
181
-
177
@classmethod
178
def validate_request(
179
cls,
vllm/platforms/xpu.py
-4
@@ -194,10 +194,6 @@ class XPUPlatform(Platform):
194
def get_device_communicator_cls(cls) -> str:
195
return "vllm.distributed.device_communicators.xpu_communicator.XpuCommunicator" # noqa
196
197
- @classmethod
198
- def supports_v1(cls, model_config: ModelConfig) -> bool:
199
- return True
200
-
197
@classmethod
198
def device_count(cls) -> int:
199
return torch.xpu.device_count()