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 --- .../backendsCommon/test/LayerReleaseConstantDataTest.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/backends/backendsCommon') diff --git a/src/backends/backendsCommon/test/LayerReleaseConstantDataTest.cpp b/src/backends/backendsCommon/test/LayerReleaseConstantDataTest.cpp index 5ceb8ae4b4..abfb621c93 100644 --- a/src/backends/backendsCommon/test/LayerReleaseConstantDataTest.cpp +++ b/src/backends/backendsCommon/test/LayerReleaseConstantDataTest.cpp @@ -108,7 +108,6 @@ TEST_CASE("ReleaseConvolution2dLayerConstantDataTest") TensorInfo biasInfo = biasLayer->m_LayerOutput->GetTensorInfo(); biasInfo.SetConstant(); - weightsLayer->GetOutputSlot(0).SetTensorInfo(weightsInfo); biasLayer->GetOutputSlot(0).SetTensorInfo(biasInfo); @@ -123,15 +122,15 @@ TEST_CASE("ReleaseConvolution2dLayerConstantDataTest") Connect(layer, output, TensorInfo({ 2, 2, 2, 10 }, armnn::DataType::Float32)); // check the constants that they are not NULL - CHECK(layer->m_Weight != nullptr); - CHECK(layer->m_Bias != nullptr); + CHECK(weightsLayer->m_LayerOutput != nullptr); + CHECK(biasLayer->m_LayerOutput != nullptr); // free up the constants.. layer->ReleaseConstantData(); // check the constants that they are NULL now - CHECK(layer->m_Weight == nullptr); - CHECK(layer->m_Bias == nullptr); + CHECK(weightsLayer->m_LayerOutput == nullptr); + CHECK(biasLayer->m_LayerOutput == nullptr); } TEST_CASE("ReleaseDepthwiseConvolution2dLayerConstantDataTest") -- cgit v1.2.1