Last active
October 21, 2021 01:28
-
-
Save dusty-nv/ef2b372301c00c0a9d3203e42fd83426 to your computer and use it in GitHub Desktop.
Install procedure for pyTorch on NVIDIA Jetson TX1/TX2 with JetPack <= 3.2.1. For JetPack 4.2 and Xavier/Nano/TX2, see https://devtalk.nvidia.com/default/topic/1049071/jetson-nano/pytorch-for-jetson-nano/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# EDIT: this script is outdated, please see https://forums.developer.nvidia.com/t/pytorch-for-jetson-nano-version-1-6-0-now-available | |
# | |
sudo apt-get install python-pip | |
# upgrade pip | |
pip install -U pip | |
pip --version | |
# pip 9.0.1 from /home/ubuntu/.local/lib/python2.7/site-packages (python 2.7) | |
# clone pyTorch repo | |
git clone http://github.com/pytorch/pytorch | |
cd pytorch | |
git submodule update --init | |
# install prereqs | |
sudo pip install -U setuptools | |
sudo pip install -r requirements.txt | |
# Develop Mode: | |
python setup.py build_deps | |
sudo python setup.py develop | |
# Install Mode: (substitute for Develop Mode commands) | |
#sudo python setup.py install | |
# Verify CUDA (from python interactive terminal) | |
# import torch | |
# print(torch.__version__) | |
# print(torch.cuda.is_available()) | |
# a = torch.cuda.FloatTensor(2) | |
# print(a) | |
# b = torch.randn(2).cuda() | |
# print(b) | |
# c = a + b | |
# print(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Everyone, I am having a similar issue and need some assistance. I am trying to install pytorch on the odroid board xu4 but I get the following error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’. Below is the error message directly from the terminal.
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x8c4-minmax-fp32-neondot.c: In function ‘xnn_qs8_gemm_minmax_fp32_ukernel_1x8c4__neondot’:
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x8c4-minmax-fp32-neondot.c:91:17: error: redefinition of ‘vproduct0x0123’
91 | float32x4_t vproduct0x0123 = vmulq_f32(vproduct0x0123, vscale);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x8c4-minmax-fp32-neondot.c:88:17: note: previous definition of ‘vproduct0x0123’ was here
88 | float32x4_t vproduct0x0123 = vcvtq_f32_s32(vacc0x0123);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x8c4-minmax-fp32-neondot.c:92:17: error: redefinition of ‘vproduct0x4567’
92 | float32x4_t vproduct0x4567 = vmulq_f32(vproduct0x4567, vscale);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x8c4-minmax-fp32-neondot.c:89:17: note: previous definition of ‘vproduct0x4567’ was here
89 | float32x4_t vproduct0x4567 = vcvtq_f32_s32(vacc0x4567);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x8c4-minmax-fp32-neondot.c:94:18: warning: implicit declaration of function ‘vcvtnq_s32_f32’; did you mean ‘vcvtq_s32_f32’? [-Wimplicit-function-declaration]
94 | vacc0x0123 = vcvtnq_s32_f32(vproduct0x0123);
| ^~~~~~~~~~~~~~
| vcvtq_s32_f32
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x8c4-minmax-fp32-neondot.c:94:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x8c4-minmax-fp32-neondot.c:95:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
95 | vacc0x4567 = vcvtnq_s32_f32(vproduct0x4567);
| ^~~~~~~~~~~~~~
[ 60%] Building C object confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c.o
make[2]: *** [confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/build.make:15598: confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/1x8c4-minmax-fp32-neondot.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x16c4-minmax-fp32-neondot.c: In function ‘xnn_qs8_gemm_minmax_fp32_ukernel_1x16c4__neondot’:
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x16c4-minmax-fp32-neondot.c:112:18: warning: implicit declaration of function ‘vcvtnq_s32_f32’; did you mean ‘vcvtq_s32_f32’? [-Wimplicit-function-declaration]
112 | vacc0x0123 = vcvtnq_s32_f32(vproduct0x0123);
| ^~~~~~~~~~~~~~
| vcvtq_s32_f32
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x16c4-minmax-fp32-neondot.c:112:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x16c4-minmax-fp32-neondot.c:113:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
113 | vacc0x4567 = vcvtnq_s32_f32(vproduct0x4567);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x16c4-minmax-fp32-neondot.c:114:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
114 | vacc0x89AB = vcvtnq_s32_f32(vproduct0x89AB);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/1x16c4-minmax-fp32-neondot.c:115:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
115 | vacc0xCDEF = vcvtnq_s32_f32(vproduct0xCDEF);
| ^~~~~~~~~~~~~~
make[2]: *** [confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/build.make:15624: confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/1x16c4-minmax-fp32-neondot.c.o] Error 1
/tmp/cc3aAMfl.s: Assembler messages:
/tmp/cc3aAMfl.s:73: Error: selected processor does not support
vsdot.s8 q9,q10,d7[0]' in ARM mode /tmp/cc3aAMfl.s:76: Error: selected processor does not support
vsdot.s8 q9,q10,d7[1]' in ARM mode/tmp/cc3aAMfl.s:78: Error: selected processor does not support
vsdot.s8 q8,q10,d7[0]' in ARM mode /tmp/cc3aAMfl.s:80: Error: selected processor does not support
vsdot.s8 q8,q10,d7[1]' in ARM mode/tmp/cc3aAMfl.s:152: Error: selected processor does not support
vsdot.s8 q9,q10,d7[0]' in ARM mode /tmp/cc3aAMfl.s:154: Error: selected processor does not support
vsdot.s8 q8,q10,d7[0]' in ARM modemake[2]: *** [confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/build.make:15611: confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/1x8c4-minmax-gemmlowp-neondot.c.o] Error 1
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c: In function ‘xnn_qs8_gemm_minmax_fp32_ukernel_4x8c4__neondot’:
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c:154:18: warning: implicit declaration of function ‘vcvtnq_s32_f32’; did you mean ‘vcvtq_s32_f32’? [-Wimplicit-function-declaration]
154 | vacc0x0123 = vcvtnq_s32_f32(vproduct0x0123);
| ^~~~~~~~~~~~~~
| vcvtq_s32_f32
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c:154:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c:155:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
155 | vacc0x4567 = vcvtnq_s32_f32(vproduct0x4567);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c:156:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
156 | vacc1x0123 = vcvtnq_s32_f32(vproduct1x0123);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c:157:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
157 | vacc1x4567 = vcvtnq_s32_f32(vproduct1x4567);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c:158:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
158 | vacc2x0123 = vcvtnq_s32_f32(vproduct2x0123);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c:159:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
159 | vacc2x4567 = vcvtnq_s32_f32(vproduct2x4567);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c:160:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
160 | vacc3x0123 = vcvtnq_s32_f32(vproduct3x0123);
| ^~~~~~~~~~~~~~
/home/odroid/pytorch_install/pytorch/third_party/XNNPACK/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c:161:18: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
161 | vacc3x4567 = vcvtnq_s32_f32(vproduct3x4567);
| ^~~~~~~~~~~~~~
make[2]: *** [confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/build.make:15650: confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/4x8c4-minmax-fp32-neondot.c.o] Error 1
/tmp/ccB1jg1m.s: Assembler messages:
/tmp/ccB1jg1m.s:80: Error: selected processor does not support
vsdot.s8 q12,q9,d7[0]' in ARM mode /tmp/ccB1jg1m.s:83: Error: selected processor does not support
vsdot.s8 q12,q9,d7[1]' in ARM mode/tmp/ccB1jg1m.s:86: Error: selected processor does not support
vsdot.s8 q11,q9,d7[0]' in ARM mode /tmp/ccB1jg1m.s:89: Error: selected processor does not support
vsdot.s8 q11,q9,d7[1]' in ARM mode/tmp/ccB1jg1m.s:92: Error: selected processor does not support
vsdot.s8 q10,q9,d7[0]' in ARM mode /tmp/ccB1jg1m.s:94: Error: selected processor does not support
vsdot.s8 q10,q9,d7[1]' in ARM mode/tmp/ccB1jg1m.s:96: Error: selected processor does not support
vsdot.s8 q8,q9,d7[0]' in ARM mode /tmp/ccB1jg1m.s:98: Error: selected processor does not support
vsdot.s8 q8,q9,d7[1]' in ARM mode/tmp/ccB1jg1m.s:196: Error: selected processor does not support
vsdot.s8 q12,q9,d7[0]' in ARM mode /tmp/ccB1jg1m.s:198: Error: selected processor does not support
vsdot.s8 q10,q9,d7[0]' in ARM mode/tmp/ccB1jg1m.s:200: Error: selected processor does not support
vsdot.s8 q11,q9,d7[0]' in ARM mode /tmp/ccB1jg1m.s:202: Error: selected processor does not support
vsdot.s8 q8,q9,d7[0]' in ARM modemake[2]: *** [confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/build.make:15637: confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/1x16c4-minmax-gemmlowp-neondot.c.o] Error 1
make[1]: *** [CMakeFil