Skip to content

Commit

Permalink
* Enable CUDA in cppbuild.sh script for TensorFlow (issue #294)
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Oct 2, 2016
1 parent dd4ffa7 commit cef8d6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Enable CUDA in `cppbuild.sh` script for TensorFlow ([issue #294](https://github.com/bytedeco/javacpp-presets/issues/294))
* Bundle `libgomp.so.1` in JAR files of OpenCV for the sake of some Linux distributions ([issue bytedeco/javacv#436](https://github.com/bytedeco/javacv/issues/436)
* Fix `linux-armhf` and `linux-ppc64le` builds for all presets ([pull #279](https://github.com/bytedeco/javacpp-presets/pull/279))
* Fix `libdc1394` not properly linking with `libusb-1.0` on Mac OS X ([issue bytedeco/javacv#501](https://github.com/bytedeco/javacv/issues/501)
Expand All @@ -8,7 +9,7 @@
* Make Caffe work on CPU-only machines ([issue #219](https://github.com/bytedeco/javacpp-presets/issues/219))
* Fix loading issue with `opencv_face` ([issue bytedeco/javacv#470](https://github.com/bytedeco/javacv/issues/470)
* Fix presets for CUDA on the `linux-ppc64le` platform
* Upgrade presets for FFmpeg 3.1.2, x265 2.0, libvpx 1.6.0, CUDA 8.0, cuDNN 5.1, Caffe, TensorFlow 0.9.0
* Upgrade presets for FFmpeg 3.1.2, x265 2.0, libvpx 1.6.0, CUDA 8.0, cuDNN 5.1, Caffe, TensorFlow 0.10.0
* Set default options in `tensorflow/cppbuild.sh` to prevent console reads during build
* Add `Tensor.createStringArray()` method to access `DT_STRING` data ([issue #249](https://github.com/bytedeco/javacpp-presets/issues/249))
* Fix Javadoc links for externally referenced classes
Expand Down
13 changes: 11 additions & 2 deletions tensorflow/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ fi
export PYTHON_BIN_PATH=$(which python)
export TF_NEED_CUDA=0
export TF_NEED_GCP=0
export TF_CUDA_VERSION=8.0
export TF_CUDNN_VERSION=5
export GCC_HOST_COMPILER_PATH=$(which gcc)
export CUDA_TOOLKIT_PATH=/usr/local/cuda
export CUDNN_INSTALL_PATH=$CUDA_TOOLKIT_PATH
export TF_CUDA_COMPUTE_CAPABILITIES=3.0

case $PLATFORM in
linux-x86)
Expand All @@ -20,10 +26,13 @@ case $PLATFORM in
linux-x86_64)
export CC="/usr/bin/gcc"
export CXX="/usr/bin/g++"
export BUILDFLAGS="--copt=-m64 --linkopt=-m64"
export TF_NEED_CUDA=1
export GCC_HOST_COMPILER_PATH=$CC
export BUILDFLAGS="--config=cuda --copt=-m64 --linkopt=-m64"
;;
macosx-*)
export BUILDFLAGS="--linkopt=-install_name --linkopt=@rpath/libtensorflow.so"
export TF_NEED_CUDA=1
export BUILDFLAGS="--config=cuda --linkopt=-install_name --linkopt=@rpath/libtensorflow.so"
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
Expand Down

0 comments on commit cef8d6a

Please sign in to comment.