I’ve got the following function to check whether MPS is enabled in Pytorch on my MacBook Pro Apple M2 Max. I get the response:
MPS is not available
MPS is not built
def check_mps():
if torch.backends.mps.is_available():
print("MPS is available")
else:
print("MPS is not available")
if torch.backends.mps.is_built():
print("MPS is built")
else:
print("MPS is not built")
if torch.backends.mps.is_macos_or_newer(13, 0):
print("MPS is macOS 13 or newer")
else:
print("MPS is not macOS 13 or newer")
I’ve already verified my OS is up-to-date, and I’m not seeing many other steps to get Pytorch running on Metal. What am I missing?