How to upgrade the installed cudnn version Ubuntu16.04 Linux (Caffe, TensorFlow) [take cudnn5.1.10 to 6.0.21 as an example]

They are all lazy pots. . .

Installed: cudnn 5.1.10

Now requires: cudnn 6.0.21

1. Download the new version of cudnn

You can download         it on the official website , of course you need to log in and survey yourself, then select download -> I Agree... -> Archived cuDNN Releases -> find the required version of cudnn that matches your CUDA (cudnn 6.0.21)

        If you are lazy than me, here is the downloaded version: Link: https://pan.baidu.com/s/1Q-NcMe7ZNTXvddIFNjESUg Password: 7fik

2. Delete the original cudnn

        Including the original decompressed cudnn directory, the old version libcudnn.so, libcudnn.so.x, libcudnn.so.xxx in the original /usr/local/cuda-8.0/lib64

#command line operation
cd /usr/local/cuda-8.0/lib64/ sudo rm -rf libcudnn.so libcudnn.so.5 libcudnn.so.5.
1.10#Delete the original dynamic file

3. Install the new version of cudnn

cd /home/isio/cuda/include #The directory where your new version of cudnn is decompressed
sudo cp cudnn.h /usr/local/cuda-8.0/include/ #Copy the header file to the cuda include directory
cd /home/isio/cuda/lib64 #The lib directory after decompression of your new version of cudnn
sudo cp lib* /usr/local/cuda-8.0/lib64/ #Copy the dynamic link library to your cuda directory

cd /usr/local/cuda-8.0/lib64/ #Enter the lib64 directory of cuda
#Generate a soft connection according to the file name of your new version of cudnn, the file name can be seen in the decompressed directory
sudo ln -s libcudnn.so.6.0.21 libcudnn.so.6
sudo ln -s libcudnn.so.6 libcudnn.so

4. Check the installation

locate libcudnn.so #View the list

5. Test Architecture Availability

TensorFlow can be used directly, Caffe needs to be recompiled.

See this blog for the corresponding TensorFlow version

To recompile Caffe, you need to cd to the Caffe directory, and then use

sudo make all -j4 #Recompile all caffe


End

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324732373&siteId=291194637