Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
6e9cc73f
Unverified
Commit
6e9cc73f
authored
Jun 18, 2025
by
Ning Xie
Committed by
GitHub
Jun 17, 2025
Browse files
[MISC] correct DeviceConfig device field static type analysis (#19699)
Signed-off-by:
Andy Xie
<
andy.xning@gmail.com
>
parent
c53711bd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
vllm/config.py
vllm/config.py
+5
-2
vllm/engine/arg_utils.py
vllm/engine/arg_utils.py
+2
-1
No files found.
vllm/config.py
View file @
6e9cc73f
...
...
@@ -2285,7 +2285,7 @@ Device = Literal["auto", "cuda", "neuron", "cpu", "tpu", "xpu", "hpu"]
class
DeviceConfig
:
"""Configuration for the device to use for vLLM execution."""
device
:
SkipValidation
[
Union
[
Device
,
torch
.
device
]]
=
"auto"
device
:
SkipValidation
[
Optional
[
Union
[
Device
,
torch
.
device
]]
]
=
"auto"
"""Device type for vLLM execution.
This parameter is deprecated and will be
removed in a future release.
...
...
@@ -2327,7 +2327,10 @@ class DeviceConfig:
"to turn on verbose logging to help debug the issue."
)
else
:
# Device type is assigned explicitly
if
isinstance
(
self
.
device
,
str
):
self
.
device_type
=
self
.
device
elif
isinstance
(
self
.
device
,
torch
.
device
):
self
.
device_type
=
self
.
device
.
type
# Some device types require processing inputs on CPU
if
self
.
device_type
in
[
"neuron"
]:
...
...
vllm/engine/arg_utils.py
View file @
6e9cc73f
...
...
@@ -1018,7 +1018,8 @@ class EngineArgs:
from
vllm.platforms
import
current_platform
current_platform
.
pre_register_and_update
()
device_config
=
DeviceConfig
(
device
=
current_platform
.
device_type
)
device_config
=
DeviceConfig
(
device
=
cast
(
Device
,
current_platform
.
device_type
))
model_config
=
self
.
create_model_config
()
# * If VLLM_USE_V1 is unset, we enable V1 for "supported features"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment