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.
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.
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
/usr/lib/aarch64-linux-gnu/, just download cuDNN from NVIDIA Developers website and place it into that path.
Or you can just edit
default_cudnn_path=/usr/since the default
Then you’ll find your wheel file in your home folder.
Install and Test
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.
Thanks for following posts and issues:
Author Yusu Pan
License CC BY-NC-ND 4.0