TensorFlow libs for C/C++ integration on Jetson Nano

Is there a documentation on how/where to download pre-built TensorFlow libraries for C/C++ integration on Jetson Nano? In particular, I am looking for tarballs similar to these: https://www.tensorflow.org/install/lang_c

Alternatively, how can we build from source. Step by step documentation would be very helpful.

Hi sdeoras, here is a link to the TensorFlow pip wheel installer for Jetson Nano:

It is also listed on the Jetson Downloads Center here: https://developer.nvidia.com/embedded/downloads#?search=TensorFlow

Hi @dusty_nv: Thank you for the reply. The wheel pkg is for Python and it won’t work as is for C/C++ integration. It would be really helpful if we could get access to native TensorFlow libraries (essentially a tarball containing libtensorflow.so, libtensorflow_franework.so and associated header files such as those provided at this link: https://www.tensorflow.org/install/lang_c )

Hi, I face the same issue as I want to use tensorflow.js node on jetson nano. Have you been able to compile you own tensorflow @sdeoras ?

@tibo.durand, not yet, but will be trying shortly as soon as i receive my jetson-nano.

@dusty_nv: is there a document on the build process that you could please share? Thanks.

Tried building TensorFlow C-library v1.13.1 on Jetson Nano but it failed. Filed this bug:

Thanks for working on this, it was on my TODO list… Will look for update on the github issue !

@dusty_nv: I tried building TensorFlow C-library for Jetson Nano but running into several build issues as I described in github issue link. Would it be possible to get a download link for TF C-library from your build processes? Appreciate any pointers on how to proceed. Thanks.

TensorFlow v1.12.0 built fine for me as a C-library. I could not get v1.13.1 to build due to gcc related issue.

@sdeoras: could you tell me how do you build TensorFlow 1.12.0 on Jetson Nano ? you compile & build both TensorFlow library and C/C++ library or just C/C++ library only ?

is there any prerequisite package ?

thanks.

@lens828, here are the steps that worked for me and these apply only to v1.12.0. I am building only the C-library.

@sdeoras, Thanks for the gist.

Sorry i have one more question, it looks like Jetson nano only supports TF 1.13.1? could we use 1.12.0 C-library and 1.13.1 TF library for C/C++ environment ?

Prebuilt v1.12.0 is built for cuda 9, while v1.13.1 is built with cuda 10. In that sense, yes, Jetson Nano only supports v1.13.1, however, you could build v1.12.0 with cuda 10 and so far it is working fine for me. I built both with and without cuda support. Depending on what your application does, cuda enabled TF may not always be the best option.

Ideally, I would like to get TF C-library for v1.13.1 eventually, however, I ran into gcc 7.3 related bugs that are not resolved.

@sdeoras, Really thanks for sharing this, i will keep trying your gist.

@sdeoras, Hi Thanks for your gist it is really helpful but now i am encountering CMakeList problem, could you give me some suggestions or example ?

i referencec https://github.com/cjweeks/tensorflow-cmake for my CMakeList.txt and i have some questions.

  1. For header and shared library file, i include all the files are listed as below, is there other file i missed?
#For header files
/tensorflow/bazel-genfiles/tensorflow/core/framework/*.h
/tensorflow/bazel-genfiles/tensorflow/core/kernels/*.h
/tensorflow/bazel-genfiles/tensorflow/core/lib/core/*.h
/tensorflow/bazel-genfiles/tensorflow/core/protobuf/*.h
/tensorflow/bazel-genfiles/tensorflow/core/util/*.h
/tensorflow/bazel-genfiles/tensorflow/cc/ops/*.h
/tensorflow/third_party

For shared library
libtensorflow.so             #(c++ library)
libtensorflow_framework.so   #(tf library)
  1. For eigen library, according to https://github.com/cjweeks/tensorflow-cmake i have to include it in the CMakeLists.txt but eigen is already in “third_party” folder, do i really need to include it again ?

  2. For protobuf, same as above, i am not sure which way is better, include protobuf as external project and compile with TF in my project or install specific version of protobuf in jetson nano ?

i appreciate it if you could give me some answers or a simple example of CMakeList.txt.
Thanks.