Skip to content

Commit 64e431c

Browse files
committed
fix macos-14
1 parent 075315d commit 64e431c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/prototype/test_parq.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@
5151
torch_version_at_least,
5252
)
5353

54-
_DEVICE = torch.device(
55-
torch.accelerator.current_accelerator().type
56-
if torch.accelerator.is_available()
57-
else "cpu"
58-
)
54+
if torch.cuda.is_available():
55+
_DEVICE = "cuda"
56+
elif torch.xpu.is_available():
57+
_DEVICE = "xpu"
58+
else:
59+
_DEVICE = "cpu"
5960

6061

6162
class M(nn.Module):

0 commit comments

Comments
 (0)