compile pytorch, torchvision, torchaudio in jetson nano

Raspberry Pi, Jeston Nano


henrywu
Posts: 202
Joined: Sun Apr 17, 2022 4:57 pm

compile pytorch, torchvision, torchaudio in jetson nano

Post by henrywu »

clang 8 is required for cuda 10.2.

Code: Select all

#!/bin/bash

#sudo apt-get install clang
## the dependencies
#sudo apt-get install ninja-build git cmake
#sudo apt-get install libjpeg-dev libopenmpi-dev libomp-dev ccache
#sudo apt-get install libopenblas-dev libblas-dev libeigen3-dev
#sudo -H pip3 install -U --user wheel mock pillow

export BUILD_CAFFE2_OPS=OFF
export USE_FBGEMM=OFF
export USE_FAKELOWP=OFF
export BUILD_TEST=OFF
export USE_MKLDNN=OFF
export USE_NNPACK=ON
export USE_XNNPACK=ON
export USE_QNNPACK=ON
export MAX_JOBS=4
export USE_OPENCV=OFF
export USE_NCCL=OFF
export USE_SYSTEM_NCCL=OFF
export PATH=/usr/lib/ccache:$PATH
# set clang compiler
export CC=clang-8
export CXX=clang++-8
# clean up the previous build, if necessary
#python3 setup.py clean
# start the build
python3 setup.py bdist_wheel
henrywu
Posts: 202
Joined: Sun Apr 17, 2022 4:57 pm

compile pytorch, torchvision, torchaudio, openpifpaf in jetson nano

Post by henrywu »

Code: Select all

$export MAX_JOBS=4
$export CC=clang
$export CXX=clang++
$python setup.py bdist_wheel
...
[1158][nano][0][bash](18:46:56)[0](jetson) : ~/openpifpaf
$pip install dist/openpifpaf-0.13.4+2.gc7b05a2-cp38-cp38-linux_aarch64.whl --no-deps --ignore-installed
....
Attachments
openpifpaf-0.13.4+2.gc7b05a2-cp38-cp38-linux_aarch64.whl
(3.36 MiB) Downloaded 569 times
Post Reply