aboutsummaryrefslogtreecommitdiff
path: root/delegate/classic/src
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2023-09-07 14:48:56 +0100
committerCiara Sookarry <ciara.sookarry@arm.com>2023-09-22 17:11:45 +0100
commit76d0c4c6ff4f2dc71f9d3a73ad6f051d2562135b (patch)
tree0346782a60c9e1af620fc1c8a664d6a80d0a36b9 /delegate/classic/src
parentd631463a585fd9fde9f11bd7d07d7ef1c10560c0 (diff)
downloadarmnn-76d0c4c6ff4f2dc71f9d3a73ad6f051d2562135b.tar.gz
IVGCVSW-7954 Upgrade Arm NN to Tensorflow 2.14
* Added initializers for async_kernel and inplace_operator during Classic Delegate registration. * Updated failing Delegate unit tests. * Updated experimental Opaque Delegate header paths. * Updated libraries in FindTfLite.cmake for building with a debug TensorFlow build. * Update get_tensorflow.sh to TensorFlow 2.14 Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Signed-off-by: Idriss Chaouch <idriss.chaouch@arm.com> Change-Id: I084d54bcd1cd941d7cab8122bc244d94821ce6fc
Diffstat (limited to 'delegate/classic/src')
-rw-r--r--delegate/classic/src/armnn_delegate.cpp2
-rw-r--r--delegate/classic/src/test/ArmnnClassicDelegateTest.cpp12
2 files changed, 12 insertions, 2 deletions
diff --git a/delegate/classic/src/armnn_delegate.cpp b/delegate/classic/src/armnn_delegate.cpp
index c428d46d87..c8f57d6cc3 100644
--- a/delegate/classic/src/armnn_delegate.cpp
+++ b/delegate/classic/src/armnn_delegate.cpp
@@ -124,6 +124,8 @@ TfLiteStatus DoPrepare(TfLiteContext* tfLiteContext, TfLiteDelegate* tfLiteDeleg
.custom_name = "TfLiteArmNnDelegate",
.version = 1,
.registration_external = nullptr,
+ .async_kernel = nullptr,
+ .inplace_operator = 0
};
const TfLiteStatus status =
diff --git a/delegate/classic/src/test/ArmnnClassicDelegateTest.cpp b/delegate/classic/src/test/ArmnnClassicDelegateTest.cpp
index 409b769273..e83f47f244 100644
--- a/delegate/classic/src/test/ArmnnClassicDelegateTest.cpp
+++ b/delegate/classic/src/test/ArmnnClassicDelegateTest.cpp
@@ -31,9 +31,13 @@ TEST_CASE ("ArmnnDelegate Registered")
tfLiteInterpreter->SetTensorParametersReadWrite(1, kTfLiteFloat32, "input2", {1,2,2,1}, TfLiteQuantization());
tfLiteInterpreter->SetTensorParametersReadWrite(2, kTfLiteFloat32, "output", {1,2,2,1}, TfLiteQuantization());
+ TfLiteAddParams* addParams = reinterpret_cast<TfLiteAddParams*>(malloc(sizeof(TfLiteAddParams)));
+ addParams->activation = kTfLiteActNone;
+ addParams->pot_scale_int16 = false;
+
tflite::ops::builtin::BuiltinOpResolver opResolver;
const TfLiteRegistration* opRegister = opResolver.FindOp(BuiltinOperator_ADD, 1);
- tfLiteInterpreter->AddNodeWithParameters({0, 1}, {2}, "", 0, nullptr, opRegister);
+ tfLiteInterpreter->AddNodeWithParameters({0, 1}, {2}, "", 0, addParams, opRegister);
// Create the Armnn Delegate
std::vector<armnn::BackendId> backends = { armnn::Compute::CpuRef };
@@ -69,9 +73,13 @@ TEST_CASE ("ArmnnDelegateOptimizerOptionsRegistered")
tfLiteInterpreter->SetTensorParametersReadWrite(1, kTfLiteFloat32, "input2", {1,2,2,1}, TfLiteQuantization());
tfLiteInterpreter->SetTensorParametersReadWrite(2, kTfLiteFloat32, "output", {1,2,2,1}, TfLiteQuantization());
+ TfLiteAddParams* addParams = reinterpret_cast<TfLiteAddParams*>(malloc(sizeof(TfLiteAddParams)));
+ addParams->activation = kTfLiteActNone;
+ addParams->pot_scale_int16 = false;
+
tflite::ops::builtin::BuiltinOpResolver opResolver;
const TfLiteRegistration* opRegister = opResolver.FindOp(BuiltinOperator_ADD, 1);
- tfLiteInterpreter->AddNodeWithParameters({0, 1}, {2}, "", 0, nullptr, opRegister);
+ tfLiteInterpreter->AddNodeWithParameters({0, 1}, {2}, "", 0, addParams, opRegister);
// Create the Armnn Delegate
std::vector<armnn::BackendId> backends = { armnn::Compute::CpuRef };