Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 1 | // |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 2 | // Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved. |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 6 | #include <backendsCommon/test/EndToEndTestImpl.hpp> |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 7 | |
Jan Eilers | bca73e1 | 2020-03-11 12:52:46 +0000 | [diff] [blame] | 8 | #include <backendsCommon/test/ActivationEndToEndTestImpl.hpp> |
Ryan OShea | 3c2795a | 2022-11-03 17:51:52 +0000 | [diff] [blame] | 9 | #include <backendsCommon/test/AdditionEndToEndTestImpl.hpp> |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 10 | #include <backendsCommon/test/ArgMinMaxEndToEndTestImpl.hpp> |
Teresa Charlin | a38da59 | 2022-10-31 22:09:23 +0000 | [diff] [blame] | 11 | #include <backendsCommon/test/BatchMatMulEndToEndTestImpl.hpp> |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 12 | #include <backendsCommon/test/ComparisonEndToEndTestImpl.hpp> |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 13 | #include <backendsCommon/test/ConcatEndToEndTestImpl.hpp> |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 14 | #include <backendsCommon/test/DepthToSpaceEndToEndTestImpl.hpp> |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 15 | #include <backendsCommon/test/DequantizeEndToEndTestImpl.hpp> |
Derek Lamberti | 6a5e5e8 | 2019-12-05 14:41:20 +0000 | [diff] [blame] | 16 | #include <backendsCommon/test/DetectionPostProcessEndToEndTestImpl.hpp> |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 17 | #include <backendsCommon/test/ElementwiseUnaryEndToEndTestImpl.hpp> |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 18 | #include <backendsCommon/test/FillEndToEndTestImpl.hpp> |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 19 | #include <backendsCommon/test/InstanceNormalizationEndToEndTestImpl.hpp> |
Nikhil Raj | 1c8adac | 2019-07-22 11:27:29 +0100 | [diff] [blame] | 20 | #include <backendsCommon/test/PreluEndToEndTestImpl.hpp> |
James Conroy | 0800bf5 | 2020-05-14 12:46:44 +0100 | [diff] [blame] | 21 | #include <backendsCommon/test/QLstmEndToEndTestImpl.hpp> |
Francis Murtagh | b3fc252 | 2019-08-09 13:20:50 +0100 | [diff] [blame] | 22 | #include <backendsCommon/test/QuantizedLstmEndToEndTestImpl.hpp> |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 23 | #include <backendsCommon/test/ReduceEndToEndTestImpl.hpp> |
| 24 | #include <backendsCommon/test/ReshapeEndToEndTestImpl.hpp> |
Ellen Norris-Thompson | 2979457 | 2019-06-26 16:40:36 +0100 | [diff] [blame] | 25 | #include <backendsCommon/test/SpaceToDepthEndToEndTestImpl.hpp> |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 26 | #include <backendsCommon/test/SplitterEndToEndTestImpl.hpp> |
Sadik Armagan | 581742d | 2019-08-12 14:11:37 +0100 | [diff] [blame] | 27 | #include <backendsCommon/test/TransposeConvolution2dEndToEndTestImpl.hpp> |
Teresa Charlin | 6bc8525 | 2022-12-06 20:43:06 +0000 | [diff] [blame] | 28 | #include <backendsCommon/test/TransposeEndToEndTestImpl.hpp> |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 29 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 30 | #include <doctest/doctest.h> |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 31 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 32 | TEST_SUITE("NeonEndToEnd") |
| 33 | { |
| 34 | std::vector<armnn::BackendId> neonDefaultBackends = {armnn::Compute::CpuAcc}; |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 35 | |
David Monahan | d7fca09 | 2023-01-12 14:53:34 +0000 | [diff] [blame] | 36 | // ElementwiseUnary |
Aron Virginas-Tar | 914e4db | 2019-09-09 13:36:45 +0100 | [diff] [blame] | 37 | // Abs |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 38 | TEST_CASE("NeonAbsEndToEndTestFloat32") |
Aron Virginas-Tar | 914e4db | 2019-09-09 13:36:45 +0100 | [diff] [blame] | 39 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 40 | ElementwiseUnarySimpleEndToEnd<armnn::DataType::Float32>(neonDefaultBackends, |
David Monahan | d7fca09 | 2023-01-12 14:53:34 +0000 | [diff] [blame] | 41 | UnaryOperation::Abs); |
| 42 | } |
| 43 | // Rsqrt |
| 44 | TEST_CASE("NeonRsqrtEndToEndTestFloat32") |
| 45 | { |
| 46 | ElementwiseUnarySimpleEndToEnd<armnn::DataType::Float32>(neonDefaultBackends, |
| 47 | UnaryOperation::Rsqrt); |
Aron Virginas-Tar | 914e4db | 2019-09-09 13:36:45 +0100 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | // Constant |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 51 | TEST_CASE("ConstantUsage_Neon_Float32") |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 52 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 53 | CHECK(ConstantUsageFloat32Test(neonDefaultBackends)); |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 54 | } |
| 55 | |
Matteo Martincigh | db16dd3 | 2019-08-27 16:41:11 +0100 | [diff] [blame] | 56 | #if defined(ARMNNREF_ENABLED) |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 57 | |
| 58 | // This test unit needs the reference backend, it's not available if the reference backend is not built |
| 59 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 60 | TEST_CASE("FallbackToCpuRef") |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 61 | { |
| 62 | using namespace armnn; |
| 63 | |
| 64 | // Create runtime in which test will run and allow fallback to CpuRef. |
| 65 | IRuntime::CreationOptions options; |
| 66 | IRuntimePtr runtime(IRuntime::Create(options)); |
| 67 | |
| 68 | // Builds up the structure of the network. |
| 69 | INetworkPtr net(INetwork::Create()); |
| 70 | |
| 71 | IConnectableLayer* input = net->AddInputLayer(0); |
| 72 | |
| 73 | // This layer configuration isn't supported by CpuAcc but we allow fallback to CpuRef so it shoud pass. |
| 74 | NormalizationDescriptor descriptor; |
| 75 | IConnectableLayer* pooling = net->AddNormalizationLayer(descriptor); |
| 76 | |
| 77 | IConnectableLayer* output = net->AddOutputLayer(0); |
| 78 | |
| 79 | input->GetOutputSlot(0).Connect(pooling->GetInputSlot(0)); |
| 80 | pooling->GetOutputSlot(0).Connect(output->GetInputSlot(0)); |
| 81 | |
| 82 | input->GetOutputSlot(0).SetTensorInfo(TensorInfo({ 1, 1, 4, 4 }, DataType::Float32)); |
| 83 | pooling->GetOutputSlot(0).SetTensorInfo(TensorInfo({ 1, 1, 4, 4 }, DataType::Float32)); |
| 84 | |
| 85 | // optimize the network |
| 86 | std::vector<BackendId> backends = {Compute::CpuAcc, Compute::CpuRef}; |
| 87 | IOptimizedNetworkPtr optNet = Optimize(*net, backends, runtime->GetDeviceSpec()); |
| 88 | |
| 89 | // Load it into the runtime. It should pass. |
| 90 | NetworkId netId; |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 91 | CHECK(runtime->LoadNetwork(netId, std::move(optNet)) == Status::Success); |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 92 | } |
| 93 | |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 94 | #endif |
| 95 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 96 | TEST_CASE("NeonGreaterSimpleEndToEndTest") |
kevmay01 | eed8592 | 2019-01-28 08:37:25 +0000 | [diff] [blame] | 97 | { |
| 98 | const std::vector<uint8_t> expectedOutput({ 0, 0, 0, 0, 1, 1, 1, 1, |
| 99 | 0, 0, 0, 0, 0, 0, 0, 0 }); |
| 100 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 101 | ComparisonSimpleEndToEnd<armnn::DataType::Float32>(neonDefaultBackends, |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 102 | ComparisonOperation::Greater, |
| 103 | expectedOutput); |
kevmay01 | eed8592 | 2019-01-28 08:37:25 +0000 | [diff] [blame] | 104 | } |
| 105 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 106 | TEST_CASE("NeonGreaterSimpleEndToEndUint8Test") |
kevmay01 | eed8592 | 2019-01-28 08:37:25 +0000 | [diff] [blame] | 107 | { |
| 108 | const std::vector<uint8_t> expectedOutput({ 0, 0, 0, 0, 1, 1, 1, 1, |
| 109 | 0, 0, 0, 0, 0, 0, 0, 0 }); |
| 110 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 111 | ComparisonSimpleEndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends, |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 112 | ComparisonOperation::Greater, |
| 113 | expectedOutput); |
kevmay01 | eed8592 | 2019-01-28 08:37:25 +0000 | [diff] [blame] | 114 | } |
| 115 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 116 | TEST_CASE("NeonGreaterBroadcastEndToEndTest") |
kevmay01 | eed8592 | 2019-01-28 08:37:25 +0000 | [diff] [blame] | 117 | { |
| 118 | const std::vector<uint8_t> expectedOutput({ 0, 1, 0, 0, 0, 1, |
| 119 | 1, 1, 1, 1, 1, 1 }); |
| 120 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 121 | ComparisonBroadcastEndToEnd<armnn::DataType::Float32>(neonDefaultBackends, |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 122 | ComparisonOperation::Greater, |
| 123 | expectedOutput); |
kevmay01 | eed8592 | 2019-01-28 08:37:25 +0000 | [diff] [blame] | 124 | } |
| 125 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 126 | TEST_CASE("NeonGreaterBroadcastEndToEndUint8Test") |
kevmay01 | eed8592 | 2019-01-28 08:37:25 +0000 | [diff] [blame] | 127 | { |
| 128 | const std::vector<uint8_t> expectedOutput({ 0, 1, 0, 0, 0, 1, |
| 129 | 1, 1, 1, 1, 1, 1 }); |
| 130 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 131 | ComparisonBroadcastEndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends, |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 132 | ComparisonOperation::Greater, |
| 133 | expectedOutput); |
kevmay01 | eed8592 | 2019-01-28 08:37:25 +0000 | [diff] [blame] | 134 | } |
| 135 | |
Ryan OShea | 3c2795a | 2022-11-03 17:51:52 +0000 | [diff] [blame] | 136 | TEST_CASE("NeonAdditionEndToEndFloat32Test") |
| 137 | { |
| 138 | AdditionEndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
| 139 | } |
| 140 | |
| 141 | TEST_CASE("NeonAdditionEndToEndUint8Test") |
| 142 | { |
| 143 | AdditionEndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
| 144 | } |
| 145 | |
Teresa Charlin | a38da59 | 2022-10-31 22:09:23 +0000 | [diff] [blame] | 146 | TEST_CASE("NeonBatchMatMulEndToEndFloat32Test") |
| 147 | { |
| 148 | BatchMatMulEndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
| 149 | } |
| 150 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 151 | TEST_CASE("NeonConcatEndToEndDim0Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 152 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 153 | ConcatDim0EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 154 | } |
| 155 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 156 | TEST_CASE("NeonConcatEndToEndDim0Uint8Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 157 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 158 | ConcatDim0EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 159 | } |
| 160 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 161 | TEST_CASE("NeonConcatEndToEndDim1Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 162 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 163 | ConcatDim1EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 164 | } |
| 165 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 166 | TEST_CASE("NeonConcatEndToEndDim1Uint8Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 167 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 168 | ConcatDim1EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 169 | } |
| 170 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 171 | TEST_CASE("NeonConcatEndToEndDim3Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 172 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 173 | ConcatDim3EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 174 | } |
| 175 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 176 | TEST_CASE("NeonConcatEndToEndDim3Uint8Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 177 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 178 | ConcatDim3EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 179 | } |
| 180 | |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 181 | // DepthToSpace |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 182 | TEST_CASE("NeonDephtToSpaceEndToEndNchwFloat32") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 183 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 184 | DepthToSpaceEndToEnd<armnn::DataType::Float32>(neonDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 185 | } |
| 186 | |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 187 | TEST_CASE("NeonDephtToSpaceEndToEndNchwFloat16") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 188 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 189 | DepthToSpaceEndToEnd<armnn::DataType::Float16>(neonDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 190 | } |
| 191 | |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 192 | TEST_CASE("NeonDephtToSpaceEndToEndNchwUint8") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 193 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 194 | DepthToSpaceEndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 195 | } |
| 196 | |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 197 | TEST_CASE("NeonDephtToSpaceEndToEndNchwInt16") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 198 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 199 | DepthToSpaceEndToEnd<armnn::DataType::QSymmS16>(neonDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 200 | } |
| 201 | |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 202 | TEST_CASE("NeonDephtToSpaceEndToEndNhwcFloat32") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 203 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 204 | DepthToSpaceEndToEnd<armnn::DataType::Float32>(neonDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 205 | } |
| 206 | |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 207 | TEST_CASE("NeonDephtToSpaceEndToEndNhwcFloat16") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 208 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 209 | DepthToSpaceEndToEnd<armnn::DataType::Float16>(neonDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 210 | } |
| 211 | |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 212 | TEST_CASE("NeonDephtToSpaceEndToEndNhwcUint8") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 213 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 214 | DepthToSpaceEndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 215 | } |
| 216 | |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 217 | TEST_CASE("NeonDephtToSpaceEndToEndNhwcInt16") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 218 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 219 | DepthToSpaceEndToEnd<armnn::DataType::QSymmS16>(neonDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | // Dequantize |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 223 | TEST_CASE("DequantizeEndToEndSimpleTest") |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 224 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 225 | DequantizeEndToEndSimple<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 226 | } |
| 227 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 228 | TEST_CASE("DequantizeEndToEndOffsetTest") |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 229 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 230 | DequantizeEndToEndOffset<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 231 | } |
| 232 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 233 | TEST_CASE("NeonEluEndToEndTestFloat32") |
Jan Eilers | bca73e1 | 2020-03-11 12:52:46 +0000 | [diff] [blame] | 234 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 235 | EluEndToEndTest<armnn::DataType::Float32>(neonDefaultBackends); |
Jan Eilers | bca73e1 | 2020-03-11 12:52:46 +0000 | [diff] [blame] | 236 | } |
| 237 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 238 | TEST_CASE("NeonEluEndToEndTestFloat16") |
Jan Eilers | bca73e1 | 2020-03-11 12:52:46 +0000 | [diff] [blame] | 239 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 240 | EluEndToEndTest<armnn::DataType::Float16>(neonDefaultBackends); |
Jan Eilers | bca73e1 | 2020-03-11 12:52:46 +0000 | [diff] [blame] | 241 | } |
| 242 | |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 243 | // HardSwish |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 244 | TEST_CASE("NeonHardSwishEndToEndTestFloat32") |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 245 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 246 | HardSwishEndToEndTest<armnn::DataType::Float32>(neonDefaultBackends); |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 247 | } |
| 248 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 249 | TEST_CASE("NeonHardSwishEndToEndTestFloat16") |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 250 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 251 | HardSwishEndToEndTest<armnn::DataType::Float16>(neonDefaultBackends); |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 252 | } |
| 253 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 254 | TEST_CASE("NeonHardSwishEndToEndTestQAsymmS8") |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 255 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 256 | HardSwishEndToEndTest<armnn::DataType::QAsymmS8>(neonDefaultBackends); |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 257 | } |
| 258 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 259 | TEST_CASE("NeonHardSwishEndToEndTestQAsymmU8") |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 260 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 261 | HardSwishEndToEndTest<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 262 | } |
| 263 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 264 | TEST_CASE("NeonPreluEndToEndFloat32Test") |
Nikhil Raj | 1c8adac | 2019-07-22 11:27:29 +0100 | [diff] [blame] | 265 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 266 | PreluEndToEndNegativeTest<armnn::DataType::Float32>(neonDefaultBackends); |
Nikhil Raj | 1c8adac | 2019-07-22 11:27:29 +0100 | [diff] [blame] | 267 | } |
| 268 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 269 | TEST_CASE("NeonPreluEndToEndTestUint8Test") |
Nikhil Raj | 1c8adac | 2019-07-22 11:27:29 +0100 | [diff] [blame] | 270 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 271 | PreluEndToEndPositiveTest<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Nikhil Raj | 1c8adac | 2019-07-22 11:27:29 +0100 | [diff] [blame] | 272 | } |
| 273 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 274 | TEST_CASE("NeonSpaceToDepthNhwcEndToEndTest1") |
Ellen Norris-Thompson | 2979457 | 2019-06-26 16:40:36 +0100 | [diff] [blame] | 275 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 276 | SpaceToDepthNhwcEndToEndTest1(neonDefaultBackends); |
Ellen Norris-Thompson | 2979457 | 2019-06-26 16:40:36 +0100 | [diff] [blame] | 277 | } |
| 278 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 279 | TEST_CASE("NeonSpaceToDepthNchwEndToEndTest1") |
Ellen Norris-Thompson | 2979457 | 2019-06-26 16:40:36 +0100 | [diff] [blame] | 280 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 281 | SpaceToDepthNchwEndToEndTest1(neonDefaultBackends); |
Ellen Norris-Thompson | 2979457 | 2019-06-26 16:40:36 +0100 | [diff] [blame] | 282 | } |
| 283 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 284 | TEST_CASE("NeonSpaceToDepthNhwcEndToEndTest2") |
Ellen Norris-Thompson | 2979457 | 2019-06-26 16:40:36 +0100 | [diff] [blame] | 285 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 286 | SpaceToDepthNhwcEndToEndTest2(neonDefaultBackends); |
Ellen Norris-Thompson | 2979457 | 2019-06-26 16:40:36 +0100 | [diff] [blame] | 287 | } |
| 288 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 289 | TEST_CASE("NeonSpaceToDepthNchwEndToEndTest2") |
Ellen Norris-Thompson | 2979457 | 2019-06-26 16:40:36 +0100 | [diff] [blame] | 290 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 291 | SpaceToDepthNchwEndToEndTest2(neonDefaultBackends); |
Ellen Norris-Thompson | 2979457 | 2019-06-26 16:40:36 +0100 | [diff] [blame] | 292 | } |
| 293 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 294 | TEST_CASE("NeonSplitter1dEndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 295 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 296 | Splitter1dEndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 297 | } |
| 298 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 299 | TEST_CASE("NeonSplitter1dEndToEndUint8Test") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 300 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 301 | Splitter1dEndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 302 | } |
| 303 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 304 | TEST_CASE("NeonSplitter2dDim0EndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 305 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 306 | Splitter2dDim0EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 307 | } |
| 308 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 309 | TEST_CASE("NeonSplitter2dDim1EndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 310 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 311 | Splitter2dDim1EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 312 | } |
| 313 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 314 | TEST_CASE("NeonSplitter2dDim0EndToEndUint8Test") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 315 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 316 | Splitter2dDim0EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 317 | } |
| 318 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 319 | TEST_CASE("NeonSplitter2dDim1EndToEndUint8Test") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 320 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 321 | Splitter2dDim1EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 322 | } |
| 323 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 324 | TEST_CASE("NeonSplitter3dDim0EndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 325 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 326 | Splitter3dDim0EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 327 | } |
| 328 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 329 | TEST_CASE("NeonSplitter3dDim1EndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 330 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 331 | Splitter3dDim1EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 332 | } |
| 333 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 334 | TEST_CASE("NeonSplitter3dDim2EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 335 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 336 | Splitter3dDim2EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 337 | } |
| 338 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 339 | TEST_CASE("NeonSplitter3dDim0EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 340 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 341 | Splitter3dDim0EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 342 | } |
| 343 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 344 | TEST_CASE("NeonSplitter3dDim1EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 345 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 346 | Splitter3dDim1EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 347 | } |
| 348 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 349 | TEST_CASE("NeonSplitter3dDim2EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 350 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 351 | Splitter3dDim2EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 352 | } |
| 353 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 354 | TEST_CASE("NeonSplitter4dDim0EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 355 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 356 | Splitter4dDim0EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 357 | } |
| 358 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 359 | TEST_CASE("NeonSplitter4dDim1EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 360 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 361 | Splitter4dDim1EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 362 | } |
| 363 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 364 | TEST_CASE("NeonSplitter4dDim2EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 365 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 366 | Splitter4dDim2EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 367 | } |
| 368 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 369 | TEST_CASE("NeonSplitter4dDim3EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 370 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 371 | Splitter4dDim3EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 372 | } |
| 373 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 374 | TEST_CASE("NeonSplitter4dDim0EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 375 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 376 | Splitter4dDim0EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 377 | } |
| 378 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 379 | TEST_CASE("NeonSplitter4dDim1EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 380 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 381 | Splitter4dDim1EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 382 | } |
| 383 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 384 | TEST_CASE("NeonSplitter4dDim2EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 385 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 386 | Splitter4dDim2EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 387 | } |
| 388 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 389 | TEST_CASE("NeonSplitter4dDim3EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 390 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 391 | Splitter4dDim3EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 392 | } |
| 393 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 394 | TEST_CASE("NeonQuantizedLstmEndToEndTest") |
Francis Murtagh | b3fc252 | 2019-08-09 13:20:50 +0100 | [diff] [blame] | 395 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 396 | QuantizedLstmEndToEnd(neonDefaultBackends); |
Francis Murtagh | b3fc252 | 2019-08-09 13:20:50 +0100 | [diff] [blame] | 397 | } |
| 398 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 399 | TEST_CASE("NeonTransposeConvolution2dEndToEndFloatNchwTest") |
Sadik Armagan | 581742d | 2019-08-12 14:11:37 +0100 | [diff] [blame] | 400 | { |
| 401 | TransposeConvolution2dEndToEnd<armnn::DataType::Float32, armnn::DataType::Float32>( |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 402 | neonDefaultBackends, armnn::DataLayout::NCHW); |
Sadik Armagan | 581742d | 2019-08-12 14:11:37 +0100 | [diff] [blame] | 403 | } |
| 404 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 405 | TEST_CASE("NeonTransposeConvolution2dEndToEndUint8NchwTest") |
Sadik Armagan | 581742d | 2019-08-12 14:11:37 +0100 | [diff] [blame] | 406 | { |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 407 | TransposeConvolution2dEndToEnd<armnn::DataType::QAsymmU8, armnn::DataType::Signed32>( |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 408 | neonDefaultBackends, armnn::DataLayout::NCHW); |
Sadik Armagan | 581742d | 2019-08-12 14:11:37 +0100 | [diff] [blame] | 409 | } |
| 410 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 411 | TEST_CASE("NeonTransposeConvolution2dEndToEndFloatNhwcTest") |
Sadik Armagan | 581742d | 2019-08-12 14:11:37 +0100 | [diff] [blame] | 412 | { |
| 413 | TransposeConvolution2dEndToEnd<armnn::DataType::Float32, armnn::DataType::Float32>( |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 414 | neonDefaultBackends, armnn::DataLayout::NHWC); |
Sadik Armagan | 581742d | 2019-08-12 14:11:37 +0100 | [diff] [blame] | 415 | } |
| 416 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 417 | TEST_CASE("NeonTransposeConvolution2dEndToEndUint8NhwcTest") |
Sadik Armagan | 581742d | 2019-08-12 14:11:37 +0100 | [diff] [blame] | 418 | { |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 419 | TransposeConvolution2dEndToEnd<armnn::DataType::QAsymmU8, armnn::DataType::Signed32>( |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 420 | neonDefaultBackends, armnn::DataLayout::NHWC); |
Sadik Armagan | 581742d | 2019-08-12 14:11:37 +0100 | [diff] [blame] | 421 | } |
| 422 | |
Teresa Charlin | 6bc8525 | 2022-12-06 20:43:06 +0000 | [diff] [blame] | 423 | // Transpose |
| 424 | TEST_CASE("NeonTransposeEndToEndTest") |
| 425 | { |
| 426 | TransposeEndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
| 427 | } |
| 428 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 429 | TEST_CASE("NeonImportNonAlignedInputPointerTest") |
David Monahan | 3fb7e10 | 2019-08-20 11:25:29 +0100 | [diff] [blame] | 430 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 431 | ImportNonAlignedInputPointerTest(neonDefaultBackends); |
David Monahan | 3fb7e10 | 2019-08-20 11:25:29 +0100 | [diff] [blame] | 432 | } |
| 433 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 434 | TEST_CASE("NeonExportNonAlignedOutputPointerTest") |
David Monahan | 3fb7e10 | 2019-08-20 11:25:29 +0100 | [diff] [blame] | 435 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 436 | ExportNonAlignedOutputPointerTest(neonDefaultBackends); |
Ferran Balaguer | 83239f9 | 2019-09-19 11:49:25 +0100 | [diff] [blame] | 437 | } |
| 438 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 439 | TEST_CASE("NeonImportAlignedPointerTest") |
Ferran Balaguer | 83239f9 | 2019-09-19 11:49:25 +0100 | [diff] [blame] | 440 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 441 | ImportAlignedPointerTest(neonDefaultBackends); |
David Monahan | 3fb7e10 | 2019-08-20 11:25:29 +0100 | [diff] [blame] | 442 | } |
| 443 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 444 | TEST_CASE("NeonImportOnlyWorkload") |
David Monahan | 3fb7e10 | 2019-08-20 11:25:29 +0100 | [diff] [blame] | 445 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 446 | ImportOnlyWorkload(neonDefaultBackends); |
Ferran Balaguer | 83239f9 | 2019-09-19 11:49:25 +0100 | [diff] [blame] | 447 | } |
David Monahan | 3fb7e10 | 2019-08-20 11:25:29 +0100 | [diff] [blame] | 448 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 449 | TEST_CASE("NeonExportOnlyWorkload") |
Ferran Balaguer | 83239f9 | 2019-09-19 11:49:25 +0100 | [diff] [blame] | 450 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 451 | ExportOnlyWorkload(neonDefaultBackends); |
Ferran Balaguer | 83239f9 | 2019-09-19 11:49:25 +0100 | [diff] [blame] | 452 | } |
David Monahan | 3fb7e10 | 2019-08-20 11:25:29 +0100 | [diff] [blame] | 453 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 454 | TEST_CASE("NeonImportAndExportWorkload") |
Ferran Balaguer | 83239f9 | 2019-09-19 11:49:25 +0100 | [diff] [blame] | 455 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 456 | ImportAndExportWorkload(neonDefaultBackends); |
Ferran Balaguer | 83239f9 | 2019-09-19 11:49:25 +0100 | [diff] [blame] | 457 | } |
David Monahan | 3fb7e10 | 2019-08-20 11:25:29 +0100 | [diff] [blame] | 458 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 459 | TEST_CASE("NeonExportOutputWithSeveralOutputSlotConnectionsTest") |
Ferran Balaguer | 83239f9 | 2019-09-19 11:49:25 +0100 | [diff] [blame] | 460 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 461 | ExportOutputWithSeveralOutputSlotConnectionsTest(neonDefaultBackends); |
David Monahan | 3fb7e10 | 2019-08-20 11:25:29 +0100 | [diff] [blame] | 462 | } |
| 463 | |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 464 | // InstanceNormalization |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 465 | TEST_CASE("NeonInstanceNormalizationNchwEndToEndTest1") |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 466 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 467 | InstanceNormalizationNchwEndToEndTest1(neonDefaultBackends); |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 468 | } |
| 469 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 470 | TEST_CASE("NeonInstanceNormalizationNchwEndToEndTest2") |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 471 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 472 | InstanceNormalizationNchwEndToEndTest2(neonDefaultBackends); |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 473 | } |
| 474 | |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 475 | // Fill |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 476 | TEST_CASE("NeonFillEndToEndTest") |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 477 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 478 | FillEndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 479 | } |
| 480 | |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 481 | TEST_CASE("NeonFillEndToEndTestFloat16") |
Teresa Charlin | 4b10fef | 2020-07-29 09:36:41 +0100 | [diff] [blame] | 482 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 483 | FillEndToEnd<armnn::DataType::Float16>(neonDefaultBackends); |
Teresa Charlin | 4b10fef | 2020-07-29 09:36:41 +0100 | [diff] [blame] | 484 | } |
| 485 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 486 | TEST_CASE("NeonFillEndToEndTestInt32") |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 487 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 488 | FillEndToEnd<armnn::DataType::Signed32>(neonDefaultBackends); |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 489 | } |
| 490 | |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 491 | // ArgMinMax |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 492 | TEST_CASE("NeonArgMaxSimpleTest") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 493 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 494 | ArgMaxEndToEndSimple<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 495 | } |
| 496 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 497 | TEST_CASE("NeonArgMinSimpleTest") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 498 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 499 | ArgMinEndToEndSimple<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 500 | } |
| 501 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 502 | TEST_CASE("NeonArgMaxAxis0Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 503 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 504 | ArgMaxAxis0EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 505 | } |
| 506 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 507 | TEST_CASE("NeonArgMinAxis0Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 508 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 509 | ArgMinAxis0EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 510 | } |
| 511 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 512 | TEST_CASE("NeonArgMaxAxis1Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 513 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 514 | ArgMaxAxis1EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 515 | } |
| 516 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 517 | TEST_CASE("NeonArgMinAxis1Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 518 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 519 | ArgMinAxis1EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 520 | } |
| 521 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 522 | TEST_CASE("NeonArgMaxAxis2Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 523 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 524 | ArgMaxAxis2EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 525 | } |
| 526 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 527 | TEST_CASE("NeonArgMinAxis2Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 528 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 529 | ArgMinAxis2EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 530 | } |
| 531 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 532 | TEST_CASE("NeonArgMaxAxis3Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 533 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 534 | ArgMaxAxis3EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 535 | } |
| 536 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 537 | TEST_CASE("NeonArgMinAxis3Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 538 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 539 | ArgMinAxis3EndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 540 | } |
| 541 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 542 | TEST_CASE("NeonArgMaxSimpleTestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 543 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 544 | ArgMaxEndToEndSimple<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 545 | } |
| 546 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 547 | TEST_CASE("NeonArgMinSimpleTestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 548 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 549 | ArgMinEndToEndSimple<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 550 | } |
| 551 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 552 | TEST_CASE("NeonArgMaxAxis0TestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 553 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 554 | ArgMaxAxis0EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 555 | } |
| 556 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 557 | TEST_CASE("NeonArgMinAxis0TestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 558 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 559 | ArgMinAxis0EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 560 | } |
| 561 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 562 | TEST_CASE("NeonArgMaxAxis1TestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 563 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 564 | ArgMaxAxis1EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 565 | } |
| 566 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 567 | TEST_CASE("NeonArgMinAxis1TestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 568 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 569 | ArgMinAxis1EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 570 | } |
| 571 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 572 | TEST_CASE("NeonArgMaxAxis2TestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 573 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 574 | ArgMaxAxis2EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 575 | } |
| 576 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 577 | TEST_CASE("NeonArgMinAxis2TestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 578 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 579 | ArgMinAxis2EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 580 | } |
| 581 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 582 | TEST_CASE("NeonArgMaxAxis3TestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 583 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 584 | ArgMaxAxis3EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 585 | } |
| 586 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 587 | TEST_CASE("NeonArgMinAxis3TestQuantisedAsymm8") |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 588 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 589 | ArgMinAxis3EndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 590 | } |
| 591 | |
Teresa Charlin | c17a35f | 2023-01-12 14:13:09 +0000 | [diff] [blame] | 592 | // Reduce |
| 593 | TEST_CASE("NeonReduceEndToEndTest") |
| 594 | { |
| 595 | ReduceEndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
| 596 | } |
| 597 | |
| 598 | TEST_CASE("NeonReduceEndToEndTestFloat16") |
| 599 | { |
| 600 | ReduceEndToEnd<armnn::DataType::Float16>(neonDefaultBackends); |
| 601 | } |
| 602 | |
| 603 | // Reshape |
| 604 | TEST_CASE("NeonReshapeEndToEndTest") |
| 605 | { |
| 606 | ReshapeEndToEnd<armnn::DataType::Float32>(neonDefaultBackends); |
| 607 | } |
| 608 | |
| 609 | TEST_CASE("NeonReshapeEndToEndTestFloat16") |
| 610 | { |
| 611 | ReshapeEndToEndFloat16<armnn::DataType::Float16>(neonDefaultBackends); |
| 612 | } |
| 613 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 614 | TEST_CASE("NeonStridedSliceInvalidSliceEndToEndTest") |
David Monahan | 0a99a14 | 2020-03-13 07:52:54 +0000 | [diff] [blame] | 615 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 616 | StridedSliceInvalidSliceEndToEndTest(neonDefaultBackends); |
David Monahan | 0a99a14 | 2020-03-13 07:52:54 +0000 | [diff] [blame] | 617 | } |
| 618 | |
Colm Donelan | d7ceec5 | 2022-07-06 12:09:05 +0100 | [diff] [blame] | 619 | TEST_CASE("NeonForceImportWithAlignedBuffersEndToEndTest" |
| 620 | // Currently, the Neon workload for activation does not support tensor handle replacement so this test case |
| 621 | // will always fail. |
| 622 | * doctest::skip(true)) |
David Monahan | 646bc8a | 2022-01-31 14:29:14 +0000 | [diff] [blame] | 623 | { |
| 624 | ForceImportWithAlignedBuffersEndToEndTest(neonDefaultBackends); |
| 625 | } |
| 626 | |
Colm Donelan | d7ceec5 | 2022-07-06 12:09:05 +0100 | [diff] [blame] | 627 | TEST_CASE("NeonForceImportWithMisalignedInputBuffersEndToEndTest" |
| 628 | // Currently, the Neon workload for activation does not support tensor handle replacement so this test case |
| 629 | // will always fail. |
| 630 | * doctest::skip(true)) |
David Monahan | 646bc8a | 2022-01-31 14:29:14 +0000 | [diff] [blame] | 631 | { |
| 632 | ForceImportWithMisalignedInputBuffersEndToEndTest(neonDefaultBackends); |
| 633 | } |
| 634 | |
Colm Donelan | d7ceec5 | 2022-07-06 12:09:05 +0100 | [diff] [blame] | 635 | TEST_CASE("NeonForceImportWithMisalignedOutputBuffersEndToEndTest" |
| 636 | // Currently, the Neon workload for activation does not support tensor handle replacement so this test case |
| 637 | // will always fail. |
| 638 | * doctest::skip(true)) |
David Monahan | 646bc8a | 2022-01-31 14:29:14 +0000 | [diff] [blame] | 639 | { |
| 640 | ForceImportWithMisalignedOutputBuffersEndToEndTest(neonDefaultBackends); |
| 641 | } |
| 642 | |
| 643 | TEST_CASE("NeonForceImportWithMisalignedInputAndOutputBuffersEndToEndTest") |
| 644 | { |
| 645 | ForceImportWithMisalignedInputAndOutputBuffersEndToEndTest(neonDefaultBackends); |
| 646 | } |
| 647 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 648 | // DISABLED |
| 649 | //TEST_CASE("NeonDetectionPostProcessRegularNmsTest") |
| 650 | //{ |
| 651 | // std::vector<float> boxEncodings({ |
| 652 | // 0.0f, 0.0f, 0.0f, 0.0f, |
| 653 | // 0.0f, 1.0f, 0.0f, 0.0f, |
| 654 | // 0.0f, -1.0f, 0.0f, 0.0f, |
| 655 | // 0.0f, 0.0f, 0.0f, 0.0f, |
| 656 | // 0.0f, 1.0f, 0.0f, 0.0f, |
| 657 | // 0.0f, 0.0f, 0.0f, 0.0f |
| 658 | // }); |
| 659 | // std::vector<float> scores({ |
| 660 | // 0.0f, 0.9f, 0.8f, |
| 661 | // 0.0f, 0.75f, 0.72f, |
| 662 | // 0.0f, 0.6f, 0.5f, |
| 663 | // 0.0f, 0.93f, 0.95f, |
| 664 | // 0.0f, 0.5f, 0.4f, |
| 665 | // 0.0f, 0.3f, 0.2f |
| 666 | // }); |
| 667 | // std::vector<float> anchors({ |
| 668 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 669 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 670 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 671 | // 0.5f, 10.5f, 1.0f, 1.0f, |
| 672 | // 0.5f, 10.5f, 1.0f, 1.0f, |
| 673 | // 0.5f, 100.5f, 1.0f, 1.0f |
| 674 | // }); |
| 675 | // DetectionPostProcessRegularNmsEndToEnd<armnn::DataType::Float32>(neonDefaultBackends, |
| 676 | // boxEncodings, |
| 677 | // scores, |
| 678 | // anchors); |
| 679 | //} |
Derek Lamberti | 6a5e5e8 | 2019-12-05 14:41:20 +0000 | [diff] [blame] | 680 | |
| 681 | inline void QuantizeData(uint8_t* quant, const float* dequant, const TensorInfo& info) |
| 682 | { |
| 683 | for (size_t i = 0; i < info.GetNumElements(); i++) |
| 684 | { |
| 685 | quant[i] = armnn::Quantize<uint8_t>(dequant[i], info.GetQuantizationScale(), info.GetQuantizationOffset()); |
| 686 | } |
| 687 | } |
| 688 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 689 | // DISABLED |
| 690 | //TEST_CASE("NeonDetectionPostProcessRegularNmsUint8Test") |
| 691 | //{ |
| 692 | // armnn::TensorInfo boxEncodingsInfo({ 1, 6, 4 }, armnn::DataType::Float32); |
| 693 | // armnn::TensorInfo scoresInfo({ 1, 6, 3 }, armnn::DataType::Float32); |
| 694 | // armnn::TensorInfo anchorsInfo({ 6, 4 }, armnn::DataType::Float32); |
| 695 | // |
| 696 | // boxEncodingsInfo.SetQuantizationScale(1.0f); |
| 697 | // boxEncodingsInfo.SetQuantizationOffset(1); |
| 698 | // scoresInfo.SetQuantizationScale(0.01f); |
| 699 | // scoresInfo.SetQuantizationOffset(0); |
| 700 | // anchorsInfo.SetQuantizationScale(0.5f); |
| 701 | // anchorsInfo.SetQuantizationOffset(0); |
| 702 | // |
| 703 | // std::vector<float> boxEncodings({ |
| 704 | // 0.0f, 0.0f, 0.0f, 0.0f, |
| 705 | // 0.0f, 1.0f, 0.0f, 0.0f, |
| 706 | // 0.0f, -1.0f, 0.0f, 0.0f, |
| 707 | // 0.0f, 0.0f, 0.0f, 0.0f, |
| 708 | // 0.0f, 1.0f, 0.0f, 0.0f, |
| 709 | // 0.0f, 0.0f, 0.0f, 0.0f |
| 710 | // }); |
| 711 | // std::vector<float> scores({ |
| 712 | // 0.0f, 0.9f, 0.8f, |
| 713 | // 0.0f, 0.75f, 0.72f, |
| 714 | // 0.0f, 0.6f, 0.5f, |
| 715 | // 0.0f, 0.93f, 0.95f, |
| 716 | // 0.0f, 0.5f, 0.4f, |
| 717 | // 0.0f, 0.3f, 0.2f |
| 718 | // }); |
| 719 | // std::vector<float> anchors({ |
| 720 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 721 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 722 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 723 | // 0.5f, 10.5f, 1.0f, 1.0f, |
| 724 | // 0.5f, 10.5f, 1.0f, 1.0f, |
| 725 | // 0.5f, 100.5f, 1.0f, 1.0f |
| 726 | // }); |
| 727 | // |
| 728 | // std::vector<uint8_t> qBoxEncodings(boxEncodings.size(), 0); |
| 729 | // std::vector<uint8_t> qScores(scores.size(), 0); |
| 730 | // std::vector<uint8_t> qAnchors(anchors.size(), 0); |
| 731 | // QuantizeData(qBoxEncodings.data(), boxEncodings.data(), boxEncodingsInfo); |
| 732 | // QuantizeData(qScores.data(), scores.data(), scoresInfo); |
| 733 | // QuantizeData(qAnchors.data(), anchors.data(), anchorsInfo); |
| 734 | // DetectionPostProcessRegularNmsEndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends, qBoxEncodings, |
| 735 | // qScores, qAnchors, |
| 736 | // 1.0f, 1, 0.01f, 0, 0.5f, 0); |
| 737 | //} |
| 738 | // |
| 739 | //TEST_CASE("NeonDetectionPostProcessFastNmsTest") |
| 740 | //{ |
| 741 | // std::vector<float> boxEncodings({ |
| 742 | // 0.0f, 0.0f, 0.0f, 0.0f, |
| 743 | // 0.0f, 1.0f, 0.0f, 0.0f, |
| 744 | // 0.0f, -1.0f, 0.0f, 0.0f, |
| 745 | // 0.0f, 0.0f, 0.0f, 0.0f, |
| 746 | // 0.0f, 1.0f, 0.0f, 0.0f, |
| 747 | // 0.0f, 0.0f, 0.0f, 0.0f |
| 748 | // }); |
| 749 | // std::vector<float> scores({ |
| 750 | // 0.0f, 0.9f, 0.8f, |
| 751 | // 0.0f, 0.75f, 0.72f, |
| 752 | // 0.0f, 0.6f, 0.5f, |
| 753 | // 0.0f, 0.93f, 0.95f, |
| 754 | // 0.0f, 0.5f, 0.4f, |
| 755 | // 0.0f, 0.3f, 0.2f |
| 756 | // }); |
| 757 | // std::vector<float> anchors({ |
| 758 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 759 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 760 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 761 | // 0.5f, 10.5f, 1.0f, 1.0f, |
| 762 | // 0.5f, 10.5f, 1.0f, 1.0f, |
| 763 | // 0.5f, 100.5f, 1.0f, 1.0f |
| 764 | // }); |
| 765 | // DetectionPostProcessFastNmsEndToEnd<armnn::DataType::Float32>(neonDefaultBackends, |
| 766 | // boxEncodings, |
| 767 | // scores, |
| 768 | // anchors); |
| 769 | //} |
| 770 | // |
| 771 | // DISABLED |
| 772 | //TEST_CASE("NeonDetectionPostProcessFastNmsUint8Test") |
| 773 | //{ |
| 774 | // armnn::TensorInfo boxEncodingsInfo({ 1, 6, 4 }, armnn::DataType::Float32); |
| 775 | // armnn::TensorInfo scoresInfo({ 1, 6, 3 }, armnn::DataType::Float32); |
| 776 | // armnn::TensorInfo anchorsInfo({ 6, 4 }, armnn::DataType::Float32); |
| 777 | // |
| 778 | // boxEncodingsInfo.SetQuantizationScale(1.0f); |
| 779 | // boxEncodingsInfo.SetQuantizationOffset(1); |
| 780 | // scoresInfo.SetQuantizationScale(0.01f); |
| 781 | // scoresInfo.SetQuantizationOffset(0); |
| 782 | // anchorsInfo.SetQuantizationScale(0.5f); |
| 783 | // anchorsInfo.SetQuantizationOffset(0); |
| 784 | // |
| 785 | // std::vector<float> boxEncodings({ |
| 786 | // 0.0f, 0.0f, 0.0f, 0.0f, |
| 787 | // 0.0f, 1.0f, 0.0f, 0.0f, |
| 788 | // 0.0f, -1.0f, 0.0f, 0.0f, |
| 789 | // 0.0f, 0.0f, 0.0f, 0.0f, |
| 790 | // 0.0f, 1.0f, 0.0f, 0.0f, |
| 791 | // 0.0f, 0.0f, 0.0f, 0.0f |
| 792 | // }); |
| 793 | // std::vector<float> scores({ |
| 794 | // 0.0f, 0.9f, 0.8f, |
| 795 | // 0.0f, 0.75f, 0.72f, |
| 796 | // 0.0f, 0.6f, 0.5f, |
| 797 | // 0.0f, 0.93f, 0.95f, |
| 798 | // 0.0f, 0.5f, 0.4f, |
| 799 | // 0.0f, 0.3f, 0.2f |
| 800 | // }); |
| 801 | // std::vector<float> anchors({ |
| 802 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 803 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 804 | // 0.5f, 0.5f, 1.0f, 1.0f, |
| 805 | // 0.5f, 10.5f, 1.0f, 1.0f, |
| 806 | // 0.5f, 10.5f, 1.0f, 1.0f, |
| 807 | // 0.5f, 100.5f, 1.0f, 1.0f |
| 808 | // }); |
| 809 | // |
| 810 | // std::vector<uint8_t> qBoxEncodings(boxEncodings.size(), 0); |
| 811 | // std::vector<uint8_t> qScores(scores.size(), 0); |
| 812 | // std::vector<uint8_t> qAnchors(anchors.size(), 0); |
| 813 | // QuantizeData(qBoxEncodings.data(), boxEncodings.data(), boxEncodingsInfo); |
| 814 | // QuantizeData(qScores.data(), scores.data(), scoresInfo); |
| 815 | // QuantizeData(qAnchors.data(), anchors.data(), anchorsInfo); |
| 816 | // DetectionPostProcessFastNmsEndToEnd<armnn::DataType::QAsymmU8>(neonDefaultBackends, qBoxEncodings, |
| 817 | // qScores, qAnchors, |
| 818 | // 1.0f, 1, 0.01f, 0, 0.5f, 0); |
| 819 | //} |
| 820 | |
| 821 | TEST_CASE("NeonQLstmEndToEndTest") |
Derek Lamberti | 6a5e5e8 | 2019-12-05 14:41:20 +0000 | [diff] [blame] | 822 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 823 | QLstmEndToEnd(neonDefaultBackends); |
Derek Lamberti | 6a5e5e8 | 2019-12-05 14:41:20 +0000 | [diff] [blame] | 824 | } |
| 825 | |
Derek Lamberti | 6a5e5e8 | 2019-12-05 14:41:20 +0000 | [diff] [blame] | 826 | } |