RuntimeError: PyTorch 1.8.1+cu102 and NVIDIA A100-SXM4-40GB

Hi Folks,

The current version of PyTorch in my Conda environment is 1.8.1+cu102. My code throws following warning and error

NVIDIA A100-SXM4-40GB with CUDA capability sm_80 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.

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

It will be really great to have a solution without disturbing the current PyTorch version.

Thanks in advance :slight_smile:

Your Ampere GPU (A100) needs CUDA 11.x and is not compatible with CUDA 10.2, which you are using right now. Install the current binaries with any CUDA 11 or 12 runtime and it will work.

Thanks @ptrblck, what is the correct approach to install the current binaries with any CUDA 11 or 12 ? Do I need to create another conda environment and install all the dependencies ? Or there is any way to fix the current environment ?

No, you don’t need conda and can just copy paste the install command from the install matrix into a clean and empty environment.