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
eeee1c3b
Unverified
Commit
eeee1c3b
authored
Aug 21, 2024
by
Woosuk Kwon
Committed by
GitHub
Aug 21, 2024
Browse files
[TPU] Avoid initializing TPU runtime in is_tpu (#7763)
parent
aae74ef9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
vllm/platforms/__init__.py
vllm/platforms/__init__.py
+4
-2
No files found.
vllm/platforms/__init__.py
View file @
eeee1c3b
...
...
@@ -8,8 +8,10 @@ current_platform: Platform
is_tpu
=
False
try
:
import
torch_xla.core.xla_model
as
xm
xm
.
xla_device
(
devkind
=
"TPU"
)
# While it's technically possible to install libtpu on a non-TPU machine,
# this is a very uncommon scenario. Therefore, we assume that libtpu is
# installed if and only if the machine has TPUs.
import
libtpu
# noqa: F401
is_tpu
=
True
except
Exception
:
pass
...
...
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