# test_pytorch_m1.py # Ref: https://towardsdatascience.com/installing-pytorch-on-apple-m1-chip-with-gpu-acceleration-3351dc44d67c # # author: deng # date : 20230301 import torch import math print('This ensures that the current MacOS version is at least 12.3+') print(torch.backends.mps.is_available()) print('\nThis ensures that the current current PyTorch installation was built with MPS activated.') print(torch.backends.mps.is_built())