I am quite new to deep learning/machine learning and I have been trying to use my Apple M2 to accelerate training for my CNN in Jupyter notebook however, I am finding that despite using 'mps' it performs much slower per epoch (1m 30-40 seconds) than Google Colab CPU which is taking 40 seconds per epoch.
I'm not sure why this is the case and was wondering if someone could help me understand why this might be or what I might be doing wrong.
I am checking the availability and PyTorch version and utilising it accordingly:
# Check PyTorch has access to MPS (Metal Performance Shader, Apple's GPU architecture)
print(f"Is MPS (Metal Performance Shader) built? {torch.backends.mps.is_built()}")
print(f"Is MPS available? {torch.backends.mps.is_available()}")
# Set the device
device = "mps" if torch.backends.mps.is_available() else "cpu"
print(f"Using device: {device}")
print("version : ", torch.__version__)
======================================
Is MPS (Metal Performance Shader) built? True
Is MPS available? True
Using device: mps
version : 2.2.2