Upgrade CUDA and cuDNN
Remove old version
If your graph drvier supports desire CUDA version, do not need to remove the exsiting driver.
Check the following link: https://docs.nvidia.com/deploy/cuda-compatibility/index.html
To remove CUDA Toolkit:
$ sudo apt-get --purge remove "*cublas*" "*cufft*" "*curand*" \
"*cusolver*" "*cusparse*" "*npp*" "*nvjpeg*" "cuda*" "nsight*"To remove NVIDIA Drivers:
$ sudo apt-get --purge remove "*nvidia*"To clean up the uninstall:
$ sudo apt-get autoremoveFrom offical document: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
Donwload and Install CUDA and cuDNN
CUDA
During the installation, uncheck graph driver.
# runfile(local)
wget https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run
sudo sh cuda_11.0.3_450.51.06_linux.runEnvironment Variable Setting
vim ~/.bashrc
export PATH=/usr/local/cuda-11.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH
Version Check
nvcc --versionInstall cuDNN
The following instruction is based on zip file of linux version.
$ sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
$ sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
$ sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*Conda cudatoolkit의 차이점conda install cudatoolkit으로 설치된 library는 apt install로 설치된 것과는 다르지만 PyTorch등의 DL Framework에서 필요로 하는 부분들은 모두 담고 있다.nvcc compiler는 따로 설치 되지 않으므로 필요할 경우 cudatoolkit을 모두 설치해야 할 수 있음.
Check version
# Before cuDNN 8.x
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
# After cuDNN 8.x
cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2dpkg 설치시
dpkg -l | grep cuDNN
ii libcudnn8 8.1.0.77-1+cuda11.2 amd64 cuDNN runtime libraries
ii libcudnn8-dev 8.1.0.77-1+cuda11.2 amd64 cuDNN development libraries and headers
ii libcudnn8-samples 8.1.0.77-1+cuda11.2 amd64 cuDNN documents and samples
dpkg -l | grep CUDA
Change cuDNN version
$ sudo update-alternatives --config libcudnn
There is 1 choice for the alternative libcudnn (providing /usr/include/cudnn.h).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/include/x86_64-linux-gnu/cudnn_v8.h 80 auto mode
* 1 /usr/include/x86_64-linux-gnu/cudnn_v8.h 80 manual mode'AI > NVIDIA' 카테고리의 다른 글
| TensorRT 개론 및 Docker기반 실행 (0) | 2021.02.04 |
|---|---|
| TensorRT이용한 Xavier DLA (NVDLA) 실행 (4) | 2019.02.08 |
| NVDLA: NVIDIA Deep Learning Accelerator (DLA) 개론 (0) | 2019.02.08 |
| NVIDIA AI Tech Workshop at NIPS 2018 -- Session3: Inference and Quantization (0) | 2019.02.06 |
| DeepStream을 통한 low precision YOLOv3 실행 (0) | 2019.01.24 |