Use Apple GPU on PyTorchWarningThis post is more than a year old. Information may be outdated.Lesser Known Trick. Use Apple GPU Acceleration (Metal Performance Shader) on PyTorch pyif torch.cuda.is_available(): print(f"Using NVIDIA GPU") self.device = torch.device("cuda") elif torch.backends.mps.is_available(): Backlinks1240207Comments