summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemysław Dolata <snowball91b@gmail.com>2017-11-07 11:56:12 (GMT)
committerGitHub <noreply@github.com>2017-11-07 11:56:12 (GMT)
commitc430690aa5528e94e019971b94de325539984e77 (patch)
tree6912897fbcec380b18dc99cb1cdbe3b5b4b83e60
parent613e13bef77d4f9ecda21f33b7c66a4758e1c5c9 (diff)
parentcd2a0140d60742d4f66cc1668a2554bdc7a1ca3c (diff)
downloadcaffe-c430690aa5528e94e019971b94de325539984e77.zip
caffe-c430690aa5528e94e019971b94de325539984e77.tar.gz
caffe-c430690aa5528e94e019971b94de325539984e77.tar.bz2
Merge pull request #5972 from icyblade/icyblade-patch-1
add support for cuDNN v7
-rw-r--r--docs/installation.md4
-rw-r--r--include/caffe/util/cudnn.hpp6
-rwxr-xr-xscripts/travis/install-deps.sh2
3 files changed, 9 insertions, 3 deletions
diff --git a/docs/installation.md b/docs/installation.md
index 42f1d0c..6104cc2 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -42,14 +42,14 @@ Optional dependencies:
* [OpenCV](http://opencv.org/) >= 2.4 including 3.0
* IO libraries: `lmdb`, `leveldb` (note: leveldb requires `snappy`)
-* cuDNN for GPU acceleration (v6)
+* cuDNN for GPU acceleration (v7)
Pycaffe and Matcaffe interfaces have their own natural needs.
* For Python Caffe: `Python 2.7` or `Python 3.3+`, `numpy (>= 1.7)`, boost-provided `boost.python`
* For MATLAB Caffe: MATLAB with the `mex` compiler.
-**cuDNN Caffe**: for fastest operation Caffe is accelerated by drop-in integration of [NVIDIA cuDNN](https://developer.nvidia.com/cudnn). To speed up your Caffe models, install cuDNN then uncomment the `USE_CUDNN := 1` flag in `Makefile.config` when installing Caffe. Acceleration is automatic. The current version is cuDNN v6; older versions are supported in older Caffe.
+**cuDNN Caffe**: for fastest operation Caffe is accelerated by drop-in integration of [NVIDIA cuDNN](https://developer.nvidia.com/cudnn). To speed up your Caffe models, install cuDNN then uncomment the `USE_CUDNN := 1` flag in `Makefile.config` when installing Caffe. Acceleration is automatic. The current version is cuDNN v7; older versions are supported in older Caffe.
**CPU-only Caffe**: for cold-brewed CPU-only Caffe uncomment the `CPU_ONLY := 1` flag in `Makefile.config` to configure and build Caffe without CUDA. This is helpful for cloud or cluster deployment.
diff --git a/include/caffe/util/cudnn.hpp b/include/caffe/util/cudnn.hpp
index 498cfe3..cd3f93f 100644
--- a/include/caffe/util/cudnn.hpp
+++ b/include/caffe/util/cudnn.hpp
@@ -45,6 +45,12 @@ inline const char* cudnnGetErrorString(cudnnStatus_t status) {
case CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING:
return "CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING";
#endif
+#if CUDNN_VERSION_MIN(7, 0, 0)
+ case CUDNN_STATUS_RUNTIME_IN_PROGRESS:
+ return "CUDNN_STATUS_RUNTIME_IN_PROGRESS";
+ case CUDNN_STATUS_RUNTIME_FP_OVERFLOW:
+ return "CUDNN_STATUS_RUNTIME_FP_OVERFLOW";
+#endif
}
return "Unknown cudnn status";
}
diff --git a/scripts/travis/install-deps.sh b/scripts/travis/install-deps.sh
index 2fa2a74..abf9cf1 100755
--- a/scripts/travis/install-deps.sh
+++ b/scripts/travis/install-deps.sh
@@ -106,7 +106,7 @@ if $WITH_CUDA ; then
ln -s /usr/local/cuda-$CUDA_VERSION /usr/local/cuda
if $WITH_CUDNN ; then
- apt-get install -y --no-install-recommends libcudnn6-dev
+ apt-get install -y --no-install-recommends libcudnn7-dev
fi
fi