diff options
author | David Monahan <david.monahan@arm.com> | 2021-07-19 17:06:30 +0100 |
---|---|---|
committer | David Monahan <david.monahan@arm.com> | 2021-07-22 10:27:06 +0000 |
commit | 801e2d55de7a02b98f3d77dc9775b10b2bd9f16b (patch) | |
tree | a82709e7db40cb2982b2c5bcb4fba7d812965c7c /include/armnn/IRuntime.hpp | |
parent | b49ed18ac76cbab23201598f08972cfed19cce4c (diff) | |
download | armnn-801e2d55de7a02b98f3d77dc9775b10b2bd9f16b.tar.gz |
IVGCVSW-6077 Add the Custom Memory Allocator interface definition
* Added ICustomAllocator.hpp to include/armnn/backends/
* Added the ability to specify an ICustomAllocator to the CreationOptions
Signed-off-by: David Monahan <david.monahan@arm.com>
Change-Id: I820e468b691aa032c9bd2c1e1257dc9d02f981d9
Diffstat (limited to 'include/armnn/IRuntime.hpp')
-rw-r--r-- | include/armnn/IRuntime.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp index f88b6b664f..bee61d21a9 100644 --- a/include/armnn/IRuntime.hpp +++ b/include/armnn/IRuntime.hpp @@ -14,6 +14,7 @@ #include "TypesUtils.hpp" #include "profiling/ILocalPacketHandler.hpp" +#include <armnn/backends/ICustomAllocator.hpp> #include <memory> namespace armnn @@ -88,6 +89,7 @@ public: : m_GpuAccTunedParameters(nullptr) , m_EnableGpuProfiling(false) , m_DynamicBackendsPath("") + , m_CustomAllocator(nullptr) {} /// If set, uses the GpuAcc tuned parameters from the given object when executing GPU workloads. @@ -101,6 +103,11 @@ public: /// Only a single path is allowed for the override std::string m_DynamicBackendsPath; + /// A Custom Allocator used for allocation of working memory in the backends. + /// Set this for when you need to allocate Protected Working Memory, required for ProtectedMode + /// Only supported for GpuAcc + ICustomAllocator* m_CustomAllocator; + struct ExternalProfilingOptions { ExternalProfilingOptions() |