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:

-DARMCOMPUTE_ROOT

The location of your Compute Library source files directory.

-DARMCOMPUTE_BUILD_DIR

The location of your Compute Library build directory.

-DBOOST_ROOT

The directory used for boost (see prefix flag used above).

-DPROTOBUF_ROOT

The location of your protobuf install directory.

-DBUILD_ONNX_PARSER

This parameter is =1 to ensure ONNX parser is built.

-DONNX_GENERATED_SOURCES

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

The following Arm NN library files will be built in the armnn/build directory:

  • libarmnnOnnxParser.so
  • libarmnn.so
  • libarmnnUtils.a
Previous Next