Skip to content

Commit

Permalink
add mps to _set_device() in io
Browse files Browse the repository at this point in the history
  • Loading branch information
gonlairo authored and stes committed Jul 5, 2023
1 parent e92f9bc commit 42965ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cebra/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _set_device(self, device):
return
if not isinstance(device, str):
device = device.type
if device not in ("cpu", "cuda"):
if device not in ("cpu", "cuda", "mps"):
if device.startswith("cuda"):
_, id_ = device.split(":")
if int(id_) >= torch.cuda.device_count():
Expand Down

0 comments on commit 42965ea

Please sign in to comment.