Skip to content

Commit

Permalink
* Upgrade presets for TensorFlow 1.0.0-rc0
Browse files Browse the repository at this point in the history
 * Work around issues with TensorFlow on some versions of Mac OS X (issue #335)
  • Loading branch information
saudet committed Jan 28, 2017
1 parent d17a522 commit fa4fe01
Show file tree
Hide file tree
Showing 9 changed files with 14,967 additions and 13,821 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

* Upgrade presets for OpenCV 3.2.0, libdc1394 2.2.5, LLVM 3.9.1 ([pull #343](https://github.com/bytedeco/javacpp-presets/pull/343)), TensorFlow 1.0.0-alpha
* Work around issues with TensorFlow on some versions of Mac OS X ([issue #335](https://github.com/bytedeco/javacpp-presets/issues/335))
* Upgrade presets for OpenCV 3.2.0, libdc1394 2.2.5, LLVM 3.9.1 ([pull #343](https://github.com/bytedeco/javacpp-presets/pull/343)), TensorFlow 1.0.0-rc0
* Add presets for libfreenect2 ([pull #340](https://github.com/bytedeco/javacpp-presets/pull/340))
* Fix the `FlyCapture2` module for some versions on Windows ([issue #337](https://github.com/bytedeco/javacpp-presets/issues/337))
* Add functions missing from the presets of MXNet ([issue #332](https://github.com/bytedeco/javacpp-presets/issues/332))
Expand Down
2 changes: 1 addition & 1 deletion platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>tensorflow-platform</artifactId>
<version>1.0.0-alpha-${project.version}</version>
<version>1.0.0-rc0-${project.version}</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions tensorflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Introduction
------------
This directory contains the JavaCPP Presets module for:

* TensorFlow 1.0.0-alpha http://www.tensorflow.org/
* TensorFlow 1.0.0-rc0 http://www.tensorflow.org/

Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.

Expand Down Expand Up @@ -42,7 +42,7 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>tensorflow-platform</artifactId>
<version>1.0.0-alpha-1.3.2-SNAPSHOT</version>
<version>1.0.0-rc0-1.3.2-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Expand Down
12 changes: 11 additions & 1 deletion tensorflow/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ fi

export PYTHON_BIN_PATH=$(which python)
export USE_DEFAULT_PYTHON_LIB_PATH=1
export CC_OPT_FLAGS=-O3
export TF_NEED_JEMALLOC=0
export TF_NEED_CUDA=0
export TF_NEED_GCP=0
export TF_NEED_HDFS=0
export TF_NEED_OPENCL=0
export TF_ENABLE_XLA=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

TENSORFLOW_VERSION=1.0.0-alpha
TENSORFLOW_VERSION=1.0.0-rc0

download https://github.com/tensorflow/tensorflow/archive/v$TENSORFLOW_VERSION.tar.gz tensorflow-$TENSORFLOW_VERSION.tar.gz

Expand Down Expand Up @@ -73,4 +76,11 @@ esac
./configure
bazel build -c opt //tensorflow:libtensorflow_cc.so $BUILDFLAGS --spawn_strategy=standalone --genrule_strategy=standalone --verbose_failures

case $PLATFORM in
macosx-*)
chmod +w bazel-bin/tensorflow/libtensorflow_cc.so
install_name_tool -id @rpath/libtensorflow_cc.so bazel-bin/tensorflow/libtensorflow_cc.so
;;
esac

cd ../..
2 changes: 1 addition & 1 deletion tensorflow/platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>tensorflow-platform</artifactId>
<version>1.0.0-alpha-${project.parent.version}</version>
<version>1.0.0-rc0-${project.parent.version}</version>
<name>JavaCPP Presets Platform for TensorFlow</name>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<name>JavaCPP Presets for TensorFlow</name>

<properties>
<tensorflow.version>1.0.0-alpha</tensorflow.version>
<tensorflow.version>1.0.0-rc0</tensorflow.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2016 Samuel Audet
* Copyright (C) 2015-2017 Samuel Audet
*
* Licensed either under the Apache License, Version 2.0, or (at your option)
* under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -105,6 +105,7 @@
"tensorflow/core/lib/gtl/iterator_range.h",
// "tensorflow/core/lib/gtl/inlined_vector.h",
"tensorflow/core/graph/graph.h",
"tensorflow/core/graph/tensor_id.h",
"tensorflow/core/framework/node_def_builder.h",
"tensorflow/core/framework/node_def_util.h",
"tensorflow/core/framework/selective_registration.h",
Expand Down Expand Up @@ -190,6 +191,7 @@
"tensorflow/core/graph/edgeset.h",
"tensorflow/core/lib/gtl/iterator_range.h",
"tensorflow/core/graph/graph.h",
"tensorflow/core/graph/tensor_id.h",
"tensorflow/core/framework/node_def_builder.h",
"tensorflow/core/framework/node_def_util.h",
"tensorflow/core/graph/node_builder.h",
Expand Down Expand Up @@ -292,6 +294,11 @@ public void map(InfoMap infoMap) {

.put(new Info("protobuf::Map<std::string,tensorflow::AttrValue>").pointerTypes("StringAttrValueMap"))

.put(new Info("std::pair<tensorflow::StringPiece,int>").pointerTypes("StringPieceIntPair").define())
.put(new Info("std::map<tensorflow::TensorId,tensorflow::TensorId>").pointerTypes("TensorIdTensorIdMap").define())
.put(new Info("std::vector<tensorflow::Input>::iterator", "std::vector<tensorflow::Input>::const_iterator").skip())
.put(new Info("TF_LoadSessionFromSavedModel").annotations("@Platform(not=\"android\")").javaNames("TF_LoadSessionFromSavedModel"))

.put(new Info("std::function<void()>").pointerTypes("Fn"))
.put(new Info("std::function<void(int64,int64)>").pointerTypes("ForFn"))
.put(new Info("std::function<void(int64,int64,int)>").pointerTypes("ParallelForFn"))
Expand Down Expand Up @@ -367,7 +374,7 @@ public static class ParallelForFn extends FunctionPointer {
public ParallelForFn(Pointer p) { super(p); }
protected ParallelForFn() { allocate(); }
private native void allocate();
public native void call(long from, long to, int i);
public native int call(long from, long to, int i);
}

public static class ConsiderFunction extends FunctionPointer {
Expand Down
Loading

0 comments on commit fa4fe01

Please sign in to comment.