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:

  1. Use the following command to open a terminal or bash screen and change directory to the Arm Compute Library directory:

    $ cd $BASEDIR/ComputeLibrary
  2. Compile the Arm Compute Library using SCons.  
    1. 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
    2. 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:

    opencl=1 embed_kernels=1

    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:

    neon=1 
Previous Next