diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2023-09-07 14:48:56 +0100 |
---|---|---|
committer | Ciara Sookarry <ciara.sookarry@arm.com> | 2023-09-22 17:11:45 +0100 |
commit | 76d0c4c6ff4f2dc71f9d3a73ad6f051d2562135b (patch) | |
tree | 0346782a60c9e1af620fc1c8a664d6a80d0a36b9 /delegate/classic | |
parent | d631463a585fd9fde9f11bd7d07d7ef1c10560c0 (diff) | |
download | armnn-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')
-rw-r--r-- | delegate/classic/CMakeLists.txt | 2 | ||||
-rw-r--r-- | delegate/classic/src/armnn_delegate.cpp | 2 | ||||
-rw-r--r-- | delegate/classic/src/test/ArmnnClassicDelegateTest.cpp | 12 |
3 files changed, 13 insertions, 3 deletions
diff --git a/delegate/classic/CMakeLists.txt b/delegate/classic/CMakeLists.txt index dfd0cf985d..fbd19ede30 100644 --- a/delegate/classic/CMakeLists.txt +++ b/delegate/classic/CMakeLists.txt @@ -93,7 +93,7 @@ target_include_directories(flatbuffer_headers INTERFACE $<BUILD_INTERFACE:${Flatbuffers_INCLUDE_DIR}> $<INSTALL_INTERFACE:include/flatbuffer_headers>) -target_compile_options(flatbuffer_headers INTERFACE -Wno-sign-conversion) +target_compile_options(flatbuffer_headers INTERFACE -Wno-sign-conversion -Wno-sign-compare) target_link_libraries(armnnClassicDelegateObject PUBLIC flatbuffer_headers) 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 }; |