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
c9b506da
Unverified
Commit
c9b506da
authored
Apr 02, 2024
by
Nick Hill
Committed by
GitHub
Apr 02, 2024
Browse files
[BugFix] Use different mechanism to get vllm version in `is_cpu()` (#3804)
parent
5757d90e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
vllm/utils.py
vllm/utils.py
+5
-3
No files found.
vllm/utils.py
View file @
c9b506da
...
...
@@ -119,9 +119,11 @@ def is_hip() -> bool:
@
lru_cache
(
maxsize
=
None
)
def
is_cpu
()
->
bool
:
from
importlib.metadata
import
version
is_cpu_flag
=
"cpu"
in
version
(
"vllm"
)
return
is_cpu_flag
from
importlib.metadata
import
PackageNotFoundError
,
version
try
:
return
"cpu"
in
version
(
"vllm"
)
except
PackageNotFoundError
:
return
False
@
lru_cache
(
maxsize
=
None
)
...
...
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