菜单

TK1初学软件教程-安装cuDNN(四)

2018年5月17日 - TK1初学软件教程

TK1初学软件教程-安装cuDNN

说明:

cuDNN :

安装cuDNN1:

mkdir ~/cuDNNR1
cd ~/cuDNNR1
git clone https://gist.github.com/jetsonhacks/fa9f4ff89006607359ea
cp fa9f4ff89006607359ea/installcuDNNR1.sh ../installcuDNNR1.sh
vim installcuDNNR1.sh
#!/bin/sh
# Install cuDNN R1 on NVIDIA Jetson TK1
# Register as a NVIDIA developer and download the cuDNN package
# Package is named cudnn-6.5-linux-armv7-R1.tgz
# This script and the cuDNN package should be in the same directory, usually ~/Downloads
# This script places the library and include files for cudnn in the CUDA 6.5 directories
# Make sure this is executing as root
if [ $(id -u) != 0 ]; then
  echo "This script requires root permissions"
  echo "$ sudo "$0""
  exit
fi
# unzip the archive
tar -zxvf cudnn-6.5-linux-armv7-R1.tgz
cd cudnn-6.5-linux-armv7-R1
# copy the include file
cp cudnn.h /usr/local/cuda-6.5/include
cp libcudnn* /usr/local/cuda-6.5/lib
chmod +x installcuDNNR1.sh
./installcuDNNR1.sh

安装cuDNNR2:

mkdir ~/cuDNNR2
cd ~/cuDNNR2
git clone https://gist.github.com/jetsonhacks/5257f2352d444c2f3240
cp  5257f2352d444c2f3240/installcuDNNR2.sh ../installcuDNNR2.sh
vim installcuDNNR2.sh
#!/bin/sh
# Install cuDNN R2 on NVIDIA Jetson TK1
# Register as a NVIDIA developer and download the cuDNN package
# Package is named cudnn-6.5-linux-ARMv7-R2-rc1.tgz
# This script and the cuDNN package should be in the same directory, usually ~/Downloads
# This script places the library and include files for cudnn in the CUDA 6.5 directories
# Make sure this is executing as root
if [ $(id -u) != 0 ]; then
  echo "This script requires root permissions"
  echo "$ sudo "$0""
  exit
fi
# unzip the archive
tar -zxvf cudnn-6.5-linux-ARMv7-R2-rc1.tgz
cd cudnn-6.5-linux-ARMv7-R2-rc1
# copy the include file
cp cudnn.h /usr/local/cuda-6.5/include
cp libcudnn* /usr/local/cuda-6.5/lib
chmod +x installcuDNNR2.sh
./installcuDNNR2.sh

Caffe使用cuDNN

# Makefile.config (only relevant cuDNN configuration items shown)
USE_CUDNN := 1
INCLUDE_DIRS := /usr/local/cuda-6.5/include
LIBRARY_DIRS := /usr/local/cuda-6.5/lib

参考:

发表评论