blob: 592a7ed1a4a39c6c5d1bbeec2bc4be8bf5c1725d [file] [log] [blame]
Sanghoon Lee72898fe2017-09-01 11:42:16 +01001/*
Michalis Spyrou80943252019-01-10 17:19:50 +00002 * Copyright (c) 2017-2019 ARM Limited.
Sanghoon Lee72898fe2017-09-01 11:42:16 +01003 *
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,
Georgios Pinitascbf39c62018-09-10 15:07:45 +010021 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Sanghoon Lee72898fe2017-09-01 11:42:16 +010022 * SOFTWARE.
23 */
24#include "arm_compute/core/Types.h"
25#include "arm_compute/runtime/CL/CLTensor.h"
26#include "arm_compute/runtime/CL/CLTensorAllocator.h"
giuros01164a2722018-11-20 18:34:46 +000027#include "arm_compute/runtime/CL/functions/CLElementwiseOperations.h"
Sanghoon Lee72898fe2017-09-01 11:42:16 +010028#include "tests/CL/CLAccessor.h"
29#include "tests/PaddingCalculator.h"
30#include "tests/datasets/ConvertPolicyDataset.h"
31#include "tests/datasets/ShapeDatasets.h"
32#include "tests/framework/Asserts.h"
33#include "tests/framework/Macros.h"
34#include "tests/framework/datasets/Datasets.h"
35#include "tests/validation/Validation.h"
Georgios Pinitascbf39c62018-09-10 15:07:45 +010036#include "tests/validation/fixtures/ArithmeticOperationsFixture.h"
Sanghoon Lee72898fe2017-09-01 11:42:16 +010037
38namespace arm_compute
39{
40namespace test
41{
42namespace validation
43{
44namespace
45{
giuros01164a2722018-11-20 18:34:46 +000046constexpr unsigned int num_elems_processed_per_iteration = 16;
Sanghoon Lee72898fe2017-09-01 11:42:16 +010047/** Input data sets **/
48const auto ArithmeticSubtractionU8Dataset = combine(combine(framework::dataset::make("DataType", DataType::U8), framework::dataset::make("DataType", DataType::U8)),
49 framework::dataset::make("DataType",
50 DataType::U8));
Georgios Pinitascbf39c62018-09-10 15:07:45 +010051const auto ArithmeticSubtractionQASYMM8Dataset = combine(combine(framework::dataset::make("DataType", DataType::QASYMM8), framework::dataset::make("DataType", DataType::QASYMM8)),
52 framework::dataset::make("DataType",
53 DataType::QASYMM8));
Kurtis Charnockec0c4122019-12-05 14:13:46 +000054const auto ArithmeticSubtractionQASYMM8SignedDataset = combine(combine(framework::dataset::make("DataType", DataType::QASYMM8_SIGNED), framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)),
55 framework::dataset::make("DataType",
56 DataType::QASYMM8_SIGNED));
Michele Di Giorgio6997fc92019-06-18 10:23:22 +010057const auto ArithmeticSubtractionQSYMM16Dataset = combine(combine(framework::dataset::make("DataType", DataType::QSYMM16), framework::dataset::make("DataType", DataType::QSYMM16)),
58 framework::dataset::make("DataType",
59 DataType::QSYMM16));
Georgios Pinitascbf39c62018-09-10 15:07:45 +010060const auto ArithmeticSubtractionS16Dataset = combine(combine(framework::dataset::make("DataType", { DataType::U8, DataType::S16 }), framework::dataset::make("DataType", DataType::S16)),
Sanghoon Lee72898fe2017-09-01 11:42:16 +010061 framework::dataset::make("DataType", DataType::S16));
Sanghoon Lee72898fe2017-09-01 11:42:16 +010062const auto ArithmeticSubtractionFP16Dataset = combine(combine(framework::dataset::make("DataType", DataType::F16), framework::dataset::make("DataType", DataType::F16)),
63 framework::dataset::make("DataType", DataType::F16));
64const auto ArithmeticSubtractionFP32Dataset = combine(combine(framework::dataset::make("DataType", DataType::F32), framework::dataset::make("DataType", DataType::F32)),
65 framework::dataset::make("DataType", DataType::F32));
66} // namespace
67
68TEST_SUITE(CL)
69TEST_SUITE(ArithmeticSubtraction)
70
Georgios Pinitasf9d3a0a2017-11-03 19:01:44 +000071// *INDENT-OFF*
72// clang-format off
73DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(
giuros01164a2722018-11-20 18:34:46 +000074 framework::dataset::make("Input1Info", { TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8),
75 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8),
76 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::U8), // Window shrink
77 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), // Invalid data type combination
78 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), // Mismatching shapes
79 }),
80 framework::dataset::make("Input2Info",{ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8),
81 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8),
82 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::U8),
83 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::S16),
84 TensorInfo(TensorShape(48U, 11U, 2U), 1, DataType::F32),
85 })),
86 framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::S16),
87 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8),
88 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::U8),
89 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8),
90 TensorInfo(TensorShape(48U, 11U, 2U), 1, DataType::F32),
91 })),
92 framework::dataset::make("Expected", { true, true, false, false, false})),
93 input1_info, input2_info, output_info, expected)
Georgios Pinitasf9d3a0a2017-11-03 19:01:44 +000094{
Giorgio Arena70623822017-11-27 15:50:10 +000095 ARM_COMPUTE_EXPECT(bool(CLArithmeticSubtraction::validate(&input1_info.clone()->set_is_resizable(false), &input2_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), ConvertPolicy::WRAP)) == expected, framework::LogLevel::ERRORS);
Georgios Pinitasf9d3a0a2017-11-03 19:01:44 +000096}
97// clang-format on
98// *INDENT-ON*
99
Georgios Pinitascbf39c62018-09-10 15:07:45 +0100100template <typename T>
101using CLArithmeticSubtractionFixture = ArithmeticSubtractionValidationFixture<CLTensor, CLAccessor, CLArithmeticSubtraction, T>;
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100102
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100103TEST_SUITE(Integer)
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100104TEST_SUITE(U8)
Michalis Spyrou80943252019-01-10 17:19:50 +0000105DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100106 shape, policy)
107{
108 // Create tensors
109 CLTensor ref_src1 = create_tensor<CLTensor>(shape, DataType::U8);
110 CLTensor ref_src2 = create_tensor<CLTensor>(shape, DataType::U8);
111 CLTensor dst = create_tensor<CLTensor>(shape, DataType::U8);
112
113 // Create and Configure function
giuros01164a2722018-11-20 18:34:46 +0000114 CLArithmeticSubtraction add;
115 add.configure(&ref_src1, &ref_src2, &dst, policy);
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100116
117 // Validate valid region
118 const ValidRegion valid_region = shape_to_valid_region(shape);
119 validate(dst.info()->valid_region(), valid_region);
120
121 // Validate padding
giuros01164a2722018-11-20 18:34:46 +0000122 const PaddingSize padding = PaddingCalculator(shape.x(), num_elems_processed_per_iteration).required_padding();
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100123 validate(ref_src1.info()->padding(), padding);
124 validate(ref_src2.info()->padding(), padding);
125 validate(dst.info()->padding(), padding);
126}
127
Georgios Pinitascbf39c62018-09-10 15:07:45 +0100128FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticSubtractionFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), ArithmeticSubtractionU8Dataset),
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100129 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })))
130{
131 // Validate output
132 validate(CLAccessor(_target), _reference);
133}
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100134TEST_SUITE_END() // U8
Georgios Pinitascbf39c62018-09-10 15:07:45 +0100135
136TEST_SUITE(S16)
Michalis Spyrou80943252019-01-10 17:19:50 +0000137DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(datasets::SmallShapes(), framework::dataset::make("DataType", { DataType::U8, DataType::S16 })),
Georgios Pinitascbf39c62018-09-10 15:07:45 +0100138 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
139 shape, data_type, policy)
140{
141 // Create tensors
142 CLTensor ref_src1 = create_tensor<CLTensor>(shape, data_type);
143 CLTensor ref_src2 = create_tensor<CLTensor>(shape, DataType::S16);
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100144 CLTensor dst = create_tensor<CLTensor>(shape, DataType::S16);
145
146 // Create and Configure function
giuros01164a2722018-11-20 18:34:46 +0000147 CLArithmeticSubtraction add;
148 add.configure(&ref_src1, &ref_src2, &dst, policy);
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100149
150 // Validate valid region
151 const ValidRegion valid_region = shape_to_valid_region(shape);
152 validate(dst.info()->valid_region(), valid_region);
153
154 // Validate padding
giuros01164a2722018-11-20 18:34:46 +0000155 const PaddingSize padding = PaddingCalculator(shape.x(), num_elems_processed_per_iteration).required_padding();
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100156 validate(ref_src1.info()->padding(), padding);
157 validate(ref_src2.info()->padding(), padding);
158 validate(dst.info()->padding(), padding);
159}
Georgios Pinitascbf39c62018-09-10 15:07:45 +0100160
161FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticSubtractionFixture<int16_t>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), ArithmeticSubtractionS16Dataset),
162 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })))
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100163{
164 // Validate output
165 validate(CLAccessor(_target), _reference);
166}
167
Georgios Pinitascbf39c62018-09-10 15:07:45 +0100168FIXTURE_DATA_TEST_CASE(RunLarge, CLArithmeticSubtractionFixture<int16_t>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), ArithmeticSubtractionS16Dataset),
169 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })))
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100170{
171 // Validate output
172 validate(CLAccessor(_target), _reference);
173}
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100174TEST_SUITE_END() // S16
175TEST_SUITE_END() // Integer
176
177template <typename T>
178using CLArithmeticSubtractionQuantizedFixture = ArithmeticSubtractionValidationQuantizedFixture<CLTensor, CLAccessor, CLArithmeticSubtraction, T>;
179
180TEST_SUITE(Quantized)
181TEST_SUITE(QASYMM8)
182DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
183 shape, policy)
184{
185 // Create tensors
186 CLTensor ref_src1 = create_tensor<CLTensor>(shape, DataType::QASYMM8);
187 CLTensor ref_src2 = create_tensor<CLTensor>(shape, DataType::QASYMM8);
188 CLTensor dst = create_tensor<CLTensor>(shape, DataType::QASYMM8);
189
190 // Create and Configure function
191 CLArithmeticSubtraction add;
192 add.configure(&ref_src1, &ref_src2, &dst, policy);
193
194 // Validate valid region
195 const ValidRegion valid_region = shape_to_valid_region(shape);
196 validate(dst.info()->valid_region(), valid_region);
197
198 // Validate padding
199 const PaddingSize padding = PaddingCalculator(shape.x(), num_elems_processed_per_iteration).required_padding();
200 validate(ref_src1.info()->padding(), padding);
201 validate(ref_src2.info()->padding(), padding);
202 validate(dst.info()->padding(), padding);
203}
204
205FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticSubtractionQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(datasets::SmallShapes(),
206 ArithmeticSubtractionQASYMM8Dataset),
207 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
208 framework::dataset::make("Src0QInfo", { QuantizationInfo(5.f / 255.f, 20) })),
209 framework::dataset::make("Src1QInfo", { QuantizationInfo(2.f / 255.f, 10) })),
210 framework::dataset::make("OutQInfo", { QuantizationInfo(1.f / 255.f, 5) })))
211{
212 // Validate output
213 validate(CLAccessor(_target), _reference);
214}
215TEST_SUITE_END() // QASYMM8
Kurtis Charnockec0c4122019-12-05 14:13:46 +0000216TEST_SUITE(QASYMM8_SIGNED)
217DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
218 shape, policy)
219{
220 // Create tensors
221 CLTensor ref_src1 = create_tensor<CLTensor>(shape, DataType::QASYMM8_SIGNED);
222 CLTensor ref_src2 = create_tensor<CLTensor>(shape, DataType::QASYMM8_SIGNED);
223 CLTensor dst = create_tensor<CLTensor>(shape, DataType::QASYMM8_SIGNED);
224
225 // Create and Configure function
226 CLArithmeticSubtraction sub;
227 sub.configure(&ref_src1, &ref_src2, &dst, policy);
228
229 // Validate valid region
230 const ValidRegion valid_region = shape_to_valid_region(shape);
231 validate(dst.info()->valid_region(), valid_region);
232
233 // Validate padding
234 const PaddingSize padding = PaddingCalculator(shape.x(), num_elems_processed_per_iteration).required_padding();
235 validate(ref_src1.info()->padding(), padding);
236 validate(ref_src2.info()->padding(), padding);
237 validate(dst.info()->padding(), padding);
238}
239
240FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticSubtractionQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(datasets::SmallShapes(),
241 ArithmeticSubtractionQASYMM8SignedDataset),
242 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
243 framework::dataset::make("Src0QInfo", { QuantizationInfo(5.f / 255.f, 10) })),
244 framework::dataset::make("Src1QInfo", { QuantizationInfo(2.f / 255.f, 10) })),
245 framework::dataset::make("OutQInfo", { QuantizationInfo(1.f / 255.f, 5) })))
246{
247 // Validate output
248 validate(CLAccessor(_target), _reference);
249}
250TEST_SUITE_END() // QASYMM8_SIGNED
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100251TEST_SUITE(QSYMM16)
252DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
253 shape, policy)
254{
255 // Create tensors
256 CLTensor ref_src1 = create_tensor<CLTensor>(shape, DataType::QSYMM16);
257 CLTensor ref_src2 = create_tensor<CLTensor>(shape, DataType::QSYMM16);
258 CLTensor dst = create_tensor<CLTensor>(shape, DataType::QSYMM16);
259
260 // Create and Configure function
261 CLArithmeticSubtraction sub;
262 sub.configure(&ref_src1, &ref_src2, &dst, policy);
263
264 // Validate valid region
265 const ValidRegion valid_region = shape_to_valid_region(shape);
266 validate(dst.info()->valid_region(), valid_region);
267
268 // Validate padding
269 const PaddingSize padding = PaddingCalculator(shape.x(), num_elems_processed_per_iteration).required_padding();
270 validate(ref_src1.info()->padding(), padding);
271 validate(ref_src2.info()->padding(), padding);
272 validate(dst.info()->padding(), padding);
273}
274
275FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticSubtractionQuantizedFixture<int16_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(datasets::SmallShapes(),
276 ArithmeticSubtractionQSYMM16Dataset),
277 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
278 framework::dataset::make("Src0QInfo", { QuantizationInfo(1.f / 32768.f, 0), QuantizationInfo(5.f / 32768.f, 0) })),
279 framework::dataset::make("Src1QInfo", { QuantizationInfo(2.f / 32768.f, 0), QuantizationInfo(5.f / 32768.f, 0) })),
280 framework::dataset::make("OutQInfo", { QuantizationInfo(5.f / 32768.f, 0) })))
281{
282 // Validate output
283 validate(CLAccessor(_target), _reference);
284}
285TEST_SUITE_END() // QSYMM16
286TEST_SUITE_END() // Quantized
Isabella Gottardib5908c22017-10-30 15:28:13 +0000287
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100288TEST_SUITE(Float)
289TEST_SUITE(FP16)
Georgios Pinitas583137c2017-08-31 18:12:42 +0100290FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticSubtractionFixture<half>, framework::DatasetMode::ALL, combine(combine(datasets::SmallShapes(), ArithmeticSubtractionFP16Dataset),
291 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })))
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100292{
293 // Validate output
294 validate(CLAccessor(_target), _reference);
295}
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100296TEST_SUITE_END() // FP16
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100297
298TEST_SUITE(FP32)
Michalis Spyrou80943252019-01-10 17:19:50 +0000299DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100300 shape, policy)
301{
302 // Create tensors
303 CLTensor ref_src1 = create_tensor<CLTensor>(shape, DataType::F32);
304 CLTensor ref_src2 = create_tensor<CLTensor>(shape, DataType::F32);
305 CLTensor dst = create_tensor<CLTensor>(shape, DataType::F32);
306
307 // Create and Configure function
giuros01164a2722018-11-20 18:34:46 +0000308 CLArithmeticSubtraction add;
309 add.configure(&ref_src1, &ref_src2, &dst, policy);
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100310
311 // Validate valid region
312 const ValidRegion valid_region = shape_to_valid_region(shape);
313 validate(dst.info()->valid_region(), valid_region);
314
315 // Validate padding
giuros01164a2722018-11-20 18:34:46 +0000316 const PaddingSize padding = PaddingCalculator(shape.x(), num_elems_processed_per_iteration).required_padding();
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100317 validate(ref_src1.info()->padding(), padding);
318 validate(ref_src2.info()->padding(), padding);
319 validate(dst.info()->padding(), padding);
320}
321
322FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticSubtractionFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), ArithmeticSubtractionFP32Dataset),
323 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })))
324{
325 // Validate output
326 validate(CLAccessor(_target), _reference);
327}
328
329FIXTURE_DATA_TEST_CASE(RunLarge, CLArithmeticSubtractionFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), ArithmeticSubtractionFP32Dataset),
330 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })))
331{
332 // Validate output
333 validate(CLAccessor(_target), _reference);
334}
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100335
Georgios Pinitascbf39c62018-09-10 15:07:45 +0100336template <typename T>
337using CLArithmeticSubtractionBroadcastFixture = ArithmeticSubtractionBroadcastValidationFixture<CLTensor, CLAccessor, CLArithmeticSubtraction, T>;
338
339FIXTURE_DATA_TEST_CASE(RunSmallBroadcast, CLArithmeticSubtractionBroadcastFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapesBroadcast(),
340 ArithmeticSubtractionFP32Dataset),
341 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })))
342{
343 // Validate output
344 validate(CLAccessor(_target), _reference);
345}
346
347FIXTURE_DATA_TEST_CASE(RunLargeBroadcast, CLArithmeticSubtractionBroadcastFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapesBroadcast(),
348 ArithmeticSubtractionFP32Dataset),
349 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })))
350{
351 // Validate output
352 validate(CLAccessor(_target), _reference);
353}
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100354TEST_SUITE_END() // FP32
355TEST_SUITE_END() // Float
Georgios Pinitascbf39c62018-09-10 15:07:45 +0100356
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100357TEST_SUITE_END() // ArithmeticSubtraction
358TEST_SUITE_END() // CL
Sanghoon Lee72898fe2017-09-01 11:42:16 +0100359} // namespace validation
360} // namespace test
giuros01164a2722018-11-20 18:34:46 +0000361} // namespace arm_compute