Spaces:
Sleeping
Sleeping
File size: 448 Bytes
efc8448 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import torch
# Check that MPS is available
if not torch.backends.mps.is_available():
if not torch.backends.mps.is_built():
print("MPS not available because the current PyTorch install was not "
"built with MPS enabled.")
else:
print("MPS not available because the current MacOS version is not 12.3+ "
"and/or you do not have an MPS-enabled device on this machine.")
else:
print("all good")
|