How can I install pytorch on TX2

Hi,

I want to install pytorch on TX2, but got some error log:
“Failed to run ‘bash …/tools/build_pytorch_libs.sh --use-cuda --use-nnpack nccl caffe2 libshm gloo c10d THD’”

I follow the article (GitHub - andrewadare/jetson-tx2-pytorch: Installing PyTorch on the Nvidia Jetson TX1/TX2) to install

jetpack3.2.1

how can I solved this issue or check my setting

I’m going through this now:
[url]https://devtalk.nvidia.com/default/topic/1042821/jetson-tx2/pytorch-install-broken/[/url]

Thank you, I use this method to resolved the issue.

I found that link to have a few issues.
That is why I came up with a tutorial:

https://github.com/Bfzanchetta/DLARM/blob/master/jetsontx2/pytorch_install.sh

Hi Experts

I am using the script:

with the pip3.

When I run:

python3 setup.py build_deps

I get the error message below. Any hints?

[ 11%] Building CXX object c10/CMakeFiles/c10.dir/DeviceType.cpp.o
In file included from /home/nvidia/pytorch/third_party/ideep/mkl-dnn/src/cpu/jit_generator.hpp:35:0,
from /home/nvidia/pytorch/third_party/ideep/mkl-dnn/src/cpu/cpu_barrier.hpp:22,
from /home/nvidia/pytorch/third_party/ideep/mkl-dnn/src/cpu/cpu_reducer.hpp:28,
from /home/nvidia/pytorch/third_party/ideep/mkl-dnn/src/cpu/jit_sse42_1x1_convolution.hpp:23,
from /home/nvidia/pytorch/third_party/ideep/mkl-dnn/src/cpu/jit_sse42_1x1_convolution.cpp:20:
/home/nvidia/pytorch/third_party/ideep/mkl-dnn/src/cpu/xbyak/xbyak_util.h:84:21: fatal error: cpuid.h: No such file or directory
compilation terminated.

sojohans,

first of all, how to you even have mkl-dnn on a Jetson TX2?
IF you know the ways to install mkl-dnn, please show us the wheel.

Honestly, look into your CMakesList and try to find where you set mkl to True, it should be false
If that doesn’t solve your problem, you may just follow my link right above here.
Have a good one!

Hello…

I got below error message when install pytorch:

[ 41%] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/operators/reduce_ops.cc.o
[ 41%] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/operators/piecewise_linear_transform_op.cc.o
[ 41%] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/operators/listwise_l2r_op.cc.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
caffe2/CMakeFiles/torch_cpu.dir/build.make:7978: recipe for target ‘caffe2/CMakeFiles/torch_cpu.dir/contrib/aten/aten_op.cc.o’ failed
make[2]: *** [caffe2/CMakeFiles/torch_cpu.dir/contrib/aten/aten_op.cc.o] Error 4
make[2]: *** Waiting for unfinished jobs…
CMakeFiles/Makefile2:6447: recipe for target ‘caffe2/CMakeFiles/torch_cpu.dir/all’ failed
make[1]: *** [caffe2/CMakeFiles/torch_cpu.dir/all] Error 2
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2
Traceback (most recent call last):
File “setup.py”, line 755, in
build_deps()
File “setup.py”, line 316, in build_deps
cmake=cmake)
File “/home/nvidia/pytorch/tools/build_pytorch_libs.py”, line 62, in build_caffe2
cmake.build(my_env)
File “/home/nvidia/pytorch/tools/setup_helpers/cmake.py”, line 339, in build
self.run(build_args, my_env)
File “/home/nvidia/pytorch/tools/setup_helpers/cmake.py”, line 141, in run
check_call(command, cwd=self.build_dir, env=env)
File “/usr/lib/python3.5/subprocess.py”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘–build’, ‘.’, ‘–target’, ‘install’, ‘–config’, ‘Release’, ‘–’, ‘-j’, ‘6’]’ returned non-zero exit status

Anyone have any idea??

Thanks.