when I try to run python setup.py develop
(a file in openpcdet), an error eccoured
RuntimeError:
The detected CUDA version (12.1) mismatches the version that was used to compile
PyTorch (11.7). Please make sure to use the same CUDA versions.
I think it is because my pytorch is not compatiable with my cuda,but i don’t know what to do.
My environment:
-
wsl2–Ubuntu20.04
-
when I run
nvcc -V
in my terminal
i got
*nvcc: NVIDIA (R) Cuda compiler driver*
*Copyright (c) 2005-2023 NVIDIA Corporation*
*Built on Tue_Feb__7_19:32:13_PST_2023*
*Cuda compilation tools, release 12.1, V12.1.66*
*Build cuda_12.1.r12.1/compiler.32415258_0*
which shows my cuda version is 12.1
- through pytorch website I install pytorch with command
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
i run this commands in my conda env (for learning openpcdet)
>>> print(torch.backends.cudnn.version())
8500
>>> print(torch.__version__)
1.13.1
>>> print(torch.version.cuda)
11.7
>>> print(torch.backends.cudnn.version())
8500
My questions:
- how can i solve this problem
- i could only see pytorch matches cuda11.8(lastest) in the pytorch website,
so i want to know if there any problem if my cuda version is 12.1 - in the pytorch install command i saw this
pytorch-cuda=11.7
is this a cuda_toolkit? when it have conflict with my cuda12.1 which is installed through
CUDA Toolkit 12.1 Update 1 Downloads | NVIDIA Developer - do i need to uninstall my CUDA and install cuda11.7 to match pytorch?