/pytorch-aarch64

PyTorch wheels (whl) & docker for aarch64 / ARMv8 / ARM64, with vision, audio & text

Primary LanguageDockerfileMIT LicenseMIT

pytorch-aarch64

PyTorch, torchvision, torchaudio and torchtext wheels (whl) and docker image for aarch64 / ARMv8 / ARM64 devices

中文版 (for Gitee) | GitHub | Web

Install

Run:

pip install torch -f https://torch.maku.ml/whl/stable.html

Add torchvision, torchaudio, torchtext and other packages if you need.

Note: this command installs the latest version. For choosing a specific version, please check the Custom Builds section.

To pick the whl files manually, check the releases.

Docker

docker run -it kumatea/pytorch

To pull the image, run docker pull kumatea/pytorch.

To check all available tags, click here.

FastAI

FastAI is a great open-source high-level deep learning framework based on PyTorch. It recommends installing by conda, but there is no Anaconda builds for aarch64. So, install fastai by:

pip install fastai -f https://torch.maku.ml/whl/stable.html

torch and torchvision will be installed as dependencies automatically.

Similarly, fastbook could be installed by:

pip install fastbook -f https://torch.maku.ml/whl/stable.html

Custom Builds

torch torchvision torchaudio torchtext Status python
master
nightly
master
nightly
master
nightly
master
nightly
>=3.6
1.7.1 0.8.2 0.7.2 0.8.1 passing >=3.6
1.7.0 0.8.1
0.8.0
0.7.0 0.8.0 running >=3.6
1.6.0 [i] 0.7.0 0.6.0 0.7.0 running >=3.6
1.5.1 0.6.1 0.5.0 0.6.0 running >=3.5
1.5.0 0.6.0 0.5.0 0.6.0 running >=3.5
1.4.1
1.4.0
0.5.0 0.4.0 0.5.0 running ==2.7, >=3.5, <=3.8
1.3.1 0.4.2 canceled ==2.7, >=3.5, <=3.7
1.3.0 0.4.1 canceled ==2.7, >=3.5, <=3.7
1.2.0 0.4.0 canceled ==2.7, >=3.5, <=3.7
1.1.0 0.3.0 canceled ==2.7, >=3.5, <=3.7
<=1.0.1 0.2.2 canceled ==2.7, >=3.5, <=3.7

Corresponding Versions

Official PyTorch CI Builds

You might not be able to see the statuses.

ZUUL / openlabtesting uses HTTP API to fetch its CI statuses, but GitHub Page are forced HTTPS.

If so, you will need to visit this page via GitHub.

py
ver
3.6 3.7 3.8 3.9
master Build Status Build Status Build Status
1.8.0
1.7.1
1.7.0
1.6.0 Build Status
1.5.0 Build Status
1.4.0 Build Status

More Info

FAQ

  • Q: Does this run on Raspberry Pi?
    A: Yes, if the architecture of the SoC is aarch64. It should run on all ARMv8 chips.

  • Q: Does this support CUDA / CUDNN?
    A: No. Check here for more information.

  • Q: Does this run on Nvidia Jetson?
    A: Yes, but extremely slow. Each Nvidia Jetson boards contains an Nvidia GPU, but this project only build cpu wheels. To better make use of your hardware, build it yourself.

About PyTorch v1.6.0

A fatal bug is encountered and this patch is applied while building PyTorch v1.6.0. The patch has been merged into mainstream in later versions.

About TorchText

The latest torchtext version you can install from PyPI (pip) is 0.6.0, namely torchtext-0.6.0-py3-none-any.whl, is the last official version that is available for all devices.

From that on, the newer version are only built for x86_64 / amd64, like other projects. However, for torchtext, version 0.6.0 is deprecated but significantly more recent than the dropped versions of other projects.

CUDA / CUDNN Support

Since the building environment (as below) does not contain an Nvidia GPU, the wheels could not be built with cuda support.

If you need it, please use an Nvidia Jetson board to run the building code.

Building Environment

SoC: Allwinner H6 (quad-core A53)

Architecture: ARMv8 / ARM64 / aarch64

OS: Debian Buster

GCC: v8.3.0

Virtualization: Docker

Performance

Test date: 2020-12-25

Less execution time is better

Platform Specs Task Avg. Time Version
aarch64 ARM Cortex-A53 Image Prediction 41,264.514 ms 1.7.1 / 3.8.5
aarch64 QUALCOMM Snapdragon 845 Image Prediction 9,763.317 ms 1.7.1 / 3.8.5
amd64 INTEL Core i7-6500U Image Prediction 374.274 ms 1.7.1+cpu / 3.8.6
Google Colab INTEL Xeon ??? / NVIDIA Tesla T4 Image Prediction 314.650 ms 1.7.1+cu101 / 3.6.9
Kaggle INTEL Xeon ??? / NVIDIA Tesla P100 Image Prediction 307.503 ms 1.7.1+cu110 / 3.7.6

Note:

  1. This test was done by using a same Cat or Dog model, to predict 10 random animal images (while same for each group).
  2. The latest version of PyTorch was manually installed on all platforms, but driver and Python remained default.