ArmNN
 21.11
InstallationViaAptRepository.md
Go to the documentation of this file.
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 * [Check latest version of packages](#check-latest-version-of-packages)
10 * [Install desired combination of packages](#install-desired-combination-of-packages)
11 * [Uninstall packages](#uninstall-packages)
12 
13 
14 ## Introduction
15 These are the step by step instructions on how to install the Arm NN core, TensorflowLite Parser
16 as well as PyArmNN for x86_64, Arm64 and Armhf for Ubuntu 20.04.
17 The packages will also be added to Debian Bullseye, their progress can be tracked here:
18 https://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 
31 We provide a number of packages for each architecture; x86_64, aarch64 and armhf as outlined below.
32 
33 ARMNN_MAJOR_VERSION: This is the ABI version of the Arm NN source that has been packaged based on
34 include/armnn/Version.hpp.
35 
36 ARMNN_RELEASE_VERSION: This is the marketing release version based on the date source was released on github e.g. 20.11.
37 
38 PACKAGE_VERSION: This is the version of the source package used to build the binaries packages from.
39 
40 ### x86_64
41 * Runtime Packages
42 ```
43 libarmnn-cpuref-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
44 libarmnntfliteparser{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
45 libarmnn{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
46 python3-pyarmnn_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
47 ```
48 * Development Packages
49 ```
50 libarmnn-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
51 libarmnntfliteparser-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 ```
55 armnn-latest-all_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
56 armnn-latest-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
57 ```
58 ### arm64
59 * Runtime Packages
60 ```
61 libarmnn-aclcommon{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
62 libarmnn-cpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
63 libarmnn-cpuref-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
64 libarmnn-gpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
65 libarmnntfliteparser{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
66 libarmnn{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
67 python3-pyarmnn_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
68 
69 ```
70 * Development Packages
71 ```
72 libarmnn-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
73 libarmnntfliteparser-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 ```
78 armnn-latest-all_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
79 armnn-latest-cpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
80 armnn-latest-cpu-gpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
81 armnn-latest-cpu-gpu-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
82 armnn-latest-gpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
83 armnn-latest-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
84 ```
85 ### armhf
86 * Runtime Packages
87 ```
88 libarmnn-aclcommon{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
89 libarmnn-cpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
90 libarmnn-cpuref-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
91 libarmnn-gpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
92 libarmnntfliteparser{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
93 libarmnn{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
94 python3-pyarmnn_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
95 
96 ```
97 * Development Packages
98 ```
99 libarmnn-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
100 libarmnntfliteparser-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 ```
105 armnn-latest-all_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
106 armnn-latest-cpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
107 armnn-latest-cpu-gpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
108 armnn-latest-cpu-gpu-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
109 armnn-latest-gpu_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
110 armnn-latest-ref_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
111 ```
112 
113 ## Install desired combination of packages
114 The 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. 27.0.0
121 ```
122 This will install PyArmNN and the three backends for Neon (CpuAcc), OpenCL (GpuAcc) and our Reference Backend.
123 It will also install their dependencies including the arm-compute-library package along with the Tensorflow Lite Parser
124 and it's dependency Arm NN Core.
125 If the user does not wish to use PyArmNN they can go up a level of dependencies and instead just install the
126 armnn-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
146 Due to Debian Packaging requiring the pristine tarball from our Github release, the version on Launchpad may not align
147 with the released version on Github depending on the complexity of newly added features.
148 In 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  libarmnn23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
160  libarmnn24 - Arm NN is an inference engine for CPUs, GPUs and NPUs
161  libarmnn25 - Arm NN is an inference engine for CPUs, GPUs and NPUs
162  libarmnn-aclcommon23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
163  libarmnnaclcommon24 - Arm NN is an inference engine for CPUs, GPUs and NPUs # Note: removal of dash to suit debian naming conventions
164  libarmnn-cpuacc-backend23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
165  libarmnn-cpuacc-backend24 - Arm NN is an inference engine for CPUs, GPUs and NPUs
166  libarmnn-gpuacc-backend23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
167  libarmnn-gpuacc-backend24 - Arm NN is an inference engine for CPUs, GPUs and NPUs
168 
169 
170  # Export the ARMNN_MAJOR_VERSION to the latest visible e.g. libarmnn25 to allow installation using the below examples
171  export ARMNN_MAJOR_VERSION=27
172 
173  # As the Tensorflow Lite Parser is now ABI stable it will have a different version to ARMNN_MAJOR_VERSION please choose latest version:
174  apt-cache search libarmnntfliteparser
175  # Returns e.g. libarmnntfliteparser24 so we then export that version, for reference this comes from include/armnnTfLiteParser/Version.hpp:
176  export TFLITE_PARSER_VERSION=24
177 
178  sudo apt-get install -y libarmnntfliteparser${TFLITE_PARSER_VERSION} libarmnn-cpuacc-backend${ARMNN_MAJOR_VERSION}
179 ```
180 
181 ## Uninstall packages
182 The easiest way to uninstall all of the previously installed packages is to run the command:
183 ```
184  sudo apt-get purge -y armnn-latest-all
185  sudo apt autoremove -y armnn-latest-all
186 ```