Build the example plugin

The example backend implements a simple custom plugin to help show how you can write your own custom plugins. The example backend simulates optimizing addition layers by substituting them with a pre-compiled layer. This pre-compiled layer includes a pre-compiled object that represents an optimized alternative to the addition layer in Arm NN. This pre-compiled object is an instance of a CustomPreCompiledObject.

Follow these steps to integrate the example custom plugin with your existing Arm NN build:

  1. Download the file containing the example plugin to a temporary location, for example /tmp.
  2. Extract the contents of the zip file:

    cd /tmp
  3. Copy the example plugin to the src/backends folder in your Arm NN installation:

    cp -r /tmp/custom <armnn_install_dir>/armnn/src/backends/
  4. Re-run CMake to produce the new makefiles that are needed to build the example plugin:

    cd <armnn_install_dir>/armnn/build
    cmake .. -DBOOST_ROOT=<boost_lib_dir>
  5. Compile using the make command:

    make -j32
  6. Run all the Arm NN unit tests, including those supplied with the example plugin:

    cd <armnn_install_dir>/armnn/build

    The output should be:

    Running 1204 test cases...
    *** No errors detected
Previous Next