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
91294d56
Unverified
Commit
91294d56
authored
Aug 12, 2024
by
sasha0552
Committed by
GitHub
Aug 12, 2024
Browse files
[Bugfix] Handle PackageNotFoundError when checking for xpu version (#7398)
parent
a046f863
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
vllm/utils.py
vllm/utils.py
+5
-2
No files found.
vllm/utils.py
View file @
91294d56
...
...
@@ -344,8 +344,11 @@ def is_tpu() -> bool:
@
lru_cache
(
maxsize
=
None
)
def
is_xpu
()
->
bool
:
from
importlib.metadata
import
version
from
importlib.metadata
import
PackageNotFoundError
,
version
try
:
is_xpu_flag
=
"xpu"
in
version
(
"vllm"
)
except
PackageNotFoundError
:
return
False
# vllm is not build with xpu
if
not
is_xpu_flag
:
return
False
...
...
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