From 3811a97033be66f7a5d8fc3340b0899e0b60f737 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Wed, 25 Jan 2023 21:19:49 +0000 Subject: IVGCVSW-7441 Checking for constant input tensors before populating. * When the tfLiteExecutor attempts to populate the input tensors it did not check whether the tensor was constant. This was causing segmentation faults. Signed-off-by: Colm Donelan Change-Id: I80a4cc788de4ffe08afb2df9185d04fcb8b27c3a --- delegate/src/armnn_delegate.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'delegate/src') diff --git a/delegate/src/armnn_delegate.cpp b/delegate/src/armnn_delegate.cpp index b2d9c67c7b..4ddfc1a35f 100644 --- a/delegate/src/armnn_delegate.cpp +++ b/delegate/src/armnn_delegate.cpp @@ -243,6 +243,11 @@ TfLiteIntArray* Delegate::IdentifyOperatorsToDelegate(TfLiteContext* tfLiteConte exMessage << "This should only be disabled under test conditions."; throw armnn::Exception(exMessage.str()); } + if (nodesToDelegate->size == 0) + { + ARMNN_LOG(info) << "No operators in this model are supported by the Arm NN TfLite delegate." << + " The model will be executed entirely by TfLite runtime."; + } std::sort(&nodesToDelegate->data[0], &nodesToDelegate->data[nodesToDelegate->size]); return nodesToDelegate; -- cgit v1.2.1