diff options
Diffstat (limited to 'src/backends/reference/test')
-rw-r--r-- | src/backends/reference/test/RefEndToEndTests.cpp | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/src/backends/reference/test/RefEndToEndTests.cpp b/src/backends/reference/test/RefEndToEndTests.cpp index 8fcb3d19bc..6ff57716d0 100644 --- a/src/backends/reference/test/RefEndToEndTests.cpp +++ b/src/backends/reference/test/RefEndToEndTests.cpp @@ -43,46 +43,43 @@ TEST_SUITE("RefEndToEnd") { std::vector<armnn::BackendId> defaultBackends = {armnn::Compute::CpuRef}; +// ElementwiseUnary // Abs TEST_CASE("RefAbsEndToEndTestFloat32") { - std::vector<float> expectedOutput = - { - 1.f, 1.f, 1.f, 1.f, 5.f, 5.f, 5.f, 5.f, - 3.f, 3.f, 3.f, 3.f, 4.f, 4.f, 4.f, 4.f - }; - ElementwiseUnarySimpleEndToEnd<armnn::DataType::Float32>(defaultBackends, - UnaryOperation::Abs, - expectedOutput); + UnaryOperation::Abs); } TEST_CASE("RefAbsEndToEndTestUint8") { - // Note the expected output will be implicitly quantized by the below test function - std::vector<float> expectedOutput = - { - 1.f, 1.f, 1.f, 1.f, 5.f, 5.f, 5.f, 5.f, - 3.f, 3.f, 3.f, 3.f, 4.f, 4.f, 4.f, 4.f - }; - ElementwiseUnarySimpleEndToEnd<armnn::DataType::QAsymmU8>(defaultBackends, - UnaryOperation::Abs, - expectedOutput); + UnaryOperation::Abs); } TEST_CASE("RefAbsEndToEndTestInt16") { - // Note the expected output will be implicitly quantized by the below test function - std::vector<float> expectedOutput = - { - 1.f, 1.f, 1.f, 1.f, 5.f, 5.f, 5.f, 5.f, - 3.f, 3.f, 3.f, 3.f, 4.f, 4.f, 4.f, 4.f - }; + ElementwiseUnarySimpleEndToEnd<armnn::DataType::QSymmS16>(defaultBackends, + UnaryOperation::Abs); +} +// Rsqrt +TEST_CASE("RefRsqrtEndToEndTestFloat32") +{ + ElementwiseUnarySimpleEndToEnd<armnn::DataType::Float32>(defaultBackends, + UnaryOperation::Rsqrt); +} + +TEST_CASE("RefRsqrtEndToEndTestUint8") +{ + ElementwiseUnarySimpleEndToEnd<armnn::DataType::QAsymmU8>(defaultBackends, + UnaryOperation::Rsqrt); +} + +TEST_CASE("RefRsqrtEndToEndTestInt16") +{ ElementwiseUnarySimpleEndToEnd<armnn::DataType::QSymmS16>(defaultBackends, - UnaryOperation::Abs, - expectedOutput); + UnaryOperation::Rsqrt); } // Addition |