diff options
Diffstat (limited to 'src/backends/cl/ClBackend.hpp')
-rw-r--r-- | src/backends/cl/ClBackend.hpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/backends/cl/ClBackend.hpp b/src/backends/cl/ClBackend.hpp index db03cfeff0..c742c0b204 100644 --- a/src/backends/cl/ClBackend.hpp +++ b/src/backends/cl/ClBackend.hpp @@ -13,13 +13,14 @@ namespace armnn const BackendCapabilities gpuAccCapabilities("GpuAcc", { {"NonConstWeights", false}, - {"AsyncExecution", false} + {"AsyncExecution", false}, + {"ProtectedContentAllocation", true} }); class ClBackend : public IBackendInternal { public: - ClBackend() = default; + ClBackend() : m_EnableCustomAllocator(false) {}; ~ClBackend() = default; static const BackendId& GetIdStatic(); @@ -70,6 +71,18 @@ public: { return gpuAccCapabilities; }; + + virtual bool UseCustomMemoryAllocator(armnn::Optional<std::string&> errMsg) override + { + IgnoreUnused(errMsg); + + // Set flag to signal the backend to use a custom memory allocator + m_EnableCustomAllocator = true; + + return m_EnableCustomAllocator; + } + + bool m_EnableCustomAllocator; }; } // namespace armnn |