From 8df6bf3f3b8d06b7588c2095fcf5b71c9ab85003 Mon Sep 17 00:00:00 2001 From: David Monahan Date: Fri, 10 Nov 2023 09:55:33 +0000 Subject: IVGCVSW-7753 Tweak to Opaque delegate exception catching * Updated the exception catch when calling EnqueueWorkload to also print the exception to std::out when caught. Helps greatly with debugging Signed-off-by: David Monahan Change-Id: I8e9dd4d69986543ff33cd91703bb381d4d062b22 --- delegate/opaque/src/armnn_delegate.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/delegate/opaque/src/armnn_delegate.cpp b/delegate/opaque/src/armnn_delegate.cpp index 33a07f244d..54bdf36982 100644 --- a/delegate/opaque/src/armnn_delegate.cpp +++ b/delegate/opaque/src/armnn_delegate.cpp @@ -678,7 +678,10 @@ TfLiteStatus ArmnnSubgraph::Invoke(TfLiteOpaqueContext* tfLiteContext, TfLiteOpa } catch (armnn::InvalidArgumentException& ex) { - ARMNN_LOG(error) << "ArmNN Failed to EnqueueWorkload with error: " << ex.what(); + std::stringstream exMessage; + exMessage << "ArmNN Failed to EnqueueWorkload with error: " << ex.what(); + ARMNN_LOG(error) << exMessage.str(); + TFLITE_LOG_PROD_ONCE(tflite::TFLITE_LOG_INFO, exMessage.str().c_str()); // This should really be kTfLiteDelegateError but the Delegate Test Suite expects kTfLiteError so we return // that instead return kTfLiteError; -- cgit v1.2.1