From bfa767ca56f9776e7dd3eecb4025cfeed87f9936 Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Wed, 9 Feb 2022 14:58:03 +0000 Subject: MLCE-754 'Improve operator support error/warning from Arm NN Delegate' * Improved error reporting on armnn_delegate Signed-off-by: Sadik Armagan Change-Id: I1bd131fb56d64b32b1fafad0465256178720226c --- delegate/src/armnn_delegate.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'delegate/src/armnn_delegate.cpp') 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 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::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; } -- cgit v1.2.1