[CUDA] ubuntu14.04+cuda7.5下安装cudnn7.0

cuda:7.5

cudnn:cudnn-7.0-linux-x64-v4.0-prod.tgz

cudnn样例:cuDNN v4 Code Samples

1. 解压

tar -zxvf cudnn-7.0-linux-x64-v4.0-prod.tgz

2. 复制cuda/lib64和cuda/include下文件到cuda安装目录

sudo cp lib64/* /usr/local/cuda/lib64/

sudo cp include/cudnn.h /usr/local/cuda/include/

3. 更新软链接

cd /usr/local/cuda/lib64

sudo rm -rf libcudnn.so libcudnn.so.4

sudo ln -s libcudnn.so.4.0.7 libcudnn.so.4

sudo ln -s libcudnn.so.4 libcudnn.so

4. 添加环境变量

sudo gedit /etc/profile

末尾添加export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

source /etc/profile

5. 测试

解压cudnn code样例 cuDNN v4 Code Samples

tar -zxvf cudnn-sample-v4.tgz

cd mnistCUDNN

make

./mnistCUDNN

posted @ 2016-03-18 14:12  lireagan  阅读(795)  评论(0编辑  收藏  举报