diff options
-rw-r--r-- | src/backends/README.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/backends/README.md b/src/backends/README.md index b7aa25228a..7105319f2a 100644 --- a/src/backends/README.md +++ b/src/backends/README.md @@ -226,6 +226,28 @@ runtime will hold this for its entire lifetime. It then calls the following inte * ```BeforeUnloadNetwork(NetworkId networkId)``` * ```AfterUnloadNetwork(NetworkId networkId)``` +## The UseCustomMemoryAllocator interface + +Backends can also have an associated CustomMemoryAllocator registered with them that ArmNN will use to allocate +intra/inter-layer memory. This particular feature is required if you want a backend to use ProtectedContentAllocation. +To support this on your own backend you must implement the UseCustomMemoryAllocator interface. + +This interface returns a boolean value which indicates if the provided allocator is supported by +the backend. This interface is also used by the lambda function returned by the Backend Registry to configure +the CustomMemoryAllocator. Within the backend itself there should be a wrapper class to convert the generic +CustomMemoryAllocator provided by the interface into something that is more suitable for your own backend. + +Examples of how this can be done are in the [ClBackend header](cl/ClBackend.hpp) and the +[ClRegistryInitializer header](cl/ClRegistryInitializer.cpp) + +## The GetCapabilities interface + +This is a list of BackendCapabilities currently supported by the backend. It consists of a constant list of +Name/Value pairs, each containing a string name, and a boolean value to indicate support. For example to +indicate support for ProtectedContentAllocation you would return {"ProtectedContentAllocation", true} + +An example can be found at the top of [ClBackend header](cl/ClBackend.hpp) + ## Dynamic backends Backends can also be loaded by Arm NN dynamically at runtime. |