Hello everyone,
Has anyone successfully build Tensorflow 1.2.0 with GPU for Jetson TX2 yet?
So far I’ve been able to build TF 1.0.1 GPU by following Jetsonhacks’ guide, as well as finding a TF 1.2.0 CPU python 3 wheel file that another user posted on this forum, but still no luck in building TF 1.2.0 GPU for TX2.
Any help or advices would be appreciated!
There’s a pull request on the JetsonHacks account that builds TF 1.2.0:
https://github.com/jetsonhacks/installTensorFlowTX2/pull/7
You should be able to merge it with earlier version. I have not tested it, but it seems pretty straightforward.
Lets try it!
Current state is
print(tf.version)
1.0.1
Upgrade started
it seems that 1.2.1 version is published at the github
- cd $home
- delete tensorflow
- git clone https://github.com/tensorflow/tensorflow.git
- cd tensorflow
- git checkout v1.2.1
Note: checking out ‘v1.2.1’.
You are in ‘detached HEAD’ state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b
HEAD is now at b4957ff… Merge pull request #11156 from av8ramit/1.2.1
6) Now perhaps somehow the patch should be aplpied
it seems that after cloning a modified[patched] patch should be applied and it seems that new patch file should consist of 20 lines:
+diff --git a/a/tensorflow/workspace.bzl b/b/tensorflow/workspace.bzl
+index 2a206b0..d785473 100644
+--- a/a/tensorflow/workspace.bzl
++++ b/b/tensorflow/workspace.bzl
+@@ -150,11 +150,11 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
+ native.new_http_archive(
+ name = "eigen_archive",
+ urls = [
+- "http://mirror.bazel.build/bitbucket.org/eigen/eigen/get/f3a22f35b044.tar.gz",
+- "https://bitbucket.org/eigen/eigen/get/f3a22f35b044.tar.gz",
++ "http://mirror.bazel.build/bitbucket.org/eigen/eigen/get/d781c1de9834.tar.gz",
++ "https://bitbucket.org/eigen/eigen/get/d781c1de9834.tar.gz",
+ ],
+- sha256 = "ca7beac153d4059c02c8fc59816c82d54ea47fe58365e8aded4082ded0b820c4",
+- strip_prefix = "eigen-eigen-f3a22f35b044",
++ sha256 = "a34b208da6ec18fa8da963369e166e4a368612c14d956dd2f9d7072904675d9b",
++ strip_prefix = "eigen-eigen-d781c1de9834",
+ build_file = str(Label("//third_party:eigen.BUILD")),
+ )
+
However it returns: patch: **** Only garbage was found in the patch input.
Omitting the patch procedure
it seems that the following lines should be in the file of the patch , rather than posted above:
diff --git a/a/tensorflow/workspace.bzl b/b/tensorflow/workspace.bzl
index 2a206b0..d785473 100644
--- a/a/tensorflow/workspace.bzl
+++ b/b/tensorflow/workspace.bzl
@@ -150,11 +150,11 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
native.new_http_archive(
name = "eigen_archive",
urls = [
- "http://mirror.bazel.build/bitbucket.org/eigen/eigen/get/f3a22f35b044.tar.gz",
- "https://bitbucket.org/eigen/eigen/get/f3a22f35b044.tar.gz",
+ "http://mirror.bazel.build/bitbucket.org/eigen/eigen/get/d781c1de9834.tar.gz",
+ "https://bitbucket.org/eigen/eigen/get/d781c1de9834.tar.gz",
],
- sha256 = "ca7beac153d4059c02c8fc59816c82d54ea47fe58365e8aded4082ded0b820c4",
- strip_prefix = "eigen-eigen-f3a22f35b044",
+ sha256 = "a34b208da6ec18fa8da963369e166e4a368612c14d956dd2f9d7072904675d9b",
+ strip_prefix = "eigen-eigen-d781c1de9834",
build_file = str(Label("//third_party:eigen.BUILD")),
)
now it returns :
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/a/tensorflow/workspace.bzl b/b/tensorflow/workspace.bzl
|index 2a206b0..d785473 100644
|--- a/a/tensorflow/workspace.bzl
|+++ b/b/tensorflow/workspace.bzl
--------------------------
File to patch:
repeating the steps:
git clone https://github.com/tensorflow/tensorflow.git
git checkout v1.2.1
executing
patch -p1 < $INSTALL_DIR/patches/tensorflow.patch
patching file /home/nvidia/tensorflow/tensorflow/workspace.bzl
seems built fine
result = (tensorflow::io::PyRecordReader *)tensorflow::io::PyRecordReader::New((string const &)*arg1,arg2,(string const &)*arg3,arg4);
^
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-self-assign'
Target //tensorflow/tools/pip_package:build_pip_package up-to-date:
bazel-bin/tensorflow/tools/pip_package/build_pip_package
INFO: Elapsed time: 5232.278s, Critical Path: 616.27s
nvidia@tegra-ubuntu:~/Desktop/study/tensorrt/installTe
executing
./packageTensorFlow.sh
Sun Jul 2 14:58:44 UTC 2017 : === Using tmpdir: /tmp/tmp.jYzk5wFTBE
~/tensorflow/bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles ~/tensorflow
~/tensorflow
/tmp/tmp.jYzk5wFTBE ~/tensorflow
Sun Jul 2 14:58:47 UTC 2017 : === Building wheel
warning: no files found matching '*.dll' under directory '*'
warning: no files found matching '*.lib' under directory '*'
^Cinterrupted
mv: cannot stat '/tmp/tensorflow_pkg/tensorflow-1.2.1-cp27-cp27mu-linux_aarch64.whl': No such file or directory
nvidia@tegra-ubuntu:~/Desktop/study
trying with sudo
sudo ./packageTensorFlow.sh
[sudo] password for nvidia:
Sun Jul 2 14:59:41 UTC 2017 : === Using tmpdir: /tmp/tmp.KFty7jIjoS
~/tensorflow/bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles ~/tensorflow
~/tensorflow
/tmp/tmp.KFty7jIjoS ~/tensorflow
Sun Jul 2 14:59:44 UTC 2017 : === Building wheel
warning: no files found matching '*.dll' under directory '*'
warning: no files found matching '*.lib' under directory '*'
~/tensorflow
Sun Jul 2 15:00:11 UTC 2017 : === Output wheel file is in: /tmp/tensorflow_pkg
upgrading pip:
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip
installing
sudo pip install $HOME/wheel file