Skip to content

Commit

Permalink
add supports for cuDNN v7
Browse files Browse the repository at this point in the history
  • Loading branch information
icyblade committed Oct 11, 2017
1 parent 62e0c85 commit cd2a014
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 6 additions & 0 deletions include/caffe/util/cudnn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ inline const char* cudnnGetErrorString(cudnnStatus_t status) {
#if CUDNN_VERSION_MIN(6, 0, 0)
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";
Expand Down
2 changes: 1 addition & 1 deletion scripts/travis/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cd2a014

Please sign in to comment.