From d86f6c4697e0c1511c553e76e0e59b72a5730fac Mon Sep 17 00:00:00 2001 From: Francis Murtagh Date: Mon, 9 May 2022 17:00:21 +0100 Subject: IVGCVSW-6145 ConstTensorsAsInput: Optimizer Fix - GetConstantTensorsByRef * Add functionality to check for ConstantTensorsAsInputs to GetConstantTensorsByRef * Reorder optimizations so RedirectMembersToConstantInputs occurs after Conversion of Constants * Ensure graph is in topological order after loading in OptimizedNet * Fixed test to check release of m_LayerOutputs. Signed-off-by: Francis Murtagh Change-Id: I7cff50798d7217e8ea0d2f9b153eabd10174a566 --- src/armnn/layers/Convolution2dLayer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/armnn/layers/Convolution2dLayer.cpp') diff --git a/src/armnn/layers/Convolution2dLayer.cpp b/src/armnn/layers/Convolution2dLayer.cpp index 7b3382bf93..dbbd009716 100644 --- a/src/armnn/layers/Convolution2dLayer.cpp +++ b/src/armnn/layers/Convolution2dLayer.cpp @@ -139,6 +139,13 @@ void Convolution2dLayer::ValidateTensorShapesFromInputs() Layer::ConstantTensors Convolution2dLayer::GetConstantTensorsByRef() { + Layer::ConstantTensors tensors = GetConnectedConstantAsInputTensors(); + + if (!tensors.empty()) + { + return tensors; + } + // For API stability DO NOT ALTER order and add new members to the end of vector return {m_Weight, m_Bias}; } -- cgit v1.2.1