22.05
|
These are step by step instructions for using the Android NDK to build Arm NN. They have been tested on a clean install of Ubuntu 18.04 and 20.04, and should also work with other OS versions. The instructions show how to build the Arm NN core library. Building protobuf is optional. We have given steps should the user wish to build it (i.e. as an Onnx dependency). All downloaded or generated files will be saved inside the $HOME/armnn-devenv
directory.
Cmake 3.19rc3 is required to build Arm NN.
''' cd $HOME/armnn-devenv sudo apt-get install libssl-dev wget https://github.com/Kitware/CMake/releases/download/v3.19.0-rc3/cmake-3.19.0-rc3.tar.gz tar -zxvf cmake-3.19.0-rc3.tar.gz cd cmake-3.19.0-rc3 ./bootstrap –prefix=$HOME/armnn-devenv/cmake/install make all install cd.. '''
sudo apt install git
) sudo apt install curl autoconf libtool build-essential g++
) Note: The ANDROID_API variable should be set to the Android API version number you are using. E.g. "30" for Android R.
sudo apt install git
)For example, if you want to check out the 21.11 release branch:
Arm NN and Arm Compute Library are developed closely together. If you would like to use a particular release of Arm NN you will need the same release tag of ACL too.
Arm NN provides a script that downloads the version of Arm Compute Library that Arm NN was tested with:
sudo apt install scons
) sudo apt install cmake
) To include standalone sample dynamic backend tests, add the argument to enable the tests and the dynamic backend path to the CMake command:
$HOME/armnn-devenv/armnn/build/
and the unit tests run without failure then the build was successful.