diff options
Diffstat (limited to 'delegate/test/GatherTest.cpp')
-rw-r--r-- | delegate/test/GatherTest.cpp | 64 |
1 files changed, 11 insertions, 53 deletions
diff --git a/delegate/test/GatherTest.cpp b/delegate/test/GatherTest.cpp index c49c10d054..be9123a5ff 100644 --- a/delegate/test/GatherTest.cpp +++ b/delegate/test/GatherTest.cpp @@ -1,21 +1,17 @@ // -// Copyright © 2020, 2023 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2020, 2023-2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #include "GatherTestHelper.hpp" -#include <armnn_delegate.hpp> - -#include <flatbuffers/flatbuffers.h> - #include <doctest/doctest.h> namespace armnnDelegate { -// GATHER Operator -void GatherUint8Test(std::vector<armnn::BackendId>& backends) +// Gather Operator +void GatherUint8Test() { std::vector<int32_t> paramsShape{8}; @@ -28,7 +24,6 @@ void GatherUint8Test(std::vector<armnn::BackendId>& backends) std::vector<uint8_t> expectedOutputValues{8, 7, 6}; GatherTest<uint8_t>(::tflite::TensorType_UINT8, - backends, paramsShape, indicesShape, expectedOutputShape, @@ -38,7 +33,7 @@ void GatherUint8Test(std::vector<armnn::BackendId>& backends) expectedOutputValues); } -void GatherFp32Test(std::vector<armnn::BackendId>& backends) +void GatherFp32Test() { std::vector<int32_t> paramsShape{8}; std::vector<int32_t> indicesShape{3}; @@ -50,7 +45,6 @@ void GatherFp32Test(std::vector<armnn::BackendId>& backends) std::vector<float> expectedOutputValues{8.8f, 7.7f, 6.6f}; GatherTest<float>(::tflite::TensorType_FLOAT32, - backends, paramsShape, indicesShape, expectedOutputShape, @@ -60,57 +54,21 @@ void GatherFp32Test(std::vector<armnn::BackendId>& backends) expectedOutputValues); } -// GATHER Test Suite -TEST_SUITE("GATHER_CpuRefTests") -{ - -TEST_CASE ("GATHER_Uint8_CpuRef_Test") -{ - std::vector<armnn::BackendId> backends = {armnn::Compute::CpuRef}; - GatherUint8Test(backends); -} - -TEST_CASE ("GATHER_Fp32_CpuRef_Test") -{ - std::vector<armnn::BackendId> backends = {armnn::Compute::CpuRef}; - GatherFp32Test(backends); -} - -} - -TEST_SUITE("GATHER_CpuAccTests") -{ - -TEST_CASE ("GATHER_Uint8_CpuAcc_Test") -{ - std::vector<armnn::BackendId> backends = {armnn::Compute::CpuAcc}; - GatherUint8Test(backends); -} - -TEST_CASE ("GATHER_Fp32_CpuAcc_Test") -{ - std::vector<armnn::BackendId> backends = {armnn::Compute::CpuAcc}; - GatherFp32Test(backends); -} - -} - -TEST_SUITE("GATHER_GpuAccTests") +// Gather Test Suite +TEST_SUITE("GatherTests") { -TEST_CASE ("GATHER_Uint8_GpuAcc_Test") +TEST_CASE ("Gather_Uint8_Test") { - std::vector<armnn::BackendId> backends = {armnn::Compute::GpuAcc}; - GatherUint8Test(backends); + GatherUint8Test(); } -TEST_CASE ("GATHER_Fp32_GpuAcc_Test") +TEST_CASE ("Gather_Fp32_Test") { - std::vector<armnn::BackendId> backends = {armnn::Compute::GpuAcc}; - GatherFp32Test(backends); + GatherFp32Test(); } } -// End of GATHER Test Suite +// End of Gather Test Suite } // namespace armnnDelegate
\ No newline at end of file |