diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2022-02-04 17:50:20 +0000 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2022-02-06 19:20:11 +0000 |
commit | ec5463d394453d268706ee6213b1c6a7619d4a5d (patch) | |
tree | 98d17988da24affbe57a324241d9407ae3345f83 /src/armnn/OutputHandler.hpp | |
parent | 23c26277086c78704a17f0dae86da947816320c0 (diff) | |
download | armnn-ec5463d394453d268706ee6213b1c6a7619d4a5d.tar.gz |
IVGCVSW-6747 Call Cl sync after EnqueueWorkload
* Add AfterEnqueueWorkload to IBackendContext
* Implement AfterEnqueueWorkload in ClBackendContext to call Cl sync
* Set allocated data on outputhandler only once
* Handle PreImportedHandles and CurImportedId the same way as Async
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I9f59d57e298d4a494569faec3078d66af799f77b
Diffstat (limited to 'src/armnn/OutputHandler.hpp')
-rw-r--r-- | src/armnn/OutputHandler.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/armnn/OutputHandler.hpp b/src/armnn/OutputHandler.hpp index 3fd2519ed5..d1cb2deea3 100644 --- a/src/armnn/OutputHandler.hpp +++ b/src/armnn/OutputHandler.hpp @@ -50,15 +50,15 @@ public: void SetData(std::unique_ptr<ITensorHandle> data) { m_TensorHandle = std::move(data); } - void SetAllocatedData() { m_AllocatedTensorHandle = std::move(m_TensorHandle); } + void SetAllocatedData(); - void UseAllocatedData() { m_TensorHandle = std::move(m_AllocatedTensorHandle); } + void UseAllocatedData() { m_TensorHandle = m_AllocatedTensorHandle; } /// @brief Returns true if SetTensorInfo() has been called at least once on this. bool IsTensorInfoSet() const { return m_bTensorInfoSet; } private: - std::unique_ptr<ITensorHandle> m_TensorHandle; - std::unique_ptr<ITensorHandle> m_AllocatedTensorHandle; + std::shared_ptr<ITensorHandle> m_TensorHandle; + std::shared_ptr<ITensorHandle> m_AllocatedTensorHandle; TensorInfo m_TensorInfo; bool m_bTensorInfoSet = false; }; |