aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Monahan <david.monahan@arm.com>2021-08-24 11:49:49 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2021-08-24 15:48:21 +0100
commit217b0fa4b084e49a82944d2ec9f0a9ccf3bdeb2f (patch)
tree7e4225f8d7e2027620504354711b04f557bb477f
parent29a09bea658ca21377d146105b5445ffb11220f7 (diff)
downloadarmnn-branches/armnn_21_08.tar.gz
IVGCVSW-6216 PCA: Documentation Updatesv21.08branches/armnn_21_08
* Added the UseCustomMemoryAllocator interface to the Backend Developer Guide * Added the GetCapabilities interface to the Backend Developer Guide Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I26e96ec1b3fe74b52c770269f3f79e688d196667
-rw-r--r--src/backends/README.md22
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.