aboutsummaryrefslogtreecommitdiff
path: root/delegate/opaque/src/armnn_delegate.cpp
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2023-05-03 16:08:11 +0100
committerFrancis Murtagh <francis.murtagh@arm.com>2023-05-05 15:45:35 +0000
commit26654cb71db2b1e163527f52c3198d9434bb0e37 (patch)
treec7406ad3edde1e914c9474bbedd4a21c62d612b4 /delegate/opaque/src/armnn_delegate.cpp
parent74be13e0d663b9127f630360fffa55993ccce9d6 (diff)
downloadarmnn-26654cb71db2b1e163527f52c3198d9434bb0e37.tar.gz
IVGCVSW-7423 Add ArmnnDelegatePlugin
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: Ie02021ac56a512598760e4c6d05ef1a80f4aec8d
Diffstat (limited to 'delegate/opaque/src/armnn_delegate.cpp')
-rw-r--r--delegate/opaque/src/armnn_delegate.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/delegate/opaque/src/armnn_delegate.cpp b/delegate/opaque/src/armnn_delegate.cpp
index fa64679efc..8cdf01ffc3 100644
--- a/delegate/opaque/src/armnn_delegate.cpp
+++ b/delegate/opaque/src/armnn_delegate.cpp
@@ -62,11 +62,15 @@ namespace armnnOpaqueDelegate
const TfLiteStableDelegate TFL_TheStableDelegate =
{
/*delegate_abi_version=*/ TFL_STABLE_DELEGATE_ABI_VERSION,
- /*delegate_name=*/ "ArmnnDelegatePlugin",
- /*delegate_version=*/ "1.0.0",
+ /*delegate_name=*/ "armnn_delegate",
+ /*delegate_version=*/ OPAQUE_DELEGATE_VERSION,
/*delegate_plugin=*/ GetArmnnDelegatePluginApi()
};
+static auto* g_delegate_plugin_ArmnnDelegatePlugin_ =
+ new tflite::delegates::DelegatePluginRegistry::Register(TFL_TheStableDelegate.delegate_name,
+ ArmnnDelegatePlugin::New);
+
ArmnnOpaqueDelegate::ArmnnOpaqueDelegate(armnnDelegate::DelegateOptions options)
: m_Options(std::move(options))
{
@@ -121,7 +125,9 @@ TfLiteStatus DoPrepare(TfLiteOpaqueContext* tfLiteContext, TfLiteOpaqueDelegate*
// ArmNN Opaque Delegate Registration
TfLiteRegistrationExternal* kernelRegistration =
- TfLiteRegistrationExternalCreate(kTfLiteBuiltinDelegate, "TfLiteArmNNOpaqueDelegate", /*version=*/1);
+ TfLiteRegistrationExternalCreate(kTfLiteBuiltinDelegate,
+ TFL_TheStableDelegate.delegate_name,
+ /*version=*/OPAQUE_DELEGATE_MAJOR_VERSION);
if(kernelRegistration == nullptr)
{
return kTfLiteError;