Open sorrowyn opened 1 year ago
I wanna make sure if you have made it through, how do you solve this problem?
哥们教教怎么解决这个问题的
You have to install cuda 11.6. If you are using conda, you can install it using
conda install -c "nvidia/label/cuda-11.6.2" cuda-toolkit
Yeah that's doesn't work.
Actual solution: make sure nvcc --version matches your pytorch nvidia version.
export CUDA_PATH=$(which nvcc)/../..
Chances are you using arch so also set
export CXX=/usr/bin/g++-11
export CC=/usr/bin/gcc-11
Chances are you need the following as well.
conda install -c "nvidia/label/cuda-11.7.1" cuda-cudart
conda install ninja
mkdir /home/amai/.conda/envs/th2/lib64
sudo ln -s /home/amai/.conda/envs/th2/lib/libcudart.so.11.0 /home/amai/.conda/envs/th2/lib64
sudo ln -s /home/amai/.conda/envs/th2/lib/libcudart.so.11.7.99 /home/amai/.conda/envs/th2/lib64
sudo ln -s /home/amai/.conda/envs/th2/lib/libcudart.so /home/amai/.conda/envs/th2/lib64
Just do:
export PATH=/usr/local/cuda-11.8/bin:$PATH
after making sure that the path exists.
conda resets your PATH
variable, so check nvcc --version
.
RuntimeError: The detected CUDA version (12.1) mismatches the version that was used to compile PyTorch (11.6). Please make sure to use the same CUDA versions.