After recently upgrading some code to a newer version of PyTorch, I found that it would no longer successfully execute on NVIDIA Tesla K40 GPUs. In particular, I was seeing the following error whenever a model's .forward() function was called:

RuntimeError: CUDA error: no kernel image is available for execution on the device

Turns out that PyTorch v1.3.1 dropped support for GPUs with NVIDIA compute capability 3.5 in their prebuilt binaries that you'd get from pip or conda —the stated reason was that supporting these older GPUs would have pushed binary sizes past acceptable limits for distribution.

I built new binaries that add back support for these older GPUs (e.g., K40) and will be uploading them at https://github.com/nelson-liu/pytorch-manylinux-binaries/releases for each PyTorch release. You can also find the download links at nelsonliu.me/files/pytorch/whl/torch_stable.html , and these binaries are pip-installable via (change the desired PyTorch / CUDA version, as necessary):

pip install torch==1.3.1+cu92 -f https://nelsonliu.me/files/pytorch/whl/torch_stable.html