Skip to content

Navigation Menu

Sign in
Sign up
This repository was archived by the owner on Aug 26, 2026. It is now read-only.

ARM builds of PyTorch & Torchvision

F-G Fernandez edited this page Mar 16, 2021 · 3 revisions

PyTorch

Install all dependencies

conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests dataclasses
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
# if you are updating an existing checkout
git submodule sync
git submodule update --init --recursive
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}

Configure the setup by uncommenting the following lines in setup.py:

USE_CUDA=0
USE_CUDNN=0
BUILD_TEST=0
USE_MKLDNN=0
USE_NNPACK=0
USE_QNNPACK=0
USE_DISTRIBUTED=0
BUILD_CAFFE2_OPS=0
BUILD_CAFFE2=0

Finally

export BUILD_VERSION='<YOUR_VERSION>'
python3 setup.py bdist_wheel

Torchvision

Install all dependencies

git clone https://github.com/pytorch/vision
cd vision

Build it

export BUILD_VERSION='<YOUR_VERSION>'
export NO_FFMPEG=True
python3 setup.py bdist_wheel

Clone this wiki locally

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /