From 4422ceca976a88aac49b21808a43e465bc87a35e Mon Sep 17 00:00:00 2001 From: Finn Williams Date: Mon, 22 Mar 2021 17:51:06 +0000 Subject: Fix graph copy memory spike * Change layer storage of ConstTensors to std::shared_ptr * 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 Change-Id: Ibb2c7309d12411d21405bd6024c76bcdf5404545 --- src/armnn/layers/FullyConnectedLayer.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/armnn/layers/FullyConnectedLayer.hpp') diff --git a/src/armnn/layers/FullyConnectedLayer.hpp b/src/armnn/layers/FullyConnectedLayer.hpp index 4a9cbe1136..c45b081c85 100644 --- a/src/armnn/layers/FullyConnectedLayer.hpp +++ b/src/armnn/layers/FullyConnectedLayer.hpp @@ -16,9 +16,9 @@ class FullyConnectedLayer : public LayerWithParameters { public: /// A unique pointer to store Weight values. - std::unique_ptr m_Weight; + std::shared_ptr m_Weight; /// A unique pointer to store Bias values. - std::unique_ptr m_Bias; + std::shared_ptr m_Bias; /// Makes a workload for the FullyConnected type. /// @param [in] graph The graph where this layer can be found. -- cgit v1.2.1