blob: 1ed3a105dc9c75e1e380da23a8aa0ada51fbf953 [file] [log] [blame]
Sanghoon Lee70f82912017-08-24 14:21:24 +01001/*
Georgios Pinitasda816752021-07-02 09:22:14 +01002 * Copyright (c) 2017-2021 Arm Limited.
Sanghoon Lee70f82912017-08-24 14:21:24 +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,
Sanghoon Leea7a5b7b2017-09-14 12:11:03 +010021 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Sanghoon Lee70f82912017-08-24 14:21:24 +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 Lee70f82912017-08-24 14:21:24 +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 Lee70f82912017-08-24 14:21:24 +010037
38namespace arm_compute
39{
40namespace test
41{
42namespace validation
43{
Ramy Elgammalec320d92022-12-14 09:20:09 +000044/** Synced with tests/validation/dynamic_fusion/gpu/cl/Add.cpp from the dynamic fusion interface.
45 * Please check there for any differences in the coverage
46 */
Sanghoon Lee70f82912017-08-24 14:21:24 +010047namespace
48{
49/** Input data sets **/
Giorgio Arena8b2a7d32020-02-11 17:21:31 +000050const auto EmptyActivationFunctionsDataset = framework::dataset::make("ActivationInfo",
51{ ActivationLayerInfo() });
52const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo",
53{
54 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 0.75f, 0.25f),
55 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC, 0.75f, 0.25f)
56});
Sheri Zhanga387e272021-06-29 17:34:06 +010057const auto InPlaceDataSet = framework::dataset::make("InPlace", { false, true });
58const auto OutOfPlaceDataSet = framework::dataset::make("InPlace", { false });
Sanghoon Lee70f82912017-08-24 14:21:24 +010059} // namespace
60
61TEST_SUITE(CL)
62TEST_SUITE(ArithmeticAddition)
63
Georgios Pinitasf9d3a0a2017-11-03 19:01:44 +000064// *INDENT-OFF*
65// clang-format off
66DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(
Georgios Pinitasda816752021-07-02 09:22:14 +010067 framework::dataset::make("Input1Info", { TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32),
Giorgio Arena70623822017-11-27 15:50:10 +000068 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), // Invalid data type combination
69 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), // Mismatching shapes
Georgios Pinitasf9d3a0a2017-11-03 19:01:44 +000070 }),
Georgios Pinitasda816752021-07-02 09:22:14 +010071 framework::dataset::make("Input2Info",{ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32),
Giorgio Arena70623822017-11-27 15:50:10 +000072 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::S16),
73 TensorInfo(TensorShape(48U, 11U, 2U), 1, DataType::F32),
Georgios Pinitasf9d3a0a2017-11-03 19:01:44 +000074 })),
Georgios Pinitasda816752021-07-02 09:22:14 +010075 framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32),
Giorgio Arena70623822017-11-27 15:50:10 +000076 TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8),
77 TensorInfo(TensorShape(48U, 11U, 2U), 1, DataType::F32),
Georgios Pinitasf9d3a0a2017-11-03 19:01:44 +000078 })),
Georgios Pinitasda816752021-07-02 09:22:14 +010079 framework::dataset::make("Expected", { true, false, false})),
Georgios Pinitasf9d3a0a2017-11-03 19:01:44 +000080 input1_info, input2_info, output_info, expected)
81{
Giorgio Arena70623822017-11-27 15:50:10 +000082 ARM_COMPUTE_EXPECT(bool(CLArithmeticAddition::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 +000083}
84// clang-format on
85// *INDENT-ON*
86
Michele Di Giorgioc41a6a62020-06-16 16:21:00 +010087/** Validate fused activation expecting the following behaviours:
88 *
89 * - Fused activation with float data type should succeed
90 * - Fused activation with quantized data type should fail
91 *
92 */
93TEST_CASE(FusedActivation, framework::DatasetMode::ALL)
94{
95 auto input = TensorInfo{ TensorShape(2U, 2U), 1, DataType::F32 };
96 auto output = TensorInfo{ TensorShape(2U, 2U), 1, DataType::F32 };
97 Status result{};
98
99 const auto act_info = ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU);
100
101 // Fused-activation float type
102 result = CLArithmeticAddition::validate(&input, &input, &output, ConvertPolicy::WRAP, act_info);
103 ARM_COMPUTE_EXPECT(bool(result) == true, framework::LogLevel::ERRORS);
104
105 // Fused-activation quantized type
106 input.set_data_type(DataType::QASYMM8);
107 output.set_data_type(DataType::QASYMM8);
108 result = CLArithmeticAddition::validate(&input, &input, &output, ConvertPolicy::WRAP, act_info);
109 ARM_COMPUTE_EXPECT(bool(result) == false, framework::LogLevel::ERRORS);
110}
111
Sanghoon Lee70f82912017-08-24 14:21:24 +0100112template <typename T>
113using CLArithmeticAdditionFixture = ArithmeticAdditionValidationFixture<CLTensor, CLAccessor, CLArithmeticAddition, T>;
114
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100115TEST_SUITE(Integer)
Sanghoon Lee70f82912017-08-24 14:21:24 +0100116TEST_SUITE(U8)
Sheri Zhanga387e272021-06-29 17:34:06 +0100117FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticAdditionFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::SmallShapes(), framework::dataset::make("DataType",
118 DataType::U8)),
119 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
120 OutOfPlaceDataSet))
Sanghoon Lee70f82912017-08-24 14:21:24 +0100121{
122 // Validate output
123 validate(CLAccessor(_target), _reference);
124}
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100125TEST_SUITE_END() // U8
Michele Di Giorgio4622ac12018-06-27 16:41:17 +0100126
Sanghoon Lee70f82912017-08-24 14:21:24 +0100127TEST_SUITE(S16)
Sheri Zhanga387e272021-06-29 17:34:06 +0100128FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticAdditionFixture<int16_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::SmallShapes(), framework::dataset::make("DataType",
129 DataType::S16)),
130 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
131 OutOfPlaceDataSet))
Sanghoon Lee70f82912017-08-24 14:21:24 +0100132{
133 // Validate output
134 validate(CLAccessor(_target), _reference);
135}
136
Sheri Zhanga387e272021-06-29 17:34:06 +0100137FIXTURE_DATA_TEST_CASE(RunLarge, CLArithmeticAdditionFixture<int16_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), framework::dataset::make("DataType",
138 DataType::S16)),
139 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
140 OutOfPlaceDataSet))
Sanghoon Lee70f82912017-08-24 14:21:24 +0100141{
142 // Validate output
143 validate(CLAccessor(_target), _reference);
144}
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100145TEST_SUITE_END() // S16
146TEST_SUITE_END() // Integer
147
148template <typename T>
149using CLArithmeticAdditionQuantizedFixture = ArithmeticAdditionValidationQuantizedFixture<CLTensor, CLAccessor, CLArithmeticAddition, T>;
150
151TEST_SUITE(Quantized)
152TEST_SUITE(QASYMM8)
Sheri Zhanga387e272021-06-29 17:34:06 +0100153FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticAdditionQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(datasets::SmallShapes(),
Georgios Pinitasda816752021-07-02 09:22:14 +0100154 framework::dataset::make("DataType", DataType::QASYMM8)),
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100155 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
156 framework::dataset::make("Src0QInfo", { QuantizationInfo(5.f / 255.f, 20) })),
157 framework::dataset::make("Src1QInfo", { QuantizationInfo(2.f / 255.f, 10) })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100158 framework::dataset::make("OutQInfo", { QuantizationInfo(1.f / 255.f, 5) })),
159 OutOfPlaceDataSet))
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100160{
161 // Validate output
162 validate(CLAccessor(_target), _reference);
163}
Manuel Bottinib3337582020-10-22 18:01:41 +0100164template <typename T>
165using CLArithmeticAdditionBroadcastQuantizedFixture = ArithmeticAdditionValidationQuantizedBroadcastFixture<CLTensor, CLAccessor, CLArithmeticAddition, T>;
Georgios Pinitasda816752021-07-02 09:22:14 +0100166FIXTURE_DATA_TEST_CASE(RunSmallBroadcast, CLArithmeticAdditionBroadcastQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
Sheri Zhanga387e272021-06-29 17:34:06 +0100167 combine(combine(combine(combine(combine(combine(datasets::SmallShapesBroadcast(),
168 framework::dataset::make("DataType", DataType::QASYMM8)),
169 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
170 framework::dataset::make("Src0QInfo", { QuantizationInfo(5.f / 255.f, 20) })),
171 framework::dataset::make("Src1QInfo", { QuantizationInfo(2.f / 255.f, 10) })),
172 framework::dataset::make("OutQInfo", { QuantizationInfo(1.f / 255.f, 5) })),
173 OutOfPlaceDataSet))
174{
175 // Validate output
176 validate(CLAccessor(_target), _reference);
177}
178FIXTURE_DATA_TEST_CASE(RunTinyBroadcastInPlace, CLArithmeticAdditionBroadcastQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
179 combine(combine(combine(combine(combine(combine(datasets::TinyShapesBroadcastInplace(),
180 framework::dataset::make("DataType", DataType::QASYMM8)),
181 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
182 framework::dataset::make("Src0QInfo", { QuantizationInfo(1.f / 255.f, 10) })),
183 framework::dataset::make("Src1QInfo", { QuantizationInfo(1.f / 255.f, 10) })),
184 framework::dataset::make("OutQInfo", { QuantizationInfo(1.f / 255.f, 10) })),
185 InPlaceDataSet))
Manuel Bottinib3337582020-10-22 18:01:41 +0100186{
187 // Validate output
188 validate(CLAccessor(_target), _reference);
189}
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100190TEST_SUITE_END() // QASYMM8
Kurtis Charnockec0c4122019-12-05 14:13:46 +0000191TEST_SUITE(QASYMM8_SIGNED)
Sheri Zhanga387e272021-06-29 17:34:06 +0100192FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticAdditionQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(datasets::SmallShapes(),
Georgios Pinitasda816752021-07-02 09:22:14 +0100193 framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)),
Kurtis Charnockec0c4122019-12-05 14:13:46 +0000194 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
195 framework::dataset::make("Src0QInfo", { QuantizationInfo(5.f / 255.f, 10) })),
196 framework::dataset::make("Src1QInfo", { QuantizationInfo(2.f / 255.f, 10) })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100197 framework::dataset::make("OutQInfo", { QuantizationInfo(1.f / 255.f, 5) })),
198 OutOfPlaceDataSet))
Kurtis Charnockec0c4122019-12-05 14:13:46 +0000199{
200 // Validate output
201 validate(CLAccessor(_target), _reference);
202}
203TEST_SUITE_END() // QASYMM8_SIGNED
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100204TEST_SUITE(QSYMM16)
Sheri Zhanga387e272021-06-29 17:34:06 +0100205FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticAdditionQuantizedFixture<int16_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(datasets::SmallShapes(),
Georgios Pinitasda816752021-07-02 09:22:14 +0100206 framework::dataset::make("DataType", DataType::QSYMM16)),
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100207 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
208 framework::dataset::make("Src0QInfo", { QuantizationInfo(1.f / 32768.f, 0), QuantizationInfo(5.f / 32768.f, 0) })),
209 framework::dataset::make("Src1QInfo", { QuantizationInfo(2.f / 32768.f, 0), QuantizationInfo(5.f / 32768.f, 0) })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100210 framework::dataset::make("OutQInfo", { QuantizationInfo(5.f / 32768.f, 0) })),
211 OutOfPlaceDataSet))
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100212{
213 // Validate output
214 validate(CLAccessor(_target), _reference);
215}
216TEST_SUITE_END() // QSYMM16
217TEST_SUITE_END() // Quantized
Sanghoon Lee70f82912017-08-24 14:21:24 +0100218
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000219template <typename T>
220using CLArithmeticAdditionFloatFixture = ArithmeticAdditionValidationFloatFixture<CLTensor, CLAccessor, CLArithmeticAddition, T>;
221
Sanghoon Lee70f82912017-08-24 14:21:24 +0100222TEST_SUITE(Float)
223TEST_SUITE(FP16)
Sheri Zhanga387e272021-06-29 17:34:06 +0100224FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticAdditionFloatFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallShapes(), framework::dataset::make("DataType",
Georgios Pinitasda816752021-07-02 09:22:14 +0100225 DataType::F16)),
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000226 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100227 EmptyActivationFunctionsDataset),
228 OutOfPlaceDataSet))
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000229{
230 // Validate output
231 validate(CLAccessor(_target), _reference);
232}
Sheri Zhanga387e272021-06-29 17:34:06 +0100233FIXTURE_DATA_TEST_CASE(RunWithActivation, CLArithmeticAdditionFloatFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::TinyShapes(),
234 framework::dataset::make("DataType",
235 DataType::F16)),
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000236 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100237 ActivationFunctionsDataset),
238 OutOfPlaceDataSet))
Sanghoon Lee70f82912017-08-24 14:21:24 +0100239{
240 // Validate output
241 validate(CLAccessor(_target), _reference);
242}
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100243TEST_SUITE_END() // FP16
Sanghoon Lee70f82912017-08-24 14:21:24 +0100244
245TEST_SUITE(FP32)
Sheri Zhanga387e272021-06-29 17:34:06 +0100246FIXTURE_DATA_TEST_CASE(RunSmall, CLArithmeticAdditionFloatFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallShapes(),
247 framework::dataset::make("DataType",
248 DataType::F32)),
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000249 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100250 EmptyActivationFunctionsDataset),
251 InPlaceDataSet))
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000252{
253 // Validate output
254 validate(CLAccessor(_target), _reference);
255}
Sheri Zhanga387e272021-06-29 17:34:06 +0100256FIXTURE_DATA_TEST_CASE(RunWithActivation, CLArithmeticAdditionFloatFixture<float>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::TinyShapes(),
257 framework::dataset::make("DataType",
258 DataType::F32)),
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000259 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100260 ActivationFunctionsDataset),
261 OutOfPlaceDataSet))
Sanghoon Lee70f82912017-08-24 14:21:24 +0100262{
263 // Validate output
264 validate(CLAccessor(_target), _reference);
265}
266
Sheri Zhanga387e272021-06-29 17:34:06 +0100267FIXTURE_DATA_TEST_CASE(RunLarge, CLArithmeticAdditionFloatFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeShapes(), framework::dataset::make("DataType",
Georgios Pinitasda816752021-07-02 09:22:14 +0100268 DataType::F32)),
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000269 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100270 EmptyActivationFunctionsDataset),
271 OutOfPlaceDataSet))
Sanghoon Lee70f82912017-08-24 14:21:24 +0100272{
273 // Validate output
274 validate(CLAccessor(_target), _reference);
275}
Diego Lopez Recas0021d752017-12-18 14:42:56 +0000276
277template <typename T>
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000278using CLArithmeticAdditionBroadcastFloatFixture = ArithmeticAdditionBroadcastValidationFloatFixture<CLTensor, CLAccessor, CLArithmeticAddition, T>;
Diego Lopez Recas0021d752017-12-18 14:42:56 +0000279
Sheri Zhanga387e272021-06-29 17:34:06 +0100280FIXTURE_DATA_TEST_CASE(RunSmallBroadcast, CLArithmeticAdditionBroadcastFloatFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallShapesBroadcast(),
Georgios Pinitasda816752021-07-02 09:22:14 +0100281 framework::dataset::make("DataType", DataType::F32)),
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000282 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100283 EmptyActivationFunctionsDataset),
284 OutOfPlaceDataSet))
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000285{
286 // Validate output
287 validate(CLAccessor(_target), _reference);
288}
Sheri Zhanga387e272021-06-29 17:34:06 +0100289FIXTURE_DATA_TEST_CASE(RunWithActivationBroadcast, CLArithmeticAdditionBroadcastFloatFixture<float>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::TinyShapesBroadcast(),
Georgios Pinitasda816752021-07-02 09:22:14 +0100290 framework::dataset::make("DataType", DataType::F32)),
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000291 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100292 ActivationFunctionsDataset),
293 OutOfPlaceDataSet))
Diego Lopez Recas0021d752017-12-18 14:42:56 +0000294{
295 // Validate output
296 validate(CLAccessor(_target), _reference);
297}
298
Sheri Zhanga387e272021-06-29 17:34:06 +0100299FIXTURE_DATA_TEST_CASE(RunLargeBroadcast, CLArithmeticAdditionBroadcastFloatFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeShapesBroadcast(),
Georgios Pinitasda816752021-07-02 09:22:14 +0100300 framework::dataset::make("DataType", DataType::F32)),
Giorgio Arena8b2a7d32020-02-11 17:21:31 +0000301 framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })),
Sheri Zhanga387e272021-06-29 17:34:06 +0100302 EmptyActivationFunctionsDataset),
303 OutOfPlaceDataSet))
Diego Lopez Recas0021d752017-12-18 14:42:56 +0000304{
305 // Validate output
306 validate(CLAccessor(_target), _reference);
307}
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100308TEST_SUITE_END() // FP32
309TEST_SUITE_END() // Float
Sanghoon Lee70f82912017-08-24 14:21:24 +0100310
Michele Di Giorgio6997fc92019-06-18 10:23:22 +0100311TEST_SUITE_END() // ArithmeticAddition
312TEST_SUITE_END() // CL
Sanghoon Lee70f82912017-08-24 14:21:24 +0100313} // namespace validation
314} // namespace test
315} // namespace arm_compute