Skip to content

Commit ac5f4d8

Browse files
committed
Use tensorflow patch
1 parent 76e70dd commit ac5f4d8

4 files changed

Lines changed: 36 additions & 7 deletions

File tree

binding.gyp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@
1010
'include_dirs' : [
1111

1212
# Third party must be included as root as well
13-
"lib/tensorflow/third_party/eigen3",
13+
"lib/tensorflow/bazel-tensorflow",
14+
"lib/tensorflow/bazel-tensorflow/tensorflow",
15+
"lib/tensorflow/bazel-tensorflow/third_party/eigen3",
16+
"lib/tensorflow/bazel-tensorflow/external/eigen_archive/eigen-eigen-fa22401ededc",
1417
"lib/tensorflow/third_party/gpus",
15-
"lib/tensorflow/external",
18+
"lib/tensorflow/bazel-tensorflow/external",
19+
"lib/tensorflow/bazel-tensorflow/external/eigen_archive",
1620
"lib/tensorflow",
1721

1822
# Include NAN

lib/tensorflow

Submodule tensorflow updated 143 files

tools/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Compile photobuf
21
cd "lib/tensorflow"
32
echo ""
4-
echo "= Configuring TensorFlow (GPU: $TENSORFLOW_GPU_ENABLED)"
3+
git reset --hard
4+
patch -Np1 < ../../tools/tensorflow.patch # From https://github.com/bytedeco/javacpp-presets/blob/master/tensorflow/tensorflow-master.patch
55
echo "\n" | ./configure
6-
echo "= Compiling TensorFlow [cc|core]"
7-
bazel build --verbose_failures=1 //tensorflow/cc:cc_ops //tensorflow/core:tensorflow
6+
bazel build --verbose_failures=1 -c opt //tensorflow/cc:libtensorflow.so
7+
#bazel build --verbose_failures=2 //tensorflow/cc:cc_ops //tensorflow/core:protos_all_cc //tensorflow/core:tensorflow
88

tools/tensorflow.patch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff -ruN tensorflow-master/tensorflow/cc/BUILD tensorflow-master-patch/tensorflow/cc/BUILD
2+
--- tensorflow-master/tensorflow/cc/BUILD 2016-02-06 10:08:02.000000000 +0900
3+
+++ tensorflow-master-patch/tensorflow/cc/BUILD 2016-02-06 17:42:56.446230724 +0900
4+
@@ -75,6 +75,21 @@
5+
],
6+
)
7+
8+
+cc_binary(
9+
+ name = "libtensorflow.so",
10+
+ copts = tf_copts(),
11+
+ linkshared = 1,
12+
+ linkopts = [
13+
+ "-lpthread",
14+
+ "-lm",
15+
+ ],
16+
+ deps = [
17+
+ ":cc_ops",
18+
+ "//tensorflow/core:all_kernels",
19+
+ "//tensorflow/core:tensorflow",
20+
+ ],
21+
+)
22+
+
23+
filegroup(
24+
name = "all_files",
25+
srcs = glob(

0 commit comments

Comments
 (0)