aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/FillLayer.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/layers/FillLayer.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/layers/FillLayer.cpp')
-rw-r--r--src/armnn/layers/FillLayer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/armnn/layers/FillLayer.cpp b/src/armnn/layers/FillLayer.cpp
index af01b99847..c40efb33fb 100644
--- a/src/armnn/layers/FillLayer.cpp
+++ b/src/armnn/layers/FillLayer.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2020-2024 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "FillLayer.hpp"
@@ -41,7 +41,12 @@ void FillLayer::ValidateTensorShapesFromInputs()
auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetTensorInfo().GetShape() });
- ARMNN_ASSERT(inferredShapes.size() == 1);
+ if (inferredShapes.size() != 1)
+ {
+ throw armnn::Exception("inferredShapes has "
+ + std::to_string(inferredShapes.size()) +
+ " elements - should only have 1.");
+ }
// Cannot validate the output shape from the input shape. but we can validate that the correct dims have been
// inferred