Skip to content

Commit

Permalink
[torchax][distributed] Use local device for default jax device (#8667)
Browse files Browse the repository at this point in the history
Co-authored-by: Siyuan Liu <lsiyuan@google.coim>
  • Loading branch information
lsy323 and Siyuan Liu authored Feb 3, 2025
1 parent 9ae017e commit 3578940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchax/torchax/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def get_as_jax_device(self, device: Any):

if device == 'cpu':
return jax.devices('cpu')[0]
return jax.devices()[0]
return jax.local_devices()[0]


def load_ops(self):
Expand Down

0 comments on commit 3578940

Please sign in to comment.