The detected CUDA version (12.0) mismatches the version that was used to compile PyTorch (11.7)

Hi!
I get this runtimeerror when trying to run my code:

File “C:\Users\isakf\anaconda3\envs\fastreg\lib\site-packages\torch\utils\cpp_extension.py”, line 386, in _check_cuda_version
raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
RuntimeError:
The detected CUDA version (12.0) mismatches the version that was used to compile

This message is from the torch.utils.cpp_extension module.

Im struggling to see where I can download the torch version with CUDA 12 enabled.

Do you have any tips?

The PyTorch binaries do not support CUDA 12 yet and you would have to build from source using a locally installed CUDA 12.0 toolkit.

2 Likes

Hello, just curious if there is any update on pip torch supporting xformers with cuda 12. Thank you!

We are already building nightly PyTorch binaries with CUDA 12.1 but I don’t know which CUDA versions are supported in xformers.

1 Like

same problem!!, thanks. The problem with xformers, is only in the installation.