diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2022-08-16 12:17:24 +0100 |
---|---|---|
committer | Nikhil Raj <nikhil.raj@arm.com> | 2022-08-29 10:12:44 +0100 |
commit | ca565c1b04b767abfc13a59146680663a3ea4008 (patch) | |
tree | 58b260768fe8cb690f740ece44fca9c415620d7f /delegate/src/armnn_delegate.cpp | |
parent | 514d16b434102a4a7807548745af301baab13b6b (diff) | |
download | armnn-ca565c1b04b767abfc13a59146680663a3ea4008.tar.gz |
IVGCVSW-6603 'Add a no fallback mode to the TfLite Delegate'
* Added disable-tflite-runtime-fallback option to armnn_delegate
* Updated armnn_delegate version
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I449b16404d3ffe98e6dac52a43e7c25225addd73
Diffstat (limited to 'delegate/src/armnn_delegate.cpp')
-rw-r--r-- | delegate/src/armnn_delegate.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/delegate/src/armnn_delegate.cpp b/delegate/src/armnn_delegate.cpp index eac3862c18..c041dd1714 100644 --- a/delegate/src/armnn_delegate.cpp +++ b/delegate/src/armnn_delegate.cpp @@ -222,6 +222,15 @@ TfLiteIntArray* Delegate::IdentifyOperatorsToDelegate(TfLiteContext* tfLiteConte *it); } + if (!unsupportedOperators.empty() && m_Options.TfLiteRuntimeFallbackDisabled()) + { + std::stringstream exMessage; + exMessage << "TfLiteArmnnDelegate: There are unsupported operators in the model. "; + exMessage << "Not falling back to TfLite Runtime as fallback is disabled. "; + exMessage << "This should only be disabled under test conditions."; + throw armnn::Exception(exMessage.str()); + } + std::sort(&nodesToDelegate->data[0], &nodesToDelegate->data[nodesToDelegate->size]); return nodesToDelegate; } |