Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 1 | /* |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 2 | * Copyright (c) 2017-2018 ARM Limited. |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to |
| 8 | * deal in the Software without restriction, including without limitation the |
| 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 10 | * sell copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all |
| 14 | * copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | * SOFTWARE. |
| 23 | */ |
| 24 | #include "arm_compute/core/CL/kernels/CLFillBorderKernel.h" |
| 25 | #include "arm_compute/core/Types.h" |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 26 | #include "arm_compute/core/utils/misc/ShapeCalculator.h" |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 27 | #include "arm_compute/runtime/CL/CLTensor.h" |
| 28 | #include "arm_compute/runtime/CL/CLTensorAllocator.h" |
| 29 | #include "arm_compute/runtime/CL/functions/CLDeconvolutionLayer.h" |
| 30 | #include "tests/CL/CLAccessor.h" |
| 31 | #include "tests/PaddingCalculator.h" |
| 32 | #include "tests/datasets/ShapeDatasets.h" |
| 33 | #include "tests/framework/Asserts.h" |
| 34 | #include "tests/framework/Macros.h" |
| 35 | #include "tests/framework/datasets/Datasets.h" |
| 36 | #include "tests/validation/Validation.h" |
| 37 | #include "tests/validation/fixtures/DeconvolutionLayerFixture.h" |
| 38 | |
| 39 | namespace arm_compute |
| 40 | { |
| 41 | namespace test |
| 42 | { |
| 43 | namespace validation |
| 44 | { |
| 45 | namespace |
| 46 | { |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 47 | constexpr AbsoluteTolerance<float> tolerance_fp32(0.001f); /**< Tolerance for floating point tests */ |
| 48 | RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.2)); /**< Tolerance value for comparing reference's for DataType::F16 */ |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 49 | constexpr AbsoluteTolerance<float> tolerance_qasymm8(0.0); /**< Tolerance value for comparing reference's output against implementation's output for quantized data types */ |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 50 | constexpr float tolerance_num = 0.07f; /**< Tolerance number */ |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 51 | |
Michalis Spyrou | afbc5ff | 2018-10-03 14:18:19 +0100 | [diff] [blame] | 52 | const auto data4x4 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 5) * framework::dataset::make("StrideY", 1, 5) * framework::dataset::make("PadX", 0, 3) |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 53 | * framework::dataset::make("PadY", 0, 3) * framework::dataset::make("ax", 0) * framework::dataset::make("ay", 0) * framework::dataset::make("NumKernels", { 1, 3 }); |
| 54 | |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 55 | const auto data3x3 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 2) |
| 56 | * framework::dataset::make("PadY", 0, 2) * framework::dataset::make("ax", 0) * framework::dataset::make("ay", 0) * framework::dataset::make("NumKernels", { 1, 3 }); |
| 57 | |
| 58 | const auto data1x1 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 1) |
| 59 | * framework::dataset::make("PadY", 0, 1) * framework::dataset::make("ax", 0) * framework::dataset::make("ay", 0) * framework::dataset::make("NumKernels", { 1, 3 }); |
| 60 | |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 61 | const auto data_layouts_dataset = framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }); |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 62 | } // namespace |
| 63 | |
| 64 | TEST_SUITE(CL) |
| 65 | TEST_SUITE(DeconvolutionLayer) |
| 66 | |
| 67 | DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, (combine(datasets::SmallDeconvolutionShapes(), framework::dataset::make("DataType", DataType::F32))), |
| 68 | input_shape, data_type) |
| 69 | { |
| 70 | // Create shapes |
| 71 | const unsigned int kernel_size_x = 3; |
| 72 | const unsigned int kernel_size_y = 3; |
| 73 | const unsigned int num_kernels = 1; |
| 74 | const TensorShape weights_shape(kernel_size_x, kernel_size_y, input_shape.z(), num_kernels); |
| 75 | const TensorShape bias_shape(num_kernels); |
Michalis Spyrou | afbc5ff | 2018-10-03 14:18:19 +0100 | [diff] [blame] | 76 | auto out_dim = deconvolution_output_dimensions(input_shape.x(), input_shape.y(), kernel_size_x, kernel_size_y, 1, 1, 1, 1); |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 77 | TensorShape output_shape = compute_deconvolution_output_shape(out_dim, TensorInfo(input_shape, 1, data_type), TensorInfo(weights_shape, 1, data_type)); |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 78 | |
| 79 | // Create tensors |
| 80 | CLTensor src = create_tensor<CLTensor>(input_shape, data_type, 1); |
| 81 | CLTensor weights = create_tensor<CLTensor>(weights_shape, data_type, 1); |
| 82 | CLTensor bias = create_tensor<CLTensor>(bias_shape, data_type, 1); |
| 83 | CLTensor dst = create_tensor<CLTensor>(output_shape, data_type, 1); |
| 84 | |
| 85 | ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS); |
| 86 | ARM_COMPUTE_EXPECT(weights.info()->is_resizable(), framework::LogLevel::ERRORS); |
| 87 | ARM_COMPUTE_EXPECT(bias.info()->is_resizable(), framework::LogLevel::ERRORS); |
| 88 | ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS); |
| 89 | |
| 90 | // Create and configure function |
| 91 | CLDeconvolutionLayer deconv; |
| 92 | deconv.configure(&src, &weights, &bias, &dst, PadStrideInfo(1, 1, 1, 1, DimensionRoundingType::CEIL), 0, 0); |
| 93 | |
| 94 | // Validate valid region |
| 95 | const ValidRegion src_valid_region = shape_to_valid_region(input_shape); |
| 96 | const ValidRegion weights_valid_region = shape_to_valid_region(weights_shape); |
| 97 | const ValidRegion bias_valid_region = shape_to_valid_region(bias_shape); |
| 98 | const ValidRegion dst_valid_region = shape_to_valid_region(output_shape); |
| 99 | |
| 100 | validate(src.info()->valid_region(), src_valid_region); |
| 101 | validate(weights.info()->valid_region(), weights_valid_region); |
| 102 | validate(bias.info()->valid_region(), bias_valid_region); |
| 103 | validate(dst.info()->valid_region(), dst_valid_region); |
| 104 | } |
| 105 | |
| 106 | // *INDENT-OFF* |
| 107 | // clang-format off |
| 108 | DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip( |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 109 | framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type |
| 110 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid weights shape |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 111 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid bias shape |
| 112 | TensorInfo(TensorShape(13U, 11U, 4U, 3U), 1, DataType::F32), // Window shrink |
| 113 | TensorInfo(TensorShape(32U, 16U, 2U), 1, DataType::F32), |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 114 | }), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 115 | framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16), |
| 116 | TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F32), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 117 | TensorInfo(TensorShape(3U, 2U, 2U, 2U), 1, DataType::F32), |
| 118 | TensorInfo(TensorShape(3U, 3U, 4U), 1, DataType::F32), |
| 119 | TensorInfo(TensorShape(1U, 1U, 2U, 4U), 1, DataType::F32), |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 120 | })), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 121 | framework::dataset::make("BiasInfo", { TensorInfo(TensorShape(1U), 1, DataType::F16), |
| 122 | TensorInfo(TensorShape(1U), 1, DataType::F32), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 123 | TensorInfo(TensorShape(25U, 11U), 1, DataType::F32), |
| 124 | TensorInfo(TensorShape(1U), 1, DataType::F32), |
| 125 | TensorInfo(TensorShape(4U), 1, DataType::F32), |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 126 | TensorInfo(TensorShape(4U), 1, DataType::S32), |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 127 | })), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 128 | framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16), |
| 129 | TensorInfo(TensorShape(25U, 10U, 2U), 1, DataType::F32), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 130 | TensorInfo(TensorShape(13U, 13U, 2U), 1, DataType::F32), |
| 131 | TensorInfo(TensorShape(11U, 9U, 1U, 3U), 1, DataType::F32), |
| 132 | TensorInfo(TensorShape(32U, 16U, 4U), 1, DataType::F32), |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 133 | })), |
| 134 | framework::dataset::make("PadStrideInfo", { PadStrideInfo(1, 1, 0, 0), |
| 135 | PadStrideInfo(1, 1, 0, 0), |
| 136 | PadStrideInfo(1, 1, 0, 0), |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 137 | PadStrideInfo(1, 1, 1, 1), |
| 138 | PadStrideInfo(1, 1, 0, 0), |
| 139 | })), |
| 140 | framework::dataset::make("ax", { 1U, |
| 141 | 1U, |
| 142 | 1U, |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 143 | 0U, |
| 144 | 0U, |
| 145 | })), |
| 146 | framework::dataset::make("ay", { 1U, |
| 147 | 1U, |
| 148 | 1U, |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 149 | 0U, |
| 150 | 0U, |
| 151 | })), |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 152 | framework::dataset::make("Expected", { false, false, false, false, true })), |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 153 | input_info, weights_info, bias_info, output_info, pad_info, ax, ay, expected) |
| 154 | { |
| 155 | bool is_valid = bool(CLDeconvolutionLayer::validate(&input_info.clone()->set_is_resizable(false), &weights_info.clone()->set_is_resizable(false), &bias_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), pad_info, ax, ay)); |
| 156 | ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS); |
| 157 | } |
| 158 | // clang-format on |
| 159 | // *INDENT-ON* |
| 160 | |
| 161 | template <typename T> |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 162 | using CLDeconvolutionLayerFixture4x4 = DeconvolutionValidationFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 4, 4>; |
| 163 | |
| 164 | template <typename T> |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 165 | using CLDeconvolutionLayerFixture3x3 = DeconvolutionValidationFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 3, 3>; |
| 166 | |
| 167 | template <typename T> |
| 168 | using CLDeconvolutionLayerFixture1x1 = DeconvolutionValidationFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 1, 1>; |
| 169 | |
| 170 | TEST_SUITE(Float) |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 171 | TEST_SUITE(FP32) |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 172 | |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 173 | TEST_SUITE(W4x4) |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 174 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture4x4<float>, framework::DatasetMode::ALL, combine(combine(data4x4, framework::dataset::make("DataType", DataType::F32)), data_layouts_dataset)) |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 175 | { |
| 176 | // Validate output |
| 177 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 178 | } |
| 179 | TEST_SUITE_END() |
| 180 | |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 181 | TEST_SUITE(W3x3) |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 182 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture3x3<float>, framework::DatasetMode::ALL, combine(combine(data3x3, framework::dataset::make("DataType", DataType::F32)), data_layouts_dataset)) |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 183 | { |
| 184 | // Validate output |
| 185 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 186 | } |
| 187 | TEST_SUITE_END() |
| 188 | |
| 189 | TEST_SUITE(W1x1) |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 190 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture1x1<float>, framework::DatasetMode::ALL, combine(combine(data1x1, framework::dataset::make("DataType", DataType::F32)), data_layouts_dataset)) |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 191 | { |
| 192 | // Validate output |
| 193 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 194 | } |
| 195 | TEST_SUITE_END() |
| 196 | |
| 197 | TEST_SUITE_END() |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 198 | |
| 199 | TEST_SUITE(FP16) |
| 200 | |
| 201 | TEST_SUITE(W4x4) |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 202 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture4x4<half>, framework::DatasetMode::ALL, combine(combine(data4x4, framework::dataset::make("DataType", DataType::F16)), data_layouts_dataset)) |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 203 | { |
| 204 | // Validate output |
| 205 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 206 | } |
| 207 | TEST_SUITE_END() |
| 208 | |
| 209 | TEST_SUITE(W3x3) |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 210 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture3x3<half>, framework::DatasetMode::ALL, combine(combine(data3x3, framework::dataset::make("DataType", DataType::F16)), data_layouts_dataset)) |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 211 | { |
| 212 | // Validate output |
| 213 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 214 | } |
| 215 | TEST_SUITE_END() |
| 216 | |
| 217 | TEST_SUITE(W1x1) |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 218 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture1x1<half>, framework::DatasetMode::ALL, combine(combine(data1x1, framework::dataset::make("DataType", DataType::F16)), data_layouts_dataset)) |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 219 | { |
| 220 | // Validate output |
| 221 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 222 | } |
| 223 | TEST_SUITE_END() |
| 224 | |
| 225 | TEST_SUITE_END() |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 226 | TEST_SUITE_END() |
| 227 | |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 228 | template <typename T> |
| 229 | using CLDeconvolutionLayerQuantizedFixture4x4 = DeconvolutionValidationQuantizedFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 4, 4>; |
| 230 | |
| 231 | template <typename T> |
| 232 | using CLDeconvolutionLayerQuantizedFixture3x3 = DeconvolutionValidationQuantizedFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 3, 3>; |
| 233 | |
| 234 | template <typename T> |
| 235 | using CLDeconvolutionLayerQuantizedFixture1x1 = DeconvolutionValidationQuantizedFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 1, 1>; |
| 236 | |
| 237 | TEST_SUITE(Quantized) |
| 238 | TEST_SUITE(QASYMM8) |
| 239 | |
| 240 | TEST_SUITE(W4x4) |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 241 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerQuantizedFixture4x4<uint8_t>, framework::DatasetMode::ALL, combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::QASYMM8)), |
| 242 | data_layouts_dataset), |
Michele Di Giorgio | c1961b5 | 2018-08-16 11:47:45 +0100 | [diff] [blame] | 243 | framework::dataset::make("QuantizationInfo", QuantizationInfo(2.f / 255.f, 0)))) |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 244 | { |
| 245 | // Validate output |
| 246 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 247 | } |
| 248 | TEST_SUITE_END() |
| 249 | |
| 250 | TEST_SUITE(W3x3) |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 251 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerQuantizedFixture3x3<uint8_t>, framework::DatasetMode::ALL, combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::QASYMM8)), |
| 252 | data_layouts_dataset), |
Michele Di Giorgio | c1961b5 | 2018-08-16 11:47:45 +0100 | [diff] [blame] | 253 | framework::dataset::make("QuantizationInfo", QuantizationInfo(2.f / 255.f, 0)))) |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 254 | { |
| 255 | // Validate output |
| 256 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 257 | } |
| 258 | TEST_SUITE_END() |
| 259 | |
| 260 | TEST_SUITE(W1x1) |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 261 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerQuantizedFixture1x1<uint8_t>, framework::DatasetMode::ALL, combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::QASYMM8)), |
| 262 | data_layouts_dataset), |
Michele Di Giorgio | c1961b5 | 2018-08-16 11:47:45 +0100 | [diff] [blame] | 263 | framework::dataset::make("QuantizationInfo", QuantizationInfo(2.f / 255.f, 0)))) |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 264 | { |
| 265 | // Validate output |
| 266 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 267 | } |
| 268 | TEST_SUITE_END() |
| 269 | |
| 270 | TEST_SUITE_END() |
| 271 | TEST_SUITE_END() |
| 272 | |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 273 | TEST_SUITE_END() |
| 274 | TEST_SUITE_END() |
| 275 | } // namespace validation |
| 276 | } // namespace test |
| 277 | } // namespace arm_compute |