diff options
author | Colm Donelan <colm.donelan@arm.com> | 2023-11-28 15:46:09 +0000 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2023-12-18 10:27:21 +0000 |
commit | eff204aa3ae75277b0cf689eed0e2073ff644ef8 (patch) | |
tree | cc222af9c397947f240a1554414fd2ac4c5cf636 /delegate/test/ComparisonTestHelper.hpp | |
parent | 7790dc6531034778d92ba264fd61174bcff7051e (diff) | |
download | armnn-eff204aa3ae75277b0cf689eed0e2073ff644ef8.tar.gz |
IVGCVSW-7675 Rework DelegateUnitTests so backends are subcases.
The intent of this change is to remove the per backend test cases in
the delegate unit tests. They will be replaced by using DocTest
SUBCASES. The sub cases are paramaterized by the available backends.
The list of available backends are determined by the compilation flags.
Signed-off-by: Colm Donelan <colm.donelan@arm.com>
Change-Id: Ia377c7a7399d0e30dc287d7217b3e3b52e1ea074
Diffstat (limited to 'delegate/test/ComparisonTestHelper.hpp')
-rw-r--r-- | delegate/test/ComparisonTestHelper.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/delegate/test/ComparisonTestHelper.hpp b/delegate/test/ComparisonTestHelper.hpp index dc471d8f02..436790d6ff 100644 --- a/delegate/test/ComparisonTestHelper.hpp +++ b/delegate/test/ComparisonTestHelper.hpp @@ -148,7 +148,6 @@ std::vector<char> CreateComparisonTfLiteModel(tflite::BuiltinOperator comparison template <typename T> void ComparisonTest(tflite::BuiltinOperator comparisonOperatorCode, tflite::TensorType tensorType, - std::vector<armnn::BackendId>& backends, std::vector<int32_t>& input0Shape, std::vector<int32_t>& input1Shape, std::vector<int32_t>& outputShape, @@ -156,7 +155,8 @@ void ComparisonTest(tflite::BuiltinOperator comparisonOperatorCode, std::vector<T>& input1Values, std::vector<bool>& expectedOutputValues, float quantScale = 1.0f, - int quantOffset = 0) + int quantOffset = 0, + const std::vector<armnn::BackendId>& backends = {}) { using namespace delegateTestInterpreter; std::vector<char> modelBuffer = CreateComparisonTfLiteModel(comparisonOperatorCode, @@ -177,7 +177,7 @@ void ComparisonTest(tflite::BuiltinOperator comparisonOperatorCode, std::vector<int32_t> tfLiteOutputShape = tfLiteInterpreter.GetOutputShape(0); // Setup interpreter with Arm NN Delegate applied. - auto armnnInterpreter = DelegateTestInterpreter(modelBuffer, backends); + auto armnnInterpreter = DelegateTestInterpreter(modelBuffer, CaptureAvailableBackends(backends)); CHECK(armnnInterpreter.AllocateTensors() == kTfLiteOk); CHECK(armnnInterpreter.FillInputTensor<T>(input0Values, 0) == kTfLiteOk); CHECK(armnnInterpreter.FillInputTensor<T>(input1Values, 1) == kTfLiteOk); |