@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 5d7f545204
Fork 0

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 15, 09:45 UTC

[Frontend] deprecate `--device` arg (#18399)

Signed-off-by: Kebe <mail@kebe7jun.com>

Kebe committed May 21, 2025 at 16:21 UTC 5d7f5452044c2a21dcd75fd8d4266a25052fe43b
3 files changed +9 -4
docs/source/getting_started/installation/gpu/xpu.inc.md
-1
@@ -66,7 +66,6 @@ XPU platform supports **tensor parallel** inference/serving and also supports **
66 python -m vllm.entrypoints.openai.api_server \
67 --model=facebook/opt-13b \
68 --dtype=bfloat16 \
69 - --device=xpu \
69 --max_model_len=1024 \
70 --distributed-executor-backend=ray \
71 --pipeline-parallel-size=2 \
vllm/config.py
+5 -1
@@ -2201,7 +2201,11 @@ class DeviceConfig:
2201 """Configuration for the device to use for vLLM execution."""
2202
2203 device: Union[Device, torch.device] = "auto"
2204 - """Device type for vLLM execution."""
2204 + """Device type for vLLM execution.
2205 + This parameter is deprecated and will be
2206 + removed in a future release.
2207 + It will now be set automatically based
2208 + on the current platform."""
2209 device_type: str = field(init=False)
2210 """Device type from the current platform. This is set in
2211 `__post_init__`."""
vllm/engine/arg_utils.py
+4 -2
@@ -737,7 +737,9 @@ class EngineArgs:
737 title="DeviceConfig",
738 description=DeviceConfig.__doc__,
739 )
740 - device_group.add_argument("--device", **device_kwargs["device"])
740 + device_group.add_argument("--device",
741 + **device_kwargs["device"],
742 + deprecated=True)
743
744 # Speculative arguments
745 speculative_group = parser.add_argument_group(
@@ -977,7 +979,7 @@ class EngineArgs:
979 from vllm.platforms import current_platform
980 current_platform.pre_register_and_update()
981
980 - device_config = DeviceConfig(device=self.device)
982 + device_config = DeviceConfig(device=current_platform.device_type)
983 model_config = self.create_model_config()
984
985 # * If VLLM_USE_V1 is unset, we enable V1 for "supported features"