检测CUDNN是否成功安装

本文以在Ubuntu 1604 环境下,CUDA 9.0 CUDNN 7.0.4 为例子介绍如何检测CUDNN是否成功安装。

cuDNN 7.0.5 安装:

tar -xvf cudnn-9.0-linux-x64-v7.tgz

cd cuda  
sudo cp include/cudnn.h /usr/local/cuda/include/   
sudo cp lib64/*  /usr/local/cuda/lib64/
sudo chmod a+r /usr/local/cuda/include/cudnn.h
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*


cd /usr/local/cuda/lib64/
sudo rm -rf libcudnn.so libcudnn.so.7
sudo ln -s libcudnn.so.7.0.5 libcudnn.so.7
sudo ln -s libcudnn.so.7 libcudnn.so 
sudo ldconfig 

cuDNN 7.0.5 检测是否成功安装:

下载链接:https://developer.nvidia.com/rdp/cudnn-archive

下载三个文件:cuDNN v7.0.5 Runtime Library for Ubuntu16.04 (Deb)

                            cuDNN v7.0.5 Develpoper Library for Ubuntu16.04 (Deb)

                            cuDNN v7.0.5 Code Samples and User Guide for Ubuntu16.04 (Deb)

检测CUDNN是否成功安装_第1张图片

sudo dpkg -i libcudnn7_7.4.2.24-1+cuda9.0_amd64.deb
sudo dpkg -i libcudnn7-dev_7.4.2.24-1+cuda9.0_amd64.deb
sudo dpkg -i libcudnn7-doc_7.4.2.24-1+cuda9.0_amd64.deb

 

cp -r /usr/src/cudnn_samples_v7/ /home/wdong/
cd /home/wdong/cudnn_samples_v7/mnistCUDNN
make clean && make
./mnistCUDNN

检测CUDNN是否成功安装_第2张图片 

 

 

你可能感兴趣的:(检测CUDNN是否成功安装)