cuda version update

 The computing power of RTX 3090 is 8.6, and the pytorch version must be above 11.1, otherwise the code cannot be run on the GPU, and the corresponding cuda version should also be updated

One, uninstall the original cuda

sudo /usr/local/cuda-10.0/bin/uninstall_cuda_10.0.pl
sudo rm -rf /usr/local/cuda-10.0

Second, install cuda

  1. cuda11.1 URL: CUDA Toolkit 11.1.0 | NVIDIA Developer

  1. After selecting, copy the link below to the Linux terminal

wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run

sudo sh cuda_11.1.0_455.23.05_linux.run

  1. During the installation process, the following interface will pop up

Since the graphics card driver has been installed before, select the driver here, click Enter to remove the X number, and then select Install and press Enter to install normally. 4. Open the .bashrc file (in the home directory), and enter the following lines

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

export PATH=$PATH:/usr/local/cuda/bin

export CUDA_HOME=$CUDA_HOME:/usr/local/cuda

  1. After saving, exit and enter source ~/.bashrc to activate

  1. Enter nvcc -V in the terminal to see if cuda is installed successfully

  1. Re-download the pytorch corresponding to cuda11.1 version

conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c nvidia

Guess you like

Origin blog.csdn.net/weixin_48154979/article/details/129546420