Infatoshi / fcc-intro-to-llms

624 stars 261 forks source link

Cuda on Mac M1 #5

Open VictoryChianumba opened 10 months ago

VictoryChianumba commented 10 months ago

When I attempted to run the torch.cuda.is_available() function on my Mac, I got the response 'cpu'. after briefly searching on google, I have been made aware that coda is not supported on Mac. Is there some work around for this?

QueryType commented 10 months ago

CUDA is a proprietary and closed source parallel computing platform and application programming interface that allows software to use certain types of graphics processing units for general purpose processing, an approach called general-purpose computing on GPUs. It is not available on Apple machines. Use MPS instead.

import torch
import math

print(torch.backends.mps.is_available()) #the MacOS is higher than 12.3+
print(torch.backends.mps.is_built()) #MPS is activated