aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Monahan <david.monahan@arm.com>2021-08-24 11:49:49 +0100
committerDavid Monahan <david.monahan@arm.com>2021-08-24 14:04:23 +0100
commit4e62750a2171a7bccf0c9c37514d07d3d222d1d5 (patch)
tree59e1a88aa17e2dbd69fb90b36641e451c33d99bb
parentcaf52570764d422dd74e015b095a245b6523c4de (diff)
downloadarmnn-4e62750a2171a7bccf0c9c37514d07d3d222d1d5.tar.gz
IVGCVSW-6216 PCA: Documentation Updates
* 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.