NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation

Hello, I’m getting following error:
NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.
If you want to use the NVIDIA GeForce RTX 3090 GPU with PyTorch, please check the instructions at Start Locally | PyTorch

I’ve tried to install compatible version but I don’t think I’m doing it correctly. Can anyone help me to get it installed correctly?

$ python3 -m pip list | grep torch
torch                   1.10.1              
torchvision             0.11.2
$ which pip3
/usr/bin/pip3

CUDA Version : 11.4

You’ve most likely installed the binaries with the CUDA10.2 runtime, which is incompatible with your 3090. Install the pip wheels or conda binaries with CUDA11 and it should work.

Can you clarify why you tagged torchx? It doesn’t seem like you are using it, but I want to make sure that is the case.

Yes, you are right. Did mistake. I’ve fixed it. It works now. Thanks for replying.

I am facing the exact error. Following your advice I did the following:

  • To install cuda 11 I used following command:
    sudo sh cuda_11.4.0_470.42.01_linux.run --toolkit --silent --override

And I confirm to see the following when I use nvcc -V linux command:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Wed_Jun__2_19:15:15_PDT_2021
Cuda compilation tools, release 11.4, V11.4.48
Build cuda_11.4.r11.4/compiler.30033411_0

However, I still get the above error! I am wondering if you might have any advice/comment?
Thanks

https://download.pytorch.org/whl/cu114/torch_stable.html doesn’t seem to be a valid URL so I guess you might have installed the (default) CUDA10.2 wheels?
What did the install log show and what does torch.version.cuda as well as torch.cuda.get_arch_list() return?

Many thanks @ptrblck for quick response and the smart suggestions. You are correct! Here is the output of the two commands

torch.cuda.get_arch_list()
[‘sm_37’, ‘sm_50’, ‘sm_60’, ‘sm_70’]

torch.version.cuda
‘10.2’

apparently the cuda version used by torch is still 10.2
I uninstalled the torch and installed the pip3 command using this valid link instead :https://download.pytorch.org/whl/cu113/torch_stable.html

However, I still note that the torch.version.cuda returns ‘10.2’ ! while both nvidia-smi and nvcc -V both are cuda 11 ! could it be because I have different versions of cuda toolkit installed (btw, I have the link to the latest in my PATH and LD_LIBRARY_PATH)

No, since the pip wheels and conda binaries ship with their own CUDA runtime. Your local CUDA toolkit will be used if you are building PyTorch from source or a custom CUDA extension.
Run the uninstall command a few times until pip and conda don’t find any PyTorch installations anymore and verify it via pip list | grep torch and conda list | grep torch. Then reinstall the correct wheels again. Alternatively, create a new virtual environment and install the CUDA11 wheels there.

1 Like

@ptrblck, many thanks for your help.
Confirming that the problem resolved by:
1- creating new conda env
2- installing pytorch 1.9.0 with cuda 11.1 wheel