diff options
author | Mike Kelly <mike.kelly@arm.com> | 2022-11-22 16:16:01 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-11-23 09:31:26 +0000 |
commit | 21cf67af47a9cebbc10a98184c204fffa3722abd (patch) | |
tree | d0ed7de1270646b3070d00faef524ea60aa05ec9 /src/backends/cl/ClBackendContext.hpp | |
parent | 975a6a2f896eb2e5457f6ffa528f7fb018fd2927 (diff) | |
download | armnn-21cf67af47a9cebbc10a98184c204fffa3722abd.tar.gz |
IVGCVSW-7297 When creating multiple Executors only the last
one works fine
* Each CLBackend created its own ClContextControlWrapper which invalidated
the OpenCL context's from all CLBackends that were created before that one.
* Now CLBackends will keep a shared_ptr to a ClContextControlWrapper which
more closely matches the functionality within ACL.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: I0744c2cb6a2f0d6b0c5fa54d786f88cf97775559
Diffstat (limited to 'src/backends/cl/ClBackendContext.hpp')
-rw-r--r-- | src/backends/cl/ClBackendContext.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backends/cl/ClBackendContext.hpp b/src/backends/cl/ClBackendContext.hpp index 659d47b7c2..276067727b 100644 --- a/src/backends/cl/ClBackendContext.hpp +++ b/src/backends/cl/ClBackendContext.hpp @@ -31,8 +31,11 @@ public: private: std::mutex m_Mutex; + struct ClContextControlWrapper; - std::unique_ptr<ClContextControlWrapper> m_ClContextControlWrapper; + static std::shared_ptr<ClBackendContext::ClContextControlWrapper> Get(); + + std::shared_ptr<ClBackendContext::ClContextControlWrapper> m_ClContextControlWrapper; std::unordered_set<NetworkId> m_NetworkIds; |