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
ed6f002d
Unverified
Commit
ed6f002d
authored
Aug 27, 2024
by
youkaichao
Committed by
GitHub
Aug 27, 2024
Browse files
[cuda][misc] error on empty CUDA_VISIBLE_DEVICES (#7924)
parent
b09c755b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
vllm/platforms/cuda.py
vllm/platforms/cuda.py
+3
-0
No files found.
vllm/platforms/cuda.py
View file @
ed6f002d
...
...
@@ -84,6 +84,9 @@ except ModuleNotFoundError:
def
device_id_to_physical_device_id
(
device_id
:
int
)
->
int
:
if
"CUDA_VISIBLE_DEVICES"
in
os
.
environ
:
device_ids
=
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
].
split
(
","
)
if
device_ids
==
[
""
]:
raise
RuntimeError
(
"CUDA_VISIBLE_DEVICES is set to empty string,"
" which means GPU support is disabled."
)
physical_device_id
=
device_ids
[
device_id
]
return
int
(
physical_device_id
)
else
:
...
...
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