xref: /aosp_15_r20/external/armnn/InstallationViaAptRepository.md (revision 89c4ff92f2867872bb9e2354d150bf0c8c502810)
1# How to install ArmNN via our APT repository on Ubuntu's Launchpad
2
3* [Introduction](#introduction)
4* [Add the Ubuntu Launchpad PPA to your system](#add-the-ubuntu-launchpad-ppa-to-your-system)
5* [Outline of available packages](#outline-of-available-packages)
6  + [x86_64](#x86_64)
7  + [arm64](#arm64)
8  + [armhf](#armhf)
9* [Install desired combination of packages](#install-desired-combination-of-packages)
10* [Installation of specific ABI versioned packages](#installation-of-specific-abi-versioned-packages)
11* [Uninstall packages](#uninstall-packages)
12
13
14## Introduction
15These are the step by step instructions on how to install the Arm NN core, TensorflowLite Parser
16as well as PyArmNN for x86_64, Arm64 and Armhf for Ubuntu 20.04.
17The packages will also be added to Debian Bullseye, their progress can be tracked here:
18https://tracker.debian.org/pkg/armnn.
19
20
21## Add the Ubuntu Launchpad PPA to your system
22* Add the PPA to your sources using a command contained in software-properties-common package:
23    ```
24    sudo apt install software-properties-common
25    sudo add-apt-repository ppa:armnn/ppa
26    sudo apt update
27    ```
28* More information about our PPA and the Ubuntu Launchpad service can be found at [launchpad.net](https://launchpad.net/~armnn/+archive/ubuntu/ppa)
29## Outline of available packages
30
31We provide a number of packages for each architecture; x86_64, aarch64 and armhf as outlined below.
32
33ARMNN_MAJOR_VERSION: This is the ABI version of the Arm NN source that has been packaged based on
34include/armnn/Version.hpp.
35
36ARMNN_RELEASE_VERSION: This is the marketing release version based on the date source was released on github e.g. 20.11.
37
38PACKAGE_VERSION: This is the version of the source package used to build the binaries packages from.
39
40### x86_64
41* Runtime Packages
42```
43libarmnn-cpuref-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
44libarmnntfliteparser{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
45libarmnn{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
46python3-pyarmnn_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
47```
48* Development Packages
49```
50libarmnn-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
51libarmnntfliteparser-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
52```
53* Dependency Packages (These are empty packages that provide a user-friendly name for other packages they will install)
54```
55armnn-latest-all_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
56armnn-latest-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
57```
58### arm64
59* Runtime Packages
60```
61libarmnn-aclcommon{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
62libarmnn-cpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
63libarmnn-cpuref-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
64libarmnn-gpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
65libarmnntfliteparser{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
66libarmnn{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
67python3-pyarmnn_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
68
69```
70* Development Packages
71```
72libarmnn-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
73libarmnntfliteparser-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
74
75```
76* Dependency Packages (These are empty packages that provide a user-friendly name for other packages they will install)
77```
78armnn-latest-all_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
79armnn-latest-cpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
80armnn-latest-cpu-gpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
81armnn-latest-cpu-gpu-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
82armnn-latest-gpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
83armnn-latest-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
84```
85### armhf
86* Runtime Packages
87```
88libarmnn-aclcommon{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
89libarmnn-cpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
90libarmnn-cpuref-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
91libarmnn-gpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
92libarmnntfliteparser{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
93libarmnn{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
94python3-pyarmnn_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
95
96```
97* Development Packages
98```
99libarmnn-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
100libarmnntfliteparser-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
101
102```
103* Dependency Packages (These are empty packages that provide a user-friendly name for other packages they will install)
104```
105armnn-latest-all_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
106armnn-latest-cpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
107armnn-latest-cpu-gpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
108armnn-latest-cpu-gpu-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
109armnn-latest-gpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
110armnn-latest-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
111```
112
113## Install desired combination of packages
114The easiest way to install all of the available packages for your systems architecture is to run the command:
115
116```
117 sudo apt-get install -y python3-pyarmnn armnn-latest-all
118 # Verify installation via python:
119 python3 -c "import pyarmnn as ann;print(ann.GetVersion())"
120 # Returns '{ARMNN_MAJOR_VERSION}.0.0' e.g. 32.0.0
121```
122This will install PyArmNN and the three backends for Neon (CpuAcc), OpenCL (GpuAcc) and our Reference Backend.
123It will also install their dependencies including the arm-compute-library package along with the Tensorflow Lite Parser
124and it's dependency Arm NN Core.
125If the user does not wish to use PyArmNN they can go up a level of dependencies and instead just install the
126armnn-latest-all package:
127```
128  # Install ArmNN Core, CpuAcc Backend, GpuAcc Backend and Reference Backend as well as the TensorFlow Lite Parser:
129  # (This will only install CpuAcc and GpuAcc Backends on arm64 and armhf architectures)
130  sudo apt-get install -y armnn-latest-all
131
132  # Install ArmNN Core, CpuAcc Backend as well as the TensorFlow Lite Parser:
133  sudo apt-get install -y armnn-latest-cpu
134
135  # Install ArmNN Core, CpuAcc Backend, GpuAcc Backend as well as the TensorFlow Lite Parser:
136  sudo apt-get install -y armnn-latest-cpu-gpu
137
138  # Install ArmNN Core, GpuAcc Backend as well as the TensorFlow Lite Parser:
139  sudo apt-get install -y armnn-latest-gpu
140
141  # Install ArmNN Core, Reference Backend as well as the TensorFlow Lite Parser:
142  sudo apt-get install -y armnn-latest-ref
143```
144
145## Installation of specific ABI versioned packages
146Due to Debian Packaging requiring the pristine tarball from our Github release, the version on Launchpad may not align
147with the released version on Github depending on the complexity of newly added features.
148In order to check for the latest available Arm NN version use apt-cache search:
149```
150 apt-cache search libarmnn
151
152 # This returns a list of matching packages including versions from previous releases
153 libarmnn-cpuref-backend23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
154 libarmnn-cpuref-backend24 - Arm NN is an inference engine for CPUs, GPUs and NPUs
155 libarmnn-dev - Arm NN is an inference engine for CPUs, GPUs and NPUs
156 libarmnntfliteparser-dev - Arm NN is an inference engine for CPUs, GPUs and NPUs # Note: removal of dash to suit debian naming conventions
157 libarmnn-tfliteparser23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
158 libarmnntfliteparser24 - Arm NN is an inference engine for CPUs, GPUs and NPUs # Note: removal of dash to suit debian naming conventions
159 libarmnntfliteparser24.5 - Arm NN is an inference engine for CPUs, GPUs and NPUs # Note: removal of dash to suit debian naming conventions
160 libarmnn23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
161 libarmnn24 - Arm NN is an inference engine for CPUs, GPUs and NPUs
162 libarmnn25 - Arm NN is an inference engine for CPUs, GPUs and NPUs
163 libarmnn30 - Arm NN is an inference engine for CPUs, GPUs and NPUs
164 libarmnn-aclcommon23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
165 libarmnnaclcommon24 - Arm NN is an inference engine for CPUs, GPUs and NPUs # Note: removal of dash to suit debian naming conventions
166 libarmnn-cpuacc-backend23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
167 libarmnn-cpuacc-backend24 - Arm NN is an inference engine for CPUs, GPUs and NPUs
168 libarmnn-gpuacc-backend23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
169 libarmnn-gpuacc-backend24 - Arm NN is an inference engine for CPUs, GPUs and NPUs
170
171
172 # Export the ARMNN_MAJOR_VERSION to the latest visible e.g. libarmnn30 to allow installation using the below examples
173 export ARMNN_MAJOR_VERSION=30
174
175  # As the Tensorflow Lite Parser is now ABI stable it will have a different version to ARMNN_MAJOR_VERSION please choose latest version:
176  apt-cache search libarmnntfliteparser
177  # Returns e.g. libarmnntfliteparser24.5 so we then export that version, for reference this comes from include/armnnTfLiteParser/Version.hpp:
178  export TFLITE_PARSER_VERSION=24.5
179
180  sudo apt-get install -y libarmnntfliteparser${TFLITE_PARSER_VERSION} libarmnn-cpuacc-backend${ARMNN_MAJOR_VERSION}
181```
182
183## Uninstall packages
184The easiest way to uninstall all of the previously installed packages is to run the command:
185```
186 sudo apt-get purge -y armnn-latest-all
187 sudo apt autoremove -y armnn-latest-all
188```
189