Skip to content

Commit

Permalink
pytest mps check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jeshraghian committed Oct 10, 2023
1 parent 71b14d6 commit fc383f9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_backprop.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
from unittest import mock
import torch

device = (
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("mps") if torch.backends.mps.is_available() else torch.device("cpu")
device = device = (
torch.device("cuda")
if torch.cuda.is_available()
else (
torch.device("mps")
if torch.backends.mps.is_available()
else torch.device("cpu")
)
)


Expand Down

0 comments on commit fc383f9

Please sign in to comment.