Skip to content

Commit d27db24

Browse files
Isotr0pyFeiDaLI
authored andcommitted
[V0 deprecation] Remove platform v1 controling interface (vllm-project#25410)
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
1 parent 006cc7b commit d27db24

File tree

8 files changed

+0
-81
lines changed

8 files changed

+0
-81
lines changed

tests/v1/test_async_llm_dp.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from vllm.config import VllmConfig
1414
from vllm.engine.arg_utils import AsyncEngineArgs
1515
from vllm.inputs import PromptType
16-
from vllm.platforms import current_platform
1716
from vllm.sampling_params import RequestOutputKind
1817
from vllm.v1.engine.async_llm import AsyncLLM
1918
from vllm.v1.engine.core_client import DPAsyncMPClient
@@ -29,10 +28,6 @@
2928
data_parallel_size=DP_SIZE,
3029
)
3130

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-
3631

3732
async def generate(
3833
engine: AsyncLLM,

vllm/engine/arg_utils.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,12 +1502,6 @@ def _is_v1_supported_oracle(self, model_config: ModelConfig) -> bool:
15021502
_raise_or_fallback(feature_name=name, recommend_to_remove=True)
15031503
return False
15041504

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
15111505
#############################################################
15121506
# Experimental Features - allow users to opt in.
15131507

@@ -1524,12 +1518,6 @@ def _is_v1_supported_oracle(self, model_config: ModelConfig) -> bool:
15241518
recommend_to_remove=False)
15251519
return False
15261520

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-
15331521
if (current_platform.is_cpu()
15341522
and model_config.get_sliding_window() is not None):
15351523
_raise_or_fallback(feature_name="sliding window (CPU backend)",
@@ -1796,21 +1784,6 @@ def _raise_or_fallback(feature_name: str, recommend_to_remove: bool):
17961784
logger.warning(msg)
17971785

17981786

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-
18141787
def human_readable_int(value):
18151788
"""Parse human-readable integers like '1k', '2M', etc.
18161789
Including decimal values with decimal multipliers.

vllm/platforms/cpu.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -328,23 +328,6 @@ def get_device_communicator_cls(cls) -> str:
328328
def supports_structured_output(cls) -> bool:
329329
return True
330330

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-
348331
@classmethod
349332
def opaque_attention_op(cls) -> bool:
350333
return True

vllm/platforms/cuda.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,6 @@ def get_device_communicator_cls(cls) -> str:
384384
def supports_fp8(cls) -> bool:
385385
return cls.has_device_capability(89)
386386

387-
@classmethod
388-
def supports_v1(cls, model_config: "ModelConfig") -> bool:
389-
return True
390-
391387
@classmethod
392388
def use_custom_allreduce(cls) -> bool:
393389
return True

vllm/platforms/interface.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -482,20 +482,6 @@ def use_all_gather(cls) -> bool:
482482
or parallel_config.distributed_executor_backend
483483
== "external_launcher")
484484

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-
499485
@classmethod
500486
def use_custom_allreduce(cls) -> bool:
501487
"""

vllm/platforms/rocm.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,6 @@ def fp8_dtype(cls) -> torch.dtype:
396396
else:
397397
return torch.float8_e4m3fn
398398

399-
@classmethod
400-
def supports_v1(cls, model_config: "ModelConfig") -> bool:
401-
# V1 support on AMD gpus is experimental
402-
return True
403-
404399
@classmethod
405400
def use_custom_allreduce(cls) -> bool:
406401
# We only enable custom allreduce for MI300 series

vllm/platforms/tpu.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,6 @@ def get_device_communicator_cls(cls) -> str:
174174
def use_all_gather(cls) -> bool:
175175
return True
176176

177-
@classmethod
178-
def supports_v1(cls, model_config: ModelConfig) -> bool:
179-
# V1 support on TPU is experimental
180-
return True
181-
182177
@classmethod
183178
def validate_request(
184179
cls,

vllm/platforms/xpu.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,6 @@ def is_data_center_gpu(cls) -> bool:
194194
def get_device_communicator_cls(cls) -> str:
195195
return "vllm.distributed.device_communicators.xpu_communicator.XpuCommunicator" # noqa
196196

197-
@classmethod
198-
def supports_v1(cls, model_config: ModelConfig) -> bool:
199-
return True
200-
201197
@classmethod
202198
def device_count(cls) -> int:
203199
return torch.xpu.device_count()

0 commit comments

Comments
 (0)