Pytorch+GPU silently fails with the previous tutorial. It means that with a simple command similar to this "torch.cuda.is_available()" it will show the GPU. It would even "allocate" a tensor to the device with a command similar to this "y = torch.tensor([1,4,9]).to(device)". However, when doing more advanced commands such as ".forward()" or even matrices operations it would print an error similar to this "RuntimeError: CUDA error: no kernel image is available for execution on the device" .
The following command above fixes the issue. The pip command installed pytorch in this directory "/users/kfotso/.conda/envs/compat_gpu/lib/python3.7/site-packages/" .
Pytorch+GPU silently fails with the previous tutorial. It means that with a simple command similar to this "torch.cuda.is_available()" it will show the GPU. It would even "allocate" a tensor to the device with a command similar to this "y = torch.tensor([1,4,9]).to(device)". However, when doing more advanced commands such as ".forward()" or even matrices operations it would print an error similar to this "RuntimeError: CUDA error: no kernel image is available for execution on the device" . The following command above fixes the issue. The pip command installed pytorch in this directory "/users/kfotso/.conda/envs/compat_gpu/lib/python3.7/site-packages/" .
More info here: --> https://blog.nelsonliu.me/2020/10/13/newer-pytorch-binaries-for-older-gpus/ and here https://github.com/pytorch/pytorch/issues/30532 . Package can be found here: --> https://github.com/nelson-liu/pytorch-manylinux-binaries/releases I just downloaded the latest version from there.
################################# Below is the proof