6

I am trying to compile Tensorflow (tried both: full & lite) on Odroid XU4 (16GB eMMc, Ubuntu 16) but I am getting errors shown in figures: https://www.dropbox.com/sh/j86ysncze1q0eka/AAB8RZtUTkaytqfEGivbev_Ga?dl=0

I am using FlytOS as OS(http://docs.flytbase.com/docs/FlytOS/GettingStarted/OdroidGuide.html). Its customized Ubuntu 16 with OpenCV and ROS setup, makes 11GB after installation. So, I got only 2.4GB free. Therefore, I added 16GB USB as swap memory.

I have installed Bazel without using swap memory. Tried tensorflow full version and lite but failed to compile. However, I downloaded compiled tensorflow lite for Pi and successfully installed on Odroid. Since, Odroid is Octacore, therefore, to make best use of available processing power I need to compile tensorflow on Odroid.

Please let me know if any one has tensorflow compiled on Odroid XU4.

Regards,

Mohbat Tharani
  • 550
  • 1
  • 6
  • 22

1 Answers1

3

Check this guide out. Build Tensorflow on Odroid

IT gives a detailed step by step guide and also has some troubleshooting procedures.

Summarizing the steps here:

  1. Install prerequisites including g++, gcc-4.8, python-pip, python-dev, numpy and Oracle Java (not OpenJDK)
  2. Use a USB/ Flash drive and add some swap memory
  3. Build Bazel. In the compile.sh shell script, modify the run line to add memory flags

run “${JAVAC}” -J-Xms256m -J-Xmx384m -classpath “${classpath}” -sourcepath “${sourcepath}”

  1. Get Tensorflow v1.4 specifically and run ./configure and select relevant options. Disable XLA as it's causing some problems.
  2. Finally run Bazel command.

bazel build -c opt --copt="-funsafe-math-optimizations" --copt="-ftree-vectorize" --copt="-fomit-frame-pointer" --local_resources 8192,8.0,1.0 --verbose_failures tensorflow/tools/pip_package:build_pip_package

  1. Now install it.

bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

sudo pip2 install /tmp/tensorflow_pkg/tensorflow-1.4.0-cp27-cp27mu-linux_armv7l.whl --upgrade --ignore-installed

  1. Test the install

    python

    import tensorflow

    print(tensorflow.__version__)

    1.4.0

I was able to compile it successfully by following the steps given there.

Community
  • 1
  • 1
Anand C U
  • 885
  • 9
  • 29
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/18015530) – kometen Nov 21 '17 at 10:35
  • 1
    @kometen I have edited the answer to include steps here. – Anand C U Nov 22 '17 at 06:49