aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/armnn_delegate.cpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2022-02-09 14:58:03 +0000
committerSadik Armagan <sadik.armagan@arm.com>2022-02-11 10:33:08 +0000
commitbfa767ca56f9776e7dd3eecb4025cfeed87f9936 (patch)
tree893be201ca8f5cb3f7b5cb9cec377588567fa6a2 /delegate/src/armnn_delegate.cpp
parenteef6b76fedad6ba812c4eae74266c2828f9e8de4 (diff)
downloadarmnn-bfa767ca56f9776e7dd3eecb4025cfeed87f9936.tar.gz
MLCE-754 'Improve operator support error/warning from Arm NN Delegate'
* Improved error reporting on armnn_delegate Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I1bd131fb56d64b32b1fafad0465256178720226c
Diffstat (limited to 'delegate/src/armnn_delegate.cpp')
-rw-r--r--delegate/src/armnn_delegate.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/delegate/src/armnn_delegate.cpp b/delegate/src/armnn_delegate.cpp
index ed19b72787..03db4a17f8 100644
--- a/delegate/src/armnn_delegate.cpp
+++ b/delegate/src/armnn_delegate.cpp
@@ -183,6 +183,9 @@ TfLiteIntArray* Delegate::IdentifyOperatorsToDelegate(TfLiteContext* tfLiteConte
TfLiteIntArray* nodesToDelegate = TfLiteIntArrayCreate(executionPlan->size);
nodesToDelegate->size = 0;
+
+ std::set<int32_t> unsupportedOperators;
+
for (int i = 0; i < executionPlan->size; ++i)
{
const int nodeIndex = executionPlan->data[i];
@@ -203,12 +206,21 @@ TfLiteIntArray* Delegate::IdentifyOperatorsToDelegate(TfLiteContext* tfLiteConte
delegateData, tfLiteContext, tfLiteRegistration, tfLiteNode, nodeIndex) != kTfLiteOk)
{
// node is not supported by ArmNN
+ unsupportedOperators.insert(tfLiteRegistration->builtin_code);
continue;
}
nodesToDelegate->data[nodesToDelegate->size++] = nodeIndex;
}
+ for (std::set<int32_t>::iterator it=unsupportedOperators.begin(); it!=unsupportedOperators.end(); ++it)
+ {
+ TF_LITE_KERNEL_LOG(tfLiteContext,
+ "Operator %s [%d] is not supported by armnn_delegate.",
+ tflite::EnumNameBuiltinOperator(tflite::BuiltinOperator(*it)),
+ *it);
+ }
+
std::sort(&nodesToDelegate->data[0], &nodesToDelegate->data[nodesToDelegate->size]);
return nodesToDelegate;
}