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