diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2022-02-09 14:58:03 +0000 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2022-02-11 10:33:08 +0000 |
commit | bfa767ca56f9776e7dd3eecb4025cfeed87f9936 (patch) | |
tree | 893be201ca8f5cb3f7b5cb9cec377588567fa6a2 /delegate/src/DelegateUtils.hpp | |
parent | eef6b76fedad6ba812c4eae74266c2828f9e8de4 (diff) | |
download | armnn-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/DelegateUtils.hpp')
-rw-r--r-- | delegate/src/DelegateUtils.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/delegate/src/DelegateUtils.hpp b/delegate/src/DelegateUtils.hpp index 678a3db002..e0ba1cf4e7 100644 --- a/delegate/src/DelegateUtils.hpp +++ b/delegate/src/DelegateUtils.hpp @@ -25,7 +25,7 @@ namespace { // Macro to call an Is<layer_name>Supported function and log caller name together with reason for lack of support -#define FORWARD_LAYER_SUPPORT_FUNC(funcName, tfLiteContext, func, backends, supported, ...) \ +#define FORWARD_LAYER_SUPPORT_FUNC(opName, tfLiteContext, func, backends, supported, ...) \ try \ { \ for (auto&& backendId : backends) \ @@ -45,23 +45,23 @@ try \ if (reasonIfUnsupported.size() > 0) \ { \ TFLITE_LOG_PROD(tflite::TFLITE_LOG_WARNING, \ - "%s: not supported by armnn: %s", funcName, reasonIfUnsupported.c_str()); \ + "%s: not supported by armnn: %s", opName, reasonIfUnsupported.c_str()); \ } \ else \ { \ TFLITE_LOG_PROD(tflite::TFLITE_LOG_WARNING, \ - "%s: not supported by armnn", funcName); \ + "%s: not supported by armnn", opName); \ } \ } \ } \ else \ { \ - TF_LITE_KERNEL_LOG(tfLiteContext, "%s: backend not registered: %s", funcName, backendId.Get().c_str()); \ + TF_LITE_KERNEL_LOG(tfLiteContext, "%s: backend not registered: %s", opName, backendId.Get().c_str()); \ } \ } \ if (!supported) \ { \ - TF_LITE_KERNEL_LOG(tfLiteContext, "%s: not supported by any specified backend", funcName); \ + TF_LITE_KERNEL_LOG(tfLiteContext, "%s: not supported by any specified backend", opName); \ } \ } \ catch (const armnn::InvalidArgumentException &e) \ @@ -224,7 +224,7 @@ armnn::IConnectableLayer* BroadcastTensor(const armnn::TensorInfo& inputInfo0, armnn::ReshapeDescriptor reshapeDescriptor; reshapeDescriptor.m_TargetShape = reshapedInfo.GetShape(); bool isSupported = false; - FORWARD_LAYER_SUPPORT_FUNC(__func__, + FORWARD_LAYER_SUPPORT_FUNC("RESHAPE", tfLiteContext, IsReshapeSupported, delegateData.m_Backends, @@ -331,7 +331,7 @@ TfLiteStatus FusedActivation(TfLiteContext* tfLiteContext, } bool isSupported = false; - FORWARD_LAYER_SUPPORT_FUNC(__func__, + FORWARD_LAYER_SUPPORT_FUNC("ACTIVATION", tfLiteContext, IsActivationSupported, data.m_Backends, @@ -561,7 +561,7 @@ TfLiteStatus ConnectConstant(armnn::IConnectableLayer* layer, { IgnoreUnused(layer); bool isSupported = false; - FORWARD_LAYER_SUPPORT_FUNC(__func__, + FORWARD_LAYER_SUPPORT_FUNC("CONSTANT", tfLiteContext, IsConstantSupported, data.m_Backends, @@ -608,7 +608,7 @@ TfLiteStatus ProcessInputs(armnn::IConnectableLayer* layer, { armnn::TensorInfo inputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteInputTensor); bool isSupported = false; - FORWARD_LAYER_SUPPORT_FUNC(__func__, + FORWARD_LAYER_SUPPORT_FUNC("CONSTANT", tfLiteContext, IsConstantSupported, delegateData.m_Backends, |