Skip to content

Commit

Permalink
* Enable cuDNN support for Caffe by default (issue #187)
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Jul 23, 2017
1 parent 6760dba commit a24c5bc
Show file tree
Hide file tree
Showing 4 changed files with 309 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Enable cuDNN support for Caffe by default ([issue #187](https://github.com/bytedeco/javacpp-presets/issues/187))
* Use the new `BUILD_PATH` environment variable passed by the `javacpp` plugin to the `cppbuild.sh` script files
* Let presets pick up `include` or `link` paths from cached resources ([pull #101](https://github.com/bytedeco/javacpp-presets/pull/101))
* Update presets for Visual Studio 2015 ([issue #298](https://github.com/bytedeco/javacpp-presets/issues/298))
Expand Down
5 changes: 4 additions & 1 deletion caffe/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ case $PLATFORM in
export BINARY=32
export BLAS=open
export CUDAFLAGS=
export USE_CUDNN=0
;;
linux-x86_64)
export CPU_ONLY=0
Expand All @@ -27,6 +28,7 @@ case $PLATFORM in
export BINARY=64
export BLAS=open
export CUDAFLAGS="-Xcompiler -std=c++98"
export USE_CUDNN=1
;;
macosx-*)
export CPU_ONLY=0
Expand All @@ -37,6 +39,7 @@ case $PLATFORM in
export BINARY=64
export BLAS=atlas
export CUDAFLAGS=
export USE_CUDNN=1
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
Expand Down Expand Up @@ -156,7 +159,7 @@ export PATH=../bin:$PATH
export CXXFLAGS="-I../include -I$OPENCV_PATH/include -I$HDF5_PATH/include"
export NVCCFLAGS="-I../include -I$OPENCV_PATH/include -I$HDF5_PATH/include $CUDAFLAGS"
export LINKFLAGS="-L../lib -L$OPENCV_PATH/lib -L$HDF5_PATH/lib"
make -j $MAKEJ BLAS=$BLAS OPENCV_VERSION=3 DISTRIBUTE_DIR=.. lib
make -j $MAKEJ BLAS=$BLAS OPENCV_VERSION=3 DISTRIBUTE_DIR=.. USE_CUDNN=$USE_CUDNN lib
# Manual deploy to avoid Caffe's python build
mkdir -p ../include/caffe/proto
cp -a include/caffe/* ../include/caffe/
Expand Down
Loading

0 comments on commit a24c5bc

Please sign in to comment.