ArmNN
 22.05
README.md
Go to the documentation of this file.
1 # Arm NN
2 
3 * [Quick Start Guides](#quick-start-guides)
4 * [Pre-Built Binaries](#pre-built-binaries)
5 * [Software Overview](#software-overview)
6 * [Get Involved](#get-involved)
7 * [Contributions](#contributions)
8 * [Disclaimer](#disclaimer)
9 * [License](#license)
10 * [Third-Party](#third-party)
11 * [Build Flags](#build-flags)
12 
13 **_Arm NN_** is the **most performant** machine learning (ML) inference engine for Android and Linux, accelerating ML
14 on **Arm Cortex-A CPUs and Arm Mali GPUs**. This ML inference engine is an open source SDK which bridges the gap
15 between existing neural network frameworks and power-efficient Arm IP.
16 
17 Arm NN outperforms generic ML libraries due to **Arm architecture-specific optimizations** (e.g. SVE2) by utilizing
18 **[Arm Compute Library (ACL)](https://github.com/ARM-software/ComputeLibrary/)**. To target Arm Ethos-N NPUs, Arm NN
19 utilizes the [Ethos-N NPU Driver](https://github.com/ARM-software/ethos-n-driver-stack). For Arm Cortex-M acceleration,
20 please see [CMSIS-NN](https://github.com/ARM-software/CMSIS_5).
21 
22 Arm NN is written using portable **C++14** and built using [CMake](https://cmake.org/) - enabling builds for a wide
23 variety of target platforms, from a wide variety of host environments. **Python** developers can interface with Arm NN
24 through the use of our **Arm NN TF Lite Delegate**.
25 
26 
27 ## Quick Start Guides
28 **The Arm NN TF Lite Delegate provides the widest ML operator support in Arm NN** and is an easy way to accelerate
29 your ML model. To start using the TF Lite Delegate, first download the **[Pre-Built Binaries](#pre-built-binaries)** for
30 the latest release of Arm NN. Using a Python interpreter, you can load your TF Lite model into the Arm NN TF Lite
31 Delegate and run accelerated inference. Please see this
32 **[Quick Start Guide](delegate/DelegateQuickStartGuide.md)** on GitHub or this more comprehensive
33 **[Arm Developer Guide](https://developer.arm.com/documentation/102561/latest/)** for information on how to accelerate
34 your TF Lite model using the Arm NN TF Lite Delegate.
35 
36 The fastest way to integrate Arm NN into an **Android app** is by using our **Arm NN AAR (Android Archive) file with
37 Android Studio**. The AAR file nicely packages up the Arm NN TF Lite Delegate, Arm NN itself and ACL; ready to be
38 integrated into your Android ML application. Using the AAR allows you to benefit from the **vast operator support** of
39 the Arm NN TF Lite Delegate. We held an **[Arm AI Tech Talk](https://www.youtube.com/watch?v=Zu4v0nqq2FA)** on how to
40 accelerate an ML Image Segmentation app in 5 minutes using this AAR file, with the supporting guide
41 **[here](https://developer.arm.com/documentation/102744/latest)**. To download the Arm NN AAR file, please see the
42 **[Pre-Built Binaries](#pre-built-binaries)** section below.
43 
44 We also provide Debian packages for Arm NN, which are a quick way to start using Arm NN and the TF Lite Parser
45 (albeit with less ML operator support than the TF Lite Delegate). There is an installation guide available
46 [here](InstallationViaAptRepository.md) which provides instructions on how to install the Arm NN Core and the TF Lite
47 Parser for Ubuntu 20.04.
48 
49 
50 ## Pre-Built Binaries
51 
52 | Operating System | Architecture-specific Release Archive (Download) |
53 |-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
54 | Android (AAR) | [![](https://img.shields.io/badge/download-android--aar-orange)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmnnDelegate-release.aar) |
55 | Android 27 | [![](https://img.shields.io/badge/download-arm64--v8.2a-blue)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-android-27-arm64-v8.2-a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v8a-red)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-android-27-arm64-v8a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v7a-brightgreen)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-android-27-armv7a.tar.gz) |
56 | Android 28 | [![](https://img.shields.io/badge/download-arm64--v8.2a-blue)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-android-28-arm64-v8.2-a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v8a-red)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-android-28-arm64-v8a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v7a-brightgreen)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-android-28-armv7a.tar.gz) |
57 | Android 29 | [![](https://img.shields.io/badge/download-arm64--v8.2a-blue)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-android-29-arm64-v8.2-a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v8a-red)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-android-29-arm64-v8a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v7a-brightgreen)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-android-29-armv7a.tar.gz) |
58 | Linux | [![](https://img.shields.io/badge/download-aarch64-green)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-linux-aarch64.tar.gz) [![](https://img.shields.io/badge/download-x86__64-yellow)](https://github.com/ARM-software/armnn/releases/download/v22.02/ArmNN-linux-x86_64.tar.gz) |
59 
60 
61 ## Software Overview
62 The Arm NN SDK supports ML models in **TensorFlow Lite** (TF Lite) and **ONNX** formats.
63 
64 **Arm NN's TF Lite Delegate** accelerates TF Lite models through **Python or C++ APIs**. Supported TF Lite operators
65 are accelerated by Arm NN and any unsupported operators are delegated (fallback) to the reference TF Lite runtime -
66 ensuring extensive ML operator support. **The recommended way to use Arm NN is to
67 [convert your model to TF Lite format](https://www.tensorflow.org/lite/convert) and use the TF Lite Delegate.** Please
68 refer to the [Quick Start Guides](#quick-start-guides) for more information on how to use the TF Lite Delegate.
69 
70 Arm NN also provides **TF Lite and ONNX parsers** which are C++ libraries for integrating TF Lite or ONNX models
71 into your ML application. Please note that these parsers do not provide extensive ML operator coverage as compared
72 to the Arm NN TF Lite Delegate.
73 
74 **Android** ML application developers have a number of options for using Arm NN:
75 * Use our Arm NN AAR (Android Archive) file with **Android Studio** as described in the
76 [Quick Start Guides](#quick-start-guides) section
77 * Download and use our [Pre-Built Binaries](#pre-built-binaries) for the Android platform
78 * Build Arm NN from scratch with the Android NDK using this [GitHub guide](BuildGuideAndroidNDK.md)
79 
80 Arm also provides an [Android-NN-Driver](https://github.com/ARM-software/android-nn-driver) which implements a
81 hardware abstraction layer (HAL) for the Android NNAPI. When the Android NN Driver is integrated on an Android device,
82 ML models used in Android applications will automatically be accelerated by Arm NN.
83 
84 For more information about the Arm NN components, please refer to our
85 [documentation](https://github.com/ARM-software/armnn/wiki/Documentation).
86 
87 Arm NN is a key component of the [machine learning platform](https://mlplatform.org/), which is part of the
88 [Linaro Machine Intelligence Initiative](https://www.linaro.org/news/linaro-announces-launch-of-machine-intelligence-initiative/).
89 
90 For FAQs and troubleshooting advice, see the [FAQ](docs/FAQ.md) or take a look at previous
91 [GitHub Issues](https://github.com/ARM-software/armnn/issues).
92 
93 
94 ## Get Involved
95 The best way to get involved is by using our software. If you need help or encounter and issue, please raise it as a
96 [GitHub Issue](https://github.com/ARM-software/armnn/issues). Feel free to have a look at any of our open issues too.
97 We also welcome feedback on our documentation.
98 
99 Feature requests without a volunteer to implement them are closed, but have the 'Help wanted' label, these can be
100 found [here](https://github.com/ARM-software/armnn/issues?q=is%3Aissue+label%3A%22Help+wanted%22+).
101 Once you find a suitable Issue, feel free to re-open it and add a comment, so that Arm NN engineers know you are
102 working on it and can help.
103 
104 When the feature is implemented the 'Help wanted' label will be removed.
105 
106 
107 ## Contributions
108 The Arm NN project welcomes contributions. For more details on contributing to Arm NN please see the
109 [Contributing page](https://mlplatform.org/contributing/) on the [MLPlatform.org](https://mlplatform.org/) website,
110 or see the [Contributor Guide](ContributorGuide.md).
111 
112 Particularly if you'd like to implement your own backend next to our CPU, GPU and NPU backends there are guides for
113 backend development: [Backend development guide](src/backends/README.md),
114 [Dynamic backend development guide](src/dynamic/README.md).
115 
116 
117 ## Disclaimer
118 The armnn/tests directory contains tests used during Arm NN development. Many of them depend on third-party IP, model
119 protobufs and image files not distributed with Arm NN. The dependencies for some tests are available freely on
120 the Internet, for those who wish to experiment, but they won't run out of the box.
121 
122 
123 ## License
124 Arm NN is provided under the [MIT](https://spdx.org/licenses/MIT.html) license.
125 See [LICENSE](LICENSE) for more information. Contributions to this project are accepted under the same license.
126 
127 Individual files contain the following tag instead of the full license text.
128 
129  SPDX-License-Identifier: MIT
130 
131 This enables machine processing of license information based on the SPDX License Identifiers that are available
132 here: http://spdx.org/licenses/
133 
134 
135 ## Third-party
136 Third party tools used by Arm NN:
137 
138 | Tool | License (SPDX ID) | Description | Version | Provenience
139 |----------------|-------------------|------------------------------------------------------------------|-------------|-------------------
140 | cxxopts | MIT | A lightweight C++ option parser library | SHA 12e496da3d486b87fa9df43edea65232ed852510 | https://github.com/jarro2783/cxxopts
141 | doctest | MIT | Header-only C++ testing framework | 2.4.6 | https://github.com/onqtam/doctest
142 | fmt | MIT | {fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams. | 7.0.1 | https://github.com/fmtlib/fmt
143 | ghc | MIT | A header-only single-file std::filesystem compatible helper library | 1.3.2 | https://github.com/gulrak/filesystem
144 | half | MIT | IEEE 754 conformant 16-bit half-precision floating point library | 1.12.0 | http://half.sourceforge.net
145 | mapbox/variant | BSD | A header-only alternative to 'boost::variant' | 1.1.3 | https://github.com/mapbox/variant
146 | stb | MIT | Image loader, resize and writer | 2.16 | https://github.com/nothings/stb
147 
148 
149 ## Build Flags
150 Arm NN uses the following security related build flags in their code:
151 
152 | Build flags |
153 |---------------------|
154 | -Wall |
155 | -Wextra |
156 | -Wold-style-cast |
157 | -Wno-missing-braces |
158 | -Wconversion |
159 | -Wsign-conversion |
160 | -Werror |