aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/test/ElementwiseUnaryTestHelper.hpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2020-10-29 16:14:54 +0000
committerJim Flynn <jim.flynn@arm.com>2020-10-29 19:34:21 +0000
commit67e95f2aebc827f2e3c571385b9e623f09a65141 (patch)
tree14fbd48cf78e3da8f03a5a72e0b6b98bedbb7a1d /delegate/src/test/ElementwiseUnaryTestHelper.hpp
parent3902f953201deef0d6807416d7324c87726883cb (diff)
downloadarmnn-67e95f2aebc827f2e3c571385b9e623f09a65141.tar.gz
IVGCVSW-5379 'TfLiteDelegate: Implement the ElementWiseBinary operators'
* Implemented ADD operator * Implemented FP32 unit tests for ADD operator Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Id7238749308855bd2b2118f4b6e60e765815c38f
Diffstat (limited to 'delegate/src/test/ElementwiseUnaryTestHelper.hpp')
-rw-r--r--delegate/src/test/ElementwiseUnaryTestHelper.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/delegate/src/test/ElementwiseUnaryTestHelper.hpp b/delegate/src/test/ElementwiseUnaryTestHelper.hpp
index 4d45f4e964..b4a55cbe99 100644
--- a/delegate/src/test/ElementwiseUnaryTestHelper.hpp
+++ b/delegate/src/test/ElementwiseUnaryTestHelper.hpp
@@ -97,12 +97,15 @@ void ElementwiseUnaryFP32Test(tflite::BuiltinOperator unaryOperatorCode,
(&tfLiteInterpreter) == kTfLiteOk);
CHECK(tfLiteInterpreter != nullptr);
CHECK(tfLiteInterpreter->AllocateTensors() == kTfLiteOk);
+
// Create the ArmNN Delegate
armnnDelegate::DelegateOptions delegateOptions(backends);
- auto armnnDelegate = TfLiteArmnnDelegateCreate(delegateOptions);
- CHECK(armnnDelegate != nullptr);
+ std::unique_ptr<TfLiteDelegate, decltype(&armnnDelegate::TfLiteArmnnDelegateDelete)>
+ theArmnnDelegate(armnnDelegate::TfLiteArmnnDelegateCreate(delegateOptions),
+ armnnDelegate::TfLiteArmnnDelegateDelete);
+ CHECK(theArmnnDelegate != nullptr);
// Modify armnnDelegateInterpreter to use armnnDelegate
- CHECK(armnnDelegateInterpreter->ModifyGraphWithDelegate(armnnDelegate) == kTfLiteOk);
+ CHECK(armnnDelegateInterpreter->ModifyGraphWithDelegate(theArmnnDelegate.get()) == kTfLiteOk);
// Set input data
auto tfLiteDelegateInputId = tfLiteInterpreter->inputs()[0];