Build the Arm Compute Library
The Arm Compute Library is a machine learning library. It provides a set of functions that are optimized for both Arm CPUs and GPUs. Arm NN directly uses the Arm Compute Library to optimize the running of machine learning workloads on Arm CPUs and GPUs. To build the Arm Compute Library on your platform or board, complete the following steps:
Use the following command to open a terminal or bash screen and change directory to the Arm Compute Library directory:
$ cd $BASEDIR/ComputeLibrary
- Compile the Arm Compute Library using SCons.
To compile the Arm Compute Library on an Armv7-A based system, enter the following command:
$ scons extra_cxx_flags="-fPIC" benchmark_tests=0 validation_tests=0
To compile the Arm Compute Library on an Armv8-A based system, enter the following command:
$ scons arch=arm64-v8a extra_cxx_flags="-fPIC" benchmark_tests=0 validation_tests=0
If you want to enable benchmark tests, set benchmark_tests to 1. If you want to enable validation tests, set validation_tests to 1.
If you have one, you can enable support for OpenCL on an Arm Mali GPU.
If you want to support OpenCL for your Arm Mali GPU, add these arguments to the SCons command:
You can enable support for the Arm Neon architecture on supported Arm CPUs. To support the Arm Neon architecture, add this argument to your SCons command: