How to Install Torch7 on Jetson TX1
This article describes how I install Torch7 on Jetson TX1. Note that Tegra X1 is an arm64 (aarch64) platform, which doesn’t seem to be natively supported/tested by Torch7 developers. As a result there might be tweaks required when we download Torch7 source package and compile it on Jetson TX1.
Prerequisite:
- Complete installation of JetPack-2.3.1 (latest version for the time being) on the target Jetson TX1.
- Especially make sure CUDA toolkit (nvcc) is working on the target Jetson TX1.
Reference:
- Official Torch7 installation guide: http://torch.ch/docs/getting-started.html
- “dusty-nv” maintains a Torch7 build script on GitHub: jetson-reinforcement/CMakePreBuild.sh
Installation Steps:
### Within a terminal, run the following commands
$ git clone https://github.com/torch/distro.git ~/torch --recursive
$ sudo apt-get install libopenblas-dev
$ cd ~/torch
$ vim install-deps
### comment out line #194 of 'install-deps' which reads "install_openblas || true"
$ bash install-deps
$ ./install.sh
Discussion:
- I basically follow the official Torch7 documentation.
- Using the pre-built OpenBLAS package on TX1 could save a lot of compilation time.
To-do:
- Investigation of cutorch.test() and cunn.test() failures/errors, as discussed in this NVIDIA Developer Forum post.