Install cudnn5.1 under cuda8.0 under ubuntu

Previously installed CUDA8.0.61 in the article https://www.jianshu.com/p/d60fe13c1cd1,
now based on cuda8.0, try to install cudnn5.1 version.
Reference blog post:
https://www.jianshu.com/p/5f13e0f36636
https://blog.csdn.net/junqing_wu/article/details/79818696
https://blog.csdn.net/autocyz/article/details/52299889
https://blog.csdn.net/qq_40806289/article/details/90643603
https://blog.csdn.net/jinyuan7708/article/details/79642924


1. Download cuDNN

Download cudnn on the official website of nvidia https://developer.nvidia.com/rdp/cudnn-archive.
Here you can see
image.png
that each version of cuDNN has a corresponding CUDA version. The latest CUDA8.0 can be installed to the cuDNN version 7.1.4 (
Download cuDNN v7.1.4 (May 16, 2018), for CUDA 8.0).
However, for personal needs, I will not install the latest version here. I personally need to install the version of cuDNN5.1; if there is no problem in the future, you can consider installing the new version of cudnn.
image.png

cuDNN v5.1 Library for Linux

image.png
To download, you need to log in to your NVIDIA account. You can’t download without the ladder. The download will be fast if you hang the ladder.

image.png

You can download after logging in

image.png

The download result is a 98.3M compressed package:

image.png

2. Installation

After downloading cudnn5.1, unzip it,

sudo cp cuda/include/cudnn.h /usr/local/cuda/include/    #复制头文件
sudo cp cuda/lib64/lib* /usr/local/cuda/lib64/    #复制动态链接库
sudo chmod a+r  /usr/local/cuda/include/cudnn.h  
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*

PS: For some of the tutorials, deleting the original dynamic files + generating soft connections is not very reliable.
So far, cudnn is installed! In fact, the purpose of installing cudnn is to copy the corresponding files to cuda.

verification

cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

The verification result is shown in the figure:

Picture.png

Guess you like

Origin blog.csdn.net/LemonShy2019/article/details/114582192