aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/armnn_delegate.cpp
diff options
context:
space:
mode:
authorColm Donelan <colm.donelan@arm.com>2023-01-25 21:19:49 +0000
committerColm Donelan <colm.donelan@arm.com>2023-01-27 18:29:32 +0000
commit3811a97033be66f7a5d8fc3340b0899e0b60f737 (patch)
treed32a1352970668a009065b6f6b0575dd608efae8 /delegate/src/armnn_delegate.cpp
parent0c61a755cdcdf4ec2b3b79031c6cdf0432d3e87a (diff)
downloadarmnn-3811a97033be66f7a5d8fc3340b0899e0b60f737.tar.gz
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 <colm.donelan@arm.com> Change-Id: I80a4cc788de4ffe08afb2df9185d04fcb8b27c3a
Diffstat (limited to 'delegate/src/armnn_delegate.cpp')
-rw-r--r--delegate/src/armnn_delegate.cpp5
1 files changed, 5 insertions, 0 deletions
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;