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
dd344e03
Unverified
Commit
dd344e03
authored
Mar 14, 2025
by
yarongmu-google
Committed by
GitHub
Mar 15, 2025
Browse files
[Bugfix] Fix torch_xla in V0 which can't handle None seed introduced … (#14844)
Signed-off-by:
Yarong Mu
<
ymu@google.com
>
parent
54a88044
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
vllm/worker/tpu_worker.py
vllm/worker/tpu_worker.py
+3
-0
No files found.
vllm/worker/tpu_worker.py
View file @
dd344e03
...
@@ -51,6 +51,9 @@ class TPUWorker(LoRANotSupportedWorkerBase, LocalOrDistributedWorkerBase):
...
@@ -51,6 +51,9 @@ class TPUWorker(LoRANotSupportedWorkerBase, LocalOrDistributedWorkerBase):
self
.
model_runner
:
TPUModelRunner
=
TPUModelRunner
(
self
.
model_runner
:
TPUModelRunner
=
TPUModelRunner
(
vllm_config
=
vllm_config
,
is_driver_worker
=
is_driver_worker
)
vllm_config
=
vllm_config
,
is_driver_worker
=
is_driver_worker
)
if
self
.
model_config
.
seed
is
None
:
self
.
model_config
.
seed
=
0
def
init_device
(
self
)
->
None
:
def
init_device
(
self
)
->
None
:
os
.
environ
[
"PJRT_DEVICE"
]
=
"TPU"
os
.
environ
[
"PJRT_DEVICE"
]
=
"TPU"
torch
.
set_grad_enabled
(
False
)
torch
.
set_grad_enabled
(
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