Build Arm NN
Configure the Arm NN SDK build using CMake.
To do this, change your directory to the Arm NN directory and enter the following parameters to CMake:
- |
The location of your Compute Library source files directory. |
- |
The location of your Compute Library build directory. |
- |
The directory used for boost (see prefix flag used above). |
- |
The location of your protobuf install directory. |
- |
This parameter is =1 to ensure ONNX parser is built. |
- |
The location of your ONNX generated sources. |
For example:
$ cd $BASEDIR/armnn $ mkdir build $ cd build $ cmake .. -DARMCOMPUTE_ROOT=$BASEDIR/ComputeLibrary -DARMCOMPUTE_BUILD_DIR=$BASEDIR/ComputeLibrary/build -DBOOST_ROOT=$BASEDIR/boost -DPROTOBUF_ROOT=$BASEDIR/protobuf-host -DBUILD_ONNX_PARSER=1 -DONNX_GENERATED_SOURCES=$BASEDIR/onnx $ make
Duration: About 12 minutes.
If you are supporting NEON, add this argument to the CMake command:
-DARMCOMPUTENEON=1
If you are supporting OpenCL, add this argument to the CMake command:
-DARMCOMPUTECL=1
If you want to include Arm NN reference support, add this argument to the CMake command:
-DARMNNREF=1
If you want to include standalone sample dynamic backend tests, add the following argument to enable the tests and the dynamic backend path to the CMake command:
-DSAMPLE_DYNAMIC_BACKEND=1 -DDYNAMIC_BACKEND_PATHS=<the location of the sample dynamic backend>
Also, after building Arm NN, build the standalone sample dynamic backend using the guide in the following path: $BASEDIR/armnn/src/dynamic/README.md#standalone-dynamic-backend-build
.
The following Arm NN library files will be built in the armnn/build directory:
libarmnnOnnxParser.so
libarmnn.so
libarmnnUtils.a