aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/NetworkUtils.cpp
diff options
context:
space:
mode:
authorDeclan-ARM <decmce01@arm.com>2024-03-12 16:40:25 +0000
committerColm Donelan <colm.donelan@arm.com>2024-03-13 10:07:56 +0000
commit7c75e336fbeeec052a1cb90c68d1caece332c176 (patch)
tree8fac689c1b4192522f5fa98bccbfab12b8e08afe /src/armnn/NetworkUtils.cpp
parent93bbf00d968101fb9a9174ad011b655ca7100546 (diff)
downloadarmnn-7c75e336fbeeec052a1cb90c68d1caece332c176.tar.gz
IVGCVSW-7853 Assert audit and removal
* src/armnn * src/armnn/layers Signed-off-by: Declan-ARM <decmce01@arm.com> Change-Id: Ic78cbbb59e90fbb15f893205a358c45264243721
Diffstat (limited to 'src/armnn/NetworkUtils.cpp')
-rw-r--r--src/armnn/NetworkUtils.cpp8
1 files changed, 6 insertions, 2 deletions
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<DebugLayer*> InsertDebugLayerAfter(Graph& graph, Layer& layer, bool
graph.InsertNewLayer<DebugLayer>(*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);