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
aaddce5d
Unverified
Commit
aaddce5d
authored
Nov 20, 2024
by
youkaichao
Committed by
GitHub
Nov 20, 2024
Browse files
[platforms] improve error message for unspecified platforms (#10520)
Signed-off-by:
youkaichao
<
youkaichao@gmail.com
>
parent
3430857b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
vllm/config.py
vllm/config.py
+2
-1
vllm/platforms/interface.py
vllm/platforms/interface.py
+1
-0
No files found.
vllm/config.py
View file @
aaddce5d
...
@@ -1191,12 +1191,13 @@ class SchedulerConfig:
...
@@ -1191,12 +1191,13 @@ class SchedulerConfig:
class
DeviceConfig
:
class
DeviceConfig
:
device
:
Optional
[
torch
.
device
]
device
:
Optional
[
torch
.
device
]
device_type
:
str
def
__init__
(
self
,
device
:
str
=
"auto"
)
->
None
:
def
__init__
(
self
,
device
:
str
=
"auto"
)
->
None
:
if
device
==
"auto"
:
if
device
==
"auto"
:
# Automated device type detection
# Automated device type detection
self
.
device_type
=
current_platform
.
device_type
self
.
device_type
=
current_platform
.
device_type
if
self
.
device_type
is
None
:
if
not
self
.
device_type
:
raise
RuntimeError
(
"Failed to infer device type"
)
raise
RuntimeError
(
"Failed to infer device type"
)
else
:
else
:
# Device type is assigned explicitly
# Device type is assigned explicitly
...
...
vllm/platforms/interface.py
View file @
aaddce5d
...
@@ -170,3 +170,4 @@ class Platform:
...
@@ -170,3 +170,4 @@ class Platform:
class
UnspecifiedPlatform
(
Platform
):
class
UnspecifiedPlatform
(
Platform
):
_enum
=
PlatformEnum
.
UNSPECIFIED
_enum
=
PlatformEnum
.
UNSPECIFIED
device_type
=
""
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