update file description and reference

This commit is contained in:
2023-03-01 17:13:17 +08:00
parent a0ac14d0f7
commit ec19042d0d
2 changed files with 38 additions and 4 deletions

View File

@ -1,8 +1,14 @@
# 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('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('\nThis ensures that the current current PyTorch installation was built with MPS activated.')
print(torch.backends.mps.is_built())