From 7c75e336fbeeec052a1cb90c68d1caece332c176 Mon Sep 17 00:00:00 2001 From: Declan-ARM Date: Tue, 12 Mar 2024 16:40:25 +0000 Subject: IVGCVSW-7853 Assert audit and removal * src/armnn * src/armnn/layers Signed-off-by: Declan-ARM Change-Id: Ic78cbbb59e90fbb15f893205a358c45264243721 --- src/armnn/NetworkUtils.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/armnn/NetworkUtils.cpp') diff --git a/src/armnn/NetworkUtils.cpp b/src/armnn/NetworkUtils.cpp index 1d46f029dc..f711209d33 100644 --- a/src/armnn/NetworkUtils.cpp +++ b/src/armnn/NetworkUtils.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2022 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2022,2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -125,7 +125,11 @@ std::vector InsertDebugLayerAfter(Graph& graph, Layer& layer, bool graph.InsertNewLayer(*outputSlot, debugName.c_str(), toFile); // Sets output tensor info for the debug layer. - ARMNN_ASSERT(debugLayer->GetInputSlot(0).GetConnectedOutputSlot() == &(*outputSlot)); + if (debugLayer->GetInputSlot(0).GetConnectedOutputSlot() != &(*outputSlot)) + { + throw armnn::Exception("unable to set output tensor info for the debug layer."); + } + TensorInfo debugInfo = debugLayer->GetInputSlot(0).GetConnectedOutputSlot()->GetTensorInfo(); debugLayer->GetOutputSlot().SetTensorInfo(debugInfo); -- cgit v1.2.1