diff options
author | Jan Eilers <jan.eilers@arm.com> | 2021-07-14 13:50:15 +0100 |
---|---|---|
committer | Jan Eilers <jan.eilers@arm.com> | 2021-07-22 11:58:01 +0100 |
commit | 15fcc7ed3163c9d4b1856955271854198c3c2696 (patch) | |
tree | a4c2991ec2150c23c593f683df749f12b425cc84 /include/armnn/IRuntime.hpp | |
parent | 801e2d55de7a02b98f3d77dc9775b10b2bd9f16b (diff) | |
download | armnn-15fcc7ed3163c9d4b1856955271854198c3c2696.tar.gz |
IVGCVSW-6073 Add protected mode to ArmNN CreationOptions
* Adds logic to the Runtime to activate protected mode
* Adds ProtectedContentAllocation backend capability to ClBackend
It's not fully activated yet because the CustomAllocator is
missing. Will print an error message and won't register the backend
but won't fail.
* Extends IBackendInternal with an UseCustomAllocator function.
* Adds related unit tests
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: I64f465c5800eb104aa90db1bbf772a4148b5072f
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 bee61d21a9..fcb8c05e30 100644 --- a/include/armnn/IRuntime.hpp +++ b/include/armnn/IRuntime.hpp @@ -90,6 +90,7 @@ public: , m_EnableGpuProfiling(false) , m_DynamicBackendsPath("") , m_CustomAllocator(nullptr) + , m_ProtectedMode(false) {} /// If set, uses the GpuAcc tuned parameters from the given object when executing GPU workloads. @@ -108,6 +109,12 @@ public: /// Only supported for GpuAcc ICustomAllocator* m_CustomAllocator; + /// Setting this flag will allow the user to create the Runtime in protected mode. + /// It will run all the inferences on protected memory and will make sure that + /// INetworkProperties::m_ImportEnabled set to true with MemorySource::DmaBufProtected option + /// This will use Protected Memory Allocator associated with the backend + bool m_ProtectedMode; + struct ExternalProfilingOptions { ExternalProfilingOptions() |