TensorFlow r1.0已经发布了不少时间，事实证明1.0版本在内存使用上改善了不少，以前一些在r0.11上内存满报错的程序在r1.0上能够正常运行了。同时，r1.0相较于r0.11在API上做了很大的改动，也有很多新的东西（比如Keras）将要集成进TF。

Update: 做了一些非常ugly的改动之后编译成功了。

## Environment

Thsi article aims to install TensorFlow r1.0 on NVIDIA Jetson TX1 with JetPack 2.3.1:

• Ubuntu 16.04 (aarch64)
• CUDA 8.0
• cuDNN 5.1.5 or 5.1.10

Note that I still CAN’T build TensorFlow r1.0 yet. The reason is explained at the end of this post.

## Preparation

Before installation, you need to add swap space for TX1 since this device only has 4G memory and 16GB eMMC Storage. I use an external HDD via USB. Maybe you could use SSD for higher speed.

Thanks to jetsonhacks, we can simply deal this with a script:

8G swap is enough for compilation, and ensure you have >5.5GB free space on TX1.

## Install Deps

Thanks to jetsonhacks, we can deal with deps more convinently. I forked this repo and modify something to fit TF r1.0. You can just clone mine.

If you meet an error that bazel can’t find cudnn.h in /usr/lib/aarch64-linux-gnu/, just download cuDNN from NVIDIA Developers website and place it into that path.

Or you can just edit setTensorFlowEV.sh and replace default_cudnn_path=/usr/lib/aarch64-linux-gnu/ with default_cudnn_path=/usr/ since the default cudnn.h is in /usr/include/.

## Problems

Until now, I still can’t build tensorflow successfully. An error occured:

According to this post, this may due to a bug of nvcc. An expert in NVIDIA says they solved it with their internal nvcc compiler, which is not yet available in JetPack. Maybe next release of JetPack (3.0 on March 14) will solve it. So I’ll update this post then.

## An ugly hack

Thanks to rwightman’s hack, I finally compiled TF1.0 successfully. Just following hacks:

• Revert Eigen to revision used in Tensorflow r0.11 to avoid cuda compile error
• Remove expm1 op that was added with new additions to Eigen

My fork for installTensorFlowTX1 has contained this hack. And my build for TensorFlow r1.0 with Python 2.7 can be find here.

Update: @barty777 build TF 1.0.1 with Python 3.5, and his wheel file can be found here.

## Acknowledgment

Thanks for following posts and issues: