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
Follow these steps to integrate the example custom plugin with your existing Arm NN build:
- Download the ArmNNPluginFramework.zip file containing the example plugin to a temporary location, for example /tmp.
- Extract the contents of the zip file:
- Copy the example plugin to the
src/backendsfolder in your Arm NN installation:
cp -r /tmp/custom <armnn_install_dir>/armnn/src/backends/
- Re-run CMake to produce the new makefiles that are needed to build the example plugin:
cmake .. -DBOOST_ROOT=<boost_lib_dir>
- Compile using the
- Run all the Arm NN unit tests, including those supplied with the example plugin:
The output should be:
Running 1204 test cases...
*** No errors detected