Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 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> |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 9 | #include <backendsCommon/test/ArgMinMaxEndToEndTestImpl.hpp> |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 10 | #include <backendsCommon/test/ComparisonEndToEndTestImpl.hpp> |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 11 | #include <backendsCommon/test/ConcatEndToEndTestImpl.hpp> |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 12 | #include <backendsCommon/test/DepthToSpaceEndToEndTestImpl.hpp> |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 13 | #include <backendsCommon/test/DequantizeEndToEndTestImpl.hpp> |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 14 | #include <backendsCommon/test/ElementwiseUnaryEndToEndTestImpl.hpp> |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 15 | #include <backendsCommon/test/FillEndToEndTestImpl.hpp> |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 16 | #include <backendsCommon/test/InstanceNormalizationEndToEndTestImpl.hpp> |
Nikhil Raj | 2ec73ac | 2019-07-22 10:13:22 +0100 | [diff] [blame] | 17 | #include <backendsCommon/test/PreluEndToEndTestImpl.hpp> |
James Conroy | 0800bf5 | 2020-05-14 12:46:44 +0100 | [diff] [blame] | 18 | #include <backendsCommon/test/QLstmEndToEndTestImpl.hpp> |
Francis Murtagh | b3fc252 | 2019-08-09 13:20:50 +0100 | [diff] [blame] | 19 | #include <backendsCommon/test/QuantizedLstmEndToEndTestImpl.hpp> |
James Conroy | 6059784 | 2019-07-02 10:57:56 +0100 | [diff] [blame] | 20 | #include <backendsCommon/test/SpaceToDepthEndToEndTestImpl.hpp> |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 21 | #include <backendsCommon/test/SplitterEndToEndTestImpl.hpp> |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 22 | #include <backendsCommon/test/TransposeConvolution2dEndToEndTestImpl.hpp> |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 23 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 24 | #include <doctest/doctest.h> |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 25 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 26 | TEST_SUITE("ClEndToEnd") |
| 27 | { |
| 28 | std::vector<armnn::BackendId> clDefaultBackends = {armnn::Compute::GpuAcc}; |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 29 | |
Aron Virginas-Tar | 8204694 | 2019-09-09 15:18:29 +0100 | [diff] [blame] | 30 | // Abs |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 31 | TEST_CASE("ClAbsEndToEndTestFloat32") |
Aron Virginas-Tar | 8204694 | 2019-09-09 15:18:29 +0100 | [diff] [blame] | 32 | { |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 33 | std::vector<float> expectedOutput = |
| 34 | { |
| 35 | 1.f, 1.f, 1.f, 1.f, 5.f, 5.f, 5.f, 5.f, |
| 36 | 3.f, 3.f, 3.f, 3.f, 4.f, 4.f, 4.f, 4.f |
| 37 | }; |
| 38 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 39 | ElementwiseUnarySimpleEndToEnd<armnn::DataType::Float32>(clDefaultBackends, |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 40 | UnaryOperation::Abs, |
| 41 | expectedOutput); |
Aron Virginas-Tar | 8204694 | 2019-09-09 15:18:29 +0100 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | // Constant |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 45 | TEST_CASE("ConstantUsage_Cl_Float32") |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 46 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 47 | ConstantUsageFloat32Test(clDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 48 | } |
| 49 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 50 | TEST_CASE("ClConcatEndToEndDim0Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 51 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 52 | ConcatDim0EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 53 | } |
| 54 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 55 | TEST_CASE("ClConcatEndToEndDim0Uint8Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 56 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 57 | ConcatDim0EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 58 | } |
| 59 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 60 | TEST_CASE("ClConcatEndToEndDim1Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 61 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 62 | ConcatDim1EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 63 | } |
| 64 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 65 | TEST_CASE("ClConcatEndToEndDim1Uint8Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 66 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 67 | ConcatDim1EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 68 | } |
| 69 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 70 | TEST_CASE("ClConcatEndToEndDim3Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 71 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 72 | ConcatDim3EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 73 | } |
| 74 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 75 | TEST_CASE("ClConcatEndToEndDim3Uint8Test") |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 76 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 77 | ConcatDim3EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Aron Virginas-Tar | 7010400 | 2018-10-24 15:33:28 +0100 | [diff] [blame] | 78 | } |
| 79 | |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 80 | // DepthToSpace |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 81 | TEST_CASE("DephtToSpaceEndToEndNchwFloat32") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 82 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 83 | DepthToSpaceEndToEnd<armnn::DataType::Float32>(clDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 84 | } |
| 85 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 86 | TEST_CASE("DephtToSpaceEndToEndNchwFloat16") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 87 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 88 | DepthToSpaceEndToEnd<armnn::DataType::Float16>(clDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 89 | } |
| 90 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 91 | TEST_CASE("DephtToSpaceEndToEndNchwUint8") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 92 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 93 | DepthToSpaceEndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 94 | } |
| 95 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 96 | TEST_CASE("DephtToSpaceEndToEndNchwInt16") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 97 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 98 | DepthToSpaceEndToEnd<armnn::DataType::QSymmS16>(clDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 99 | } |
| 100 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 101 | TEST_CASE("DephtToSpaceEndToEndNhwcFloat32") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 102 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 103 | DepthToSpaceEndToEnd<armnn::DataType::Float32>(clDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 104 | } |
| 105 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 106 | TEST_CASE("DephtToSpaceEndToEndNhwcFloat16") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 107 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 108 | DepthToSpaceEndToEnd<armnn::DataType::Float16>(clDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 109 | } |
| 110 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 111 | TEST_CASE("DephtToSpaceEndToEndNhwcUint8") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 112 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 113 | DepthToSpaceEndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 114 | } |
| 115 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 116 | TEST_CASE("DephtToSpaceEndToEndNhwcInt16") |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 117 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 118 | DepthToSpaceEndToEnd<armnn::DataType::QSymmS16>(clDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | // Dequantize |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 122 | TEST_CASE("DequantizeEndToEndSimpleTest") |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 123 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 124 | DequantizeEndToEndSimple<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 125 | } |
| 126 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 127 | TEST_CASE("DequantizeEndToEndOffsetTest") |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 128 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 129 | DequantizeEndToEndOffset<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 130 | } |
| 131 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 132 | TEST_CASE("ClStridedSliceInvalidSliceEndToEndTest") |
David Monahan | 0a99a14 | 2020-03-13 07:52:54 +0000 | [diff] [blame] | 133 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 134 | StridedSliceInvalidSliceEndToEndTest(clDefaultBackends); |
David Monahan | 0a99a14 | 2020-03-13 07:52:54 +0000 | [diff] [blame] | 135 | } |
| 136 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 137 | TEST_CASE("ClEluEndToEndTestFloat32") |
Jan Eilers | bca73e1 | 2020-03-11 12:52:46 +0000 | [diff] [blame] | 138 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 139 | EluEndToEndTest<armnn::DataType::Float32>(clDefaultBackends); |
Jan Eilers | bca73e1 | 2020-03-11 12:52:46 +0000 | [diff] [blame] | 140 | } |
| 141 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 142 | TEST_CASE("ClEluEndToEndTestFloat16") |
Jan Eilers | bca73e1 | 2020-03-11 12:52:46 +0000 | [diff] [blame] | 143 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 144 | EluEndToEndTest<armnn::DataType::Float16>(clDefaultBackends); |
Jan Eilers | bca73e1 | 2020-03-11 12:52:46 +0000 | [diff] [blame] | 145 | } |
| 146 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 147 | TEST_CASE("ClGreaterSimpleEndToEndTest") |
Nattapat Chaimanowong | c6a41ff | 2019-01-29 09:56:02 +0000 | [diff] [blame] | 148 | { |
| 149 | const std::vector<uint8_t> expectedOutput({ 0, 0, 0, 0, 1, 1, 1, 1, |
| 150 | 0, 0, 0, 0, 0, 0, 0, 0 }); |
| 151 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 152 | ComparisonSimpleEndToEnd<armnn::DataType::Float32>(clDefaultBackends, |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 153 | ComparisonOperation::Greater, |
| 154 | expectedOutput); |
Nattapat Chaimanowong | c6a41ff | 2019-01-29 09:56:02 +0000 | [diff] [blame] | 155 | } |
| 156 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 157 | TEST_CASE("ClGreaterSimpleEndToEndUint8Test") |
Nattapat Chaimanowong | c6a41ff | 2019-01-29 09:56:02 +0000 | [diff] [blame] | 158 | { |
| 159 | const std::vector<uint8_t> expectedOutput({ 0, 0, 0, 0, 1, 1, 1, 1, |
| 160 | 0, 0, 0, 0, 0, 0, 0, 0 }); |
| 161 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 162 | ComparisonSimpleEndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends, |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 163 | ComparisonOperation::Greater, |
| 164 | expectedOutput); |
Nattapat Chaimanowong | c6a41ff | 2019-01-29 09:56:02 +0000 | [diff] [blame] | 165 | } |
| 166 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 167 | TEST_CASE("ClGreaterBroadcastEndToEndTest") |
Nattapat Chaimanowong | c6a41ff | 2019-01-29 09:56:02 +0000 | [diff] [blame] | 168 | { |
| 169 | const std::vector<uint8_t> expectedOutput({ 0, 1, 0, 0, 0, 1, |
| 170 | 1, 1, 1, 1, 1, 1 }); |
| 171 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 172 | ComparisonBroadcastEndToEnd<armnn::DataType::Float32>(clDefaultBackends, |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 173 | ComparisonOperation::Greater, |
| 174 | expectedOutput); |
Nattapat Chaimanowong | c6a41ff | 2019-01-29 09:56:02 +0000 | [diff] [blame] | 175 | } |
| 176 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 177 | TEST_CASE("ClGreaterBroadcastEndToEndUint8Test") |
Nattapat Chaimanowong | c6a41ff | 2019-01-29 09:56:02 +0000 | [diff] [blame] | 178 | { |
| 179 | const std::vector<uint8_t> expectedOutput({ 0, 1, 0, 0, 0, 1, |
| 180 | 1, 1, 1, 1, 1, 1 }); |
| 181 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 182 | ComparisonBroadcastEndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends, |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 183 | ComparisonOperation::Greater, |
| 184 | expectedOutput); |
Nattapat Chaimanowong | c6a41ff | 2019-01-29 09:56:02 +0000 | [diff] [blame] | 185 | } |
| 186 | |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 187 | // HardSwish |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 188 | TEST_CASE("ClHardSwishEndToEndTestFloat32") |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 189 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 190 | HardSwishEndToEndTest<armnn::DataType::Float32>(clDefaultBackends); |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 191 | } |
| 192 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 193 | TEST_CASE("ClHardSwishEndToEndTestFloat16") |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 194 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 195 | HardSwishEndToEndTest<armnn::DataType::Float16>(clDefaultBackends); |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 196 | } |
| 197 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 198 | TEST_CASE("ClHardSwishEndToEndTestQAsymmS8") |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 199 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 200 | HardSwishEndToEndTest<armnn::DataType::QAsymmS8>(clDefaultBackends); |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 201 | } |
| 202 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 203 | TEST_CASE("ClHardSwishEndToEndTestQAsymmU8") |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 204 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 205 | HardSwishEndToEndTest<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 206 | } |
| 207 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 208 | TEST_CASE("ClHardSwishEndToEndTestQSymmS16") |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 209 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 210 | HardSwishEndToEndTest<armnn::DataType::QSymmS16>(clDefaultBackends); |
Jan Eilers | a83af7b | 2020-03-18 15:58:11 +0000 | [diff] [blame] | 211 | } |
| 212 | |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 213 | // InstanceNormalization |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 214 | TEST_CASE("ClInstanceNormalizationNhwcEndToEndTest1") |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 215 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 216 | InstanceNormalizationNhwcEndToEndTest1(clDefaultBackends); |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 217 | } |
| 218 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 219 | TEST_CASE("ClInstanceNormalizationNchwEndToEndTest1") |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 220 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 221 | InstanceNormalizationNchwEndToEndTest1(clDefaultBackends); |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 222 | } |
| 223 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 224 | TEST_CASE("ClInstanceNormalizationNhwcEndToEndTest2") |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 225 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 226 | InstanceNormalizationNhwcEndToEndTest2(clDefaultBackends); |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 227 | } |
| 228 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 229 | TEST_CASE("ClInstanceNormalizationNchwEndToEndTest2") |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 230 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 231 | InstanceNormalizationNchwEndToEndTest2(clDefaultBackends); |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 232 | } |
| 233 | |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 234 | // Fill |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 235 | TEST_CASE("ClFillEndToEndTest") |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 236 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 237 | FillEndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 238 | } |
| 239 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 240 | TEST_CASE("RefFillEndToEndTestFloat16") |
Teresa Charlin | 4b10fef | 2020-07-29 09:36:41 +0100 | [diff] [blame] | 241 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 242 | FillEndToEnd<armnn::DataType::Float16>(clDefaultBackends); |
Teresa Charlin | 4b10fef | 2020-07-29 09:36:41 +0100 | [diff] [blame] | 243 | } |
| 244 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 245 | TEST_CASE("ClFillEndToEndTestInt32") |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 246 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 247 | FillEndToEnd<armnn::DataType::Signed32>(clDefaultBackends); |
Teresa Charlin | 4408850 | 2020-07-27 11:27:19 +0100 | [diff] [blame] | 248 | } |
| 249 | |
| 250 | // Prelu |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 251 | TEST_CASE("ClPreluEndToEndFloat32Test") |
Nikhil Raj | 2ec73ac | 2019-07-22 10:13:22 +0100 | [diff] [blame] | 252 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 253 | PreluEndToEndNegativeTest<armnn::DataType::Float32>(clDefaultBackends); |
Nikhil Raj | 2ec73ac | 2019-07-22 10:13:22 +0100 | [diff] [blame] | 254 | } |
| 255 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 256 | TEST_CASE("ClPreluEndToEndTestUint8") |
Nikhil Raj | 2ec73ac | 2019-07-22 10:13:22 +0100 | [diff] [blame] | 257 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 258 | PreluEndToEndPositiveTest<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Nikhil Raj | 2ec73ac | 2019-07-22 10:13:22 +0100 | [diff] [blame] | 259 | } |
| 260 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 261 | TEST_CASE("ClSpaceToDepthNhwcEndToEndTest1") |
James Conroy | 6059784 | 2019-07-02 10:57:56 +0100 | [diff] [blame] | 262 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 263 | SpaceToDepthNhwcEndToEndTest1(clDefaultBackends); |
James Conroy | 6059784 | 2019-07-02 10:57:56 +0100 | [diff] [blame] | 264 | } |
| 265 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 266 | TEST_CASE("ClSpaceToDepthNchwEndToEndTest1") |
James Conroy | 6059784 | 2019-07-02 10:57:56 +0100 | [diff] [blame] | 267 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 268 | SpaceToDepthNchwEndToEndTest1(clDefaultBackends); |
James Conroy | 6059784 | 2019-07-02 10:57:56 +0100 | [diff] [blame] | 269 | } |
| 270 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 271 | TEST_CASE("ClSpaceToDepthNhwcEndToEndTest2") |
James Conroy | 6059784 | 2019-07-02 10:57:56 +0100 | [diff] [blame] | 272 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 273 | SpaceToDepthNhwcEndToEndTest2(clDefaultBackends); |
James Conroy | 6059784 | 2019-07-02 10:57:56 +0100 | [diff] [blame] | 274 | } |
| 275 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 276 | TEST_CASE("ClSpaceToDepthNchwEndToEndTest2") |
James Conroy | 6059784 | 2019-07-02 10:57:56 +0100 | [diff] [blame] | 277 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 278 | SpaceToDepthNchwEndToEndTest2(clDefaultBackends); |
James Conroy | 6059784 | 2019-07-02 10:57:56 +0100 | [diff] [blame] | 279 | } |
| 280 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 281 | TEST_CASE("ClSplitter1dEndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 282 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 283 | Splitter1dEndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 284 | } |
| 285 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 286 | TEST_CASE("ClSplitter1dEndToEndUint8Test") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 287 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 288 | Splitter1dEndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 289 | } |
| 290 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 291 | TEST_CASE("ClSplitter2dDim0EndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 292 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 293 | Splitter2dDim0EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 294 | } |
| 295 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 296 | TEST_CASE("ClSplitter2dDim1EndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 297 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 298 | Splitter2dDim1EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 299 | } |
| 300 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 301 | TEST_CASE("ClSplitter2dDim0EndToEndUint8Test") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 302 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 303 | Splitter2dDim0EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 304 | } |
| 305 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 306 | TEST_CASE("ClSplitter2dDim1EndToEndUint8Test") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 307 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 308 | Splitter2dDim1EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 309 | } |
| 310 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 311 | TEST_CASE("ClSplitter3dDim0EndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 312 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 313 | Splitter3dDim0EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 314 | } |
| 315 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 316 | TEST_CASE("ClSplitter3dDim1EndToEndTest") |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 317 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 318 | Splitter3dDim1EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 319 | } |
| 320 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 321 | TEST_CASE("ClSplitter3dDim2EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 322 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 323 | Splitter3dDim2EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 324 | } |
| 325 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 326 | TEST_CASE("ClSplitter3dDim0EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 327 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 328 | Splitter3dDim0EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 329 | } |
| 330 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 331 | TEST_CASE("ClSplitter3dDim1EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 332 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 333 | Splitter3dDim1EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 334 | } |
| 335 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 336 | TEST_CASE("ClSplitter3dDim2EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 337 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 338 | Splitter3dDim2EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 339 | } |
| 340 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 341 | TEST_CASE("ClSplitter4dDim0EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 342 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 343 | Splitter4dDim0EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 344 | } |
| 345 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 346 | TEST_CASE("ClSplitter4dDim1EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 347 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 348 | Splitter4dDim1EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 349 | } |
| 350 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 351 | TEST_CASE("ClSplitter4dDim2EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 352 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 353 | Splitter4dDim2EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 354 | } |
| 355 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 356 | TEST_CASE("ClSplitter4dDim3EndToEndTest") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 357 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 358 | Splitter4dDim3EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 359 | } |
| 360 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 361 | TEST_CASE("ClSplitter4dDim0EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 362 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 363 | Splitter4dDim0EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 364 | } |
| 365 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 366 | TEST_CASE("ClSplitter4dDim1EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 367 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 368 | Splitter4dDim1EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 369 | } |
| 370 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 371 | TEST_CASE("ClSplitter4dDim2EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 372 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 373 | Splitter4dDim2EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 374 | } |
| 375 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 376 | TEST_CASE("ClSplitter4dDim3EndToEndUint8Test") |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 377 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 378 | Splitter4dDim3EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Narumol Prangnawarat | 0f072ab | 2019-05-29 14:12:46 +0100 | [diff] [blame] | 379 | } |
Nattapat Chaimanowong | c6a41ff | 2019-01-29 09:56:02 +0000 | [diff] [blame] | 380 | |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 381 | // TransposeConvolution2d |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 382 | TEST_CASE("ClTransposeConvolution2dEndToEndFloatNchwTest") |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 383 | { |
| 384 | TransposeConvolution2dEndToEnd<armnn::DataType::Float32, armnn::DataType::Float32>( |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 385 | clDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 386 | } |
| 387 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 388 | TEST_CASE("ClTransposeConvolution2dEndToEndUint8NchwTest") |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 389 | { |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 390 | TransposeConvolution2dEndToEnd<armnn::DataType::QAsymmU8, armnn::DataType::Signed32>( |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 391 | clDefaultBackends, armnn::DataLayout::NCHW); |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 392 | } |
| 393 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 394 | TEST_CASE("ClTransposeConvolution2dEndToEndFloatNhwcTest") |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 395 | { |
| 396 | TransposeConvolution2dEndToEnd<armnn::DataType::Float32, armnn::DataType::Float32>( |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 397 | clDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 398 | } |
| 399 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 400 | TEST_CASE("ClTransposeConvolution2dEndToEndUint8NhwcTest") |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 401 | { |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 402 | TransposeConvolution2dEndToEnd<armnn::DataType::QAsymmU8, armnn::DataType::Signed32>( |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 403 | clDefaultBackends, armnn::DataLayout::NHWC); |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 404 | } |
| 405 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 406 | TEST_CASE("ClQuantizedLstmEndToEndTest") |
Francis Murtagh | b3fc252 | 2019-08-09 13:20:50 +0100 | [diff] [blame] | 407 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 408 | QuantizedLstmEndToEnd(clDefaultBackends); |
Francis Murtagh | b3fc252 | 2019-08-09 13:20:50 +0100 | [diff] [blame] | 409 | } |
| 410 | |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 411 | // ArgMinMax |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 412 | TEST_CASE("ClArgMaxSimpleTest") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 413 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 414 | ArgMaxEndToEndSimple<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 415 | } |
| 416 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 417 | TEST_CASE("ClArgMinSimpleTest") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 418 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 419 | ArgMinEndToEndSimple<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 420 | } |
| 421 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 422 | TEST_CASE("ClArgMaxAxis0Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 423 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 424 | ArgMaxAxis0EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 425 | } |
| 426 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 427 | TEST_CASE("ClArgMinAxis0Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 428 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 429 | ArgMinAxis0EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 430 | } |
| 431 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 432 | TEST_CASE("ClArgMaxAxis1Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 433 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 434 | ArgMaxAxis1EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 435 | } |
| 436 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 437 | TEST_CASE("ClArgMinAxis1Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 438 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 439 | ArgMinAxis1EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 440 | } |
| 441 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 442 | TEST_CASE("ClArgMaxAxis2Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 443 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 444 | ArgMaxAxis2EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 445 | } |
| 446 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 447 | TEST_CASE("ClArgMinAxis2Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 448 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 449 | ArgMinAxis2EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 450 | } |
| 451 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 452 | TEST_CASE("ClArgMaxAxis3Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 453 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 454 | ArgMaxAxis3EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 455 | } |
| 456 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 457 | TEST_CASE("ClArgMinAxis3Test") |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 458 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 459 | ArgMinAxis3EndToEnd<armnn::DataType::Float32>(clDefaultBackends); |
James Conroy | 68a4dbc | 2019-11-13 15:35:59 +0000 | [diff] [blame] | 460 | } |
| 461 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 462 | TEST_CASE("ClArgMaxSimpleTestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 463 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 464 | ArgMaxEndToEndSimple<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 465 | } |
| 466 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 467 | TEST_CASE("ClArgMinSimpleTestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 468 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 469 | ArgMinEndToEndSimple<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 470 | } |
| 471 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 472 | TEST_CASE("ClArgMaxAxis0TestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 473 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 474 | ArgMaxAxis0EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 475 | } |
| 476 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 477 | TEST_CASE("ClArgMinAxis0TestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 478 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 479 | ArgMinAxis0EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 480 | } |
| 481 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 482 | TEST_CASE("ClArgMaxAxis1TestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 483 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 484 | ArgMaxAxis1EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 485 | } |
| 486 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 487 | TEST_CASE("ClArgMinAxis1TestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 488 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 489 | ArgMinAxis1EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 490 | } |
| 491 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 492 | TEST_CASE("ClArgMaxAxis2TestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 493 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 494 | ArgMaxAxis2EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 495 | } |
| 496 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 497 | TEST_CASE("ClArgMinAxis2TestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 498 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 499 | ArgMinAxis2EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 500 | } |
| 501 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 502 | TEST_CASE("ClArgMaxAxis3TestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 503 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 504 | ArgMaxAxis3EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 505 | } |
| 506 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 507 | TEST_CASE("ClArgMinAxis3TestQAsymmU8") |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 508 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 509 | ArgMinAxis3EndToEnd<armnn::DataType::QAsymmU8>(clDefaultBackends); |
Ryan OShea | 1426a3f | 2020-01-23 11:56:05 +0000 | [diff] [blame] | 510 | } |
| 511 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 512 | TEST_CASE("ClQLstmEndToEndTest") |
James Conroy | 0800bf5 | 2020-05-14 12:46:44 +0100 | [diff] [blame] | 513 | { |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 514 | QLstmEndToEnd(clDefaultBackends); |
James Conroy | 0800bf5 | 2020-05-14 12:46:44 +0100 | [diff] [blame] | 515 | } |
| 516 | |
David Monahan | 646bc8a | 2022-01-31 14:29:14 +0000 | [diff] [blame] | 517 | TEST_CASE("ClForceImportWithMisalignedInputBuffersEndToEndTest") |
| 518 | { |
| 519 | ForceImportWithMisalignedInputBuffersEndToEndTest(clDefaultBackends); |
| 520 | } |
| 521 | |
| 522 | TEST_CASE("ClForceImportWithMisalignedOutputBuffersEndToEndTest") |
| 523 | { |
| 524 | ForceImportWithMisalignedOutputBuffersEndToEndTest(clDefaultBackends); |
| 525 | } |
| 526 | |
| 527 | TEST_CASE("ClForceImportWithMisalignedInputAndOutputBuffersEndToEndTest") |
| 528 | { |
| 529 | ForceImportWithMisalignedInputAndOutputBuffersEndToEndTest(clDefaultBackends); |
| 530 | } |
| 531 | |
Sadik Armagan | 1625efc | 2021-06-10 18:24:34 +0100 | [diff] [blame] | 532 | } |