diff options
author | Finn Williams <Finn.Williams@arm.com> | 2021-03-22 17:51:06 +0000 |
---|---|---|
committer | finn.williams <finn.williams@arm.com> | 2021-04-07 16:42:38 +0000 |
commit | 4422ceca976a88aac49b21808a43e465bc87a35e (patch) | |
tree | d4f7f3d86394f74b679c907ad3f7fc7f4537933f /src/armnn/layers/DetectionPostProcessLayer.hpp | |
parent | b70ec417989490a2a72c66ecd6c737df1c094f4c (diff) | |
download | armnn-4422ceca976a88aac49b21808a43e465bc87a35e.tar.gz |
Fix graph copy memory spike
* Change layer storage of ConstTensors to std::shared_ptr<ConstCpuTensorHandle>
* Change clone to share ConstTensor rather than copy
* Remove uses of non-const GetTensor() call
* Reduce scope of non-optimized network in ExeNet, so memory can be released after use
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: Ibb2c7309d12411d21405bd6024c76bcdf5404545
Diffstat (limited to 'src/armnn/layers/DetectionPostProcessLayer.hpp')
-rw-r--r-- | src/armnn/layers/DetectionPostProcessLayer.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/armnn/layers/DetectionPostProcessLayer.hpp b/src/armnn/layers/DetectionPostProcessLayer.hpp index b0d58589b4..e40966a19c 100644 --- a/src/armnn/layers/DetectionPostProcessLayer.hpp +++ b/src/armnn/layers/DetectionPostProcessLayer.hpp @@ -17,7 +17,7 @@ class DetectionPostProcessLayer : public LayerWithParameters<DetectionPostProces { public: /// A unique pointer to store Anchor values. - std::unique_ptr<ScopedCpuTensorHandle> m_Anchors; + std::shared_ptr<ConstCpuTensorHandle> m_Anchors; /// Makes a workload for the DetectionPostProcess type. /// @param [in] graph The graph where this layer can be found. |