3 ms·
pytorch can use the GPUs on M1 macs. Sebastian Raschka's post explains it nicely and shows some benchmarks too. https://sebastianraschka.com/blog/2022/pytorch-m
by malshe 4y ago
pytorch can use the GPUs on M1 macs. Sebastian Raschka's post explains it nicely and shows some benchmarks too. https://sebastianraschka.com/blog/2022/pytorch-m1-gpu.html https://sebastianraschka.com/blog/2022/pytorch-m1-gpu.html
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.
- crucialfelix 4y agoIn some cases there are operations not supported on mps. For those set: os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1" and it will run on cpu if some operation isn't supported
- malshe 4y agoExcellent! Thanks