> A decent computer with either a CUDA supported graphics card or M1 processor.
Why so? How does an M1 processor replace CUDA in a way a x86_64 processor can't? Do they use ARM assembly?
Those in turn have hardware accelerated backends. Traditionally they’ve only had CUDA backends but Apple ported large chunks of both to Metal as well.
So none of these libraries really target CUDA. In fact they’d run fine without a supported GPU but much slower.
From his post:
if you want to run PyTorch code on the GPU, use torch.device("mps") analogous to torch.device("cuda") on an Nvidia GPU.
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
and it will run on cpu if some operation isn't supported