aboutsummaryrefslogtreecommitdiff
path: root/delegate/classic/src/ClassicDelegateUtils.hpp
diff options
context:
space:
mode:
authorRyan OShea <ryan.oshea3@arm.com>2023-06-27 22:34:54 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2023-08-04 08:34:55 +0000
commitc229b3fd81b42140c0fa8731e90bc07323cec794 (patch)
tree1962789e2810be81cd56a2084b0f7a962f0e4e38 /delegate/classic/src/ClassicDelegateUtils.hpp
parentc377eb8305e6fdc0f4d00bb4766827fc3087bf25 (diff)
downloadarmnn-c229b3fd81b42140c0fa8731e90bc07323cec794.tar.gz
IVGCVSW-7676 Audit the use of ARMNN_ASSERT
* Replace most ARMNN_ASSERT's from tflite parser * Replace most ARMNN_ASSERT's from onnx parser * Replace some ARMNN_ASSERT's from tflite delegate * Replace some ARMNN_ASSERT;s from include files Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: Ie052e0180060203f28f64ebf54acad298f431caf
Diffstat (limited to 'delegate/classic/src/ClassicDelegateUtils.hpp')
-rw-r--r--delegate/classic/src/ClassicDelegateUtils.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/delegate/classic/src/ClassicDelegateUtils.hpp b/delegate/classic/src/ClassicDelegateUtils.hpp
index 8a9409df6a..8d6f0495f8 100644
--- a/delegate/classic/src/ClassicDelegateUtils.hpp
+++ b/delegate/classic/src/ClassicDelegateUtils.hpp
@@ -193,7 +193,10 @@ TfLiteStatus Connect(armnn::IConnectableLayer* layer,
TfLiteNode* tfLiteNode,
armnnDelegate::DelegateData& data)
{
- ARMNN_ASSERT(static_cast<unsigned int>(tfLiteNode->outputs->size) == layer->GetNumOutputSlots());
+ if (static_cast<unsigned int>(tfLiteNode->outputs->size) != layer->GetNumOutputSlots())
+ {
+ return kTfLiteError;
+ }
// Connect the input slots
for (unsigned int inputIndex = 0; inputIndex < layer->GetNumInputSlots(); ++inputIndex)