PyTorch Jetson Installation notes 2021-04

A very kind friend sent me a Jetson Xavier NX. Thank you! Naturally, the first thing was to try to build PyTorch on it... but it turned out that recent PyTorch uses std::copysign triggers an ICE (internal compiler error, here a segfault during compilation) in gcc 7/8 on arm64. This was fixed for CPU PyTorch in time for 1.8, but it is open on CUDA. I have a fix for it in PR 51834 but it was temporarily reverted because it hit some CI problem - probably from the Caffe2 compilation still going on somewhere.

But so you don't have to do it yourself, here is a wheel of PyTorch with the fix and the unmerged patches from NVidia's distribution.

I built it with CC=/usr/lib/ccache/gcc-8 CXX=/usr/lib/ccache/g++-8 MAX_JOBS=4 BUILD_CAFFE2_OPS=0 python3 setup.py bdist_wheel.

I have more information on arm64 an packages for the Raspberry Pi. Also, I do awesome courses to help you make the most of it. Just give me a shout!