blob: de61c487e6d70c5a637494fcd4a69e14f40f4834 [file] [log] [blame]
giuros01164a2722018-11-20 18:34:46 +00001/*
Georgios Pinitas587708b2018-12-31 15:43:52 +00002 * Copyright (c) 2018-2019 ARM Limited.
giuros01164a2722018-11-20 18:34:46 +00003 *
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#ifndef ARM_COMPUTE_TEST_ELEMENTWISE_OPERATIONS_FIXTURE
25#define ARM_COMPUTE_TEST_ELEMENTWISE_OPERATIONS_FIXTURE
26
27#include "arm_compute/core/TensorShape.h"
28#include "arm_compute/core/Types.h"
29#include "tests/AssetsLibrary.h"
30#include "tests/Globals.h"
31#include "tests/IAccessor.h"
32#include "tests/framework/Asserts.h"
33#include "tests/framework/Fixture.h"
34#include "tests/validation/Helpers.h"
35#include "tests/validation/reference/ElementwiseOperations.h"
36
37namespace arm_compute
38{
39namespace test
40{
41namespace validation
42{
43template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
44class ArithmeticOperationsGenericFixture : public framework::Fixture
45{
46public:
47 template <typename...>
48 void setup(ArithmeticOperation op, const TensorShape &shape0, const TensorShape &shape1,
49 DataType data_type0, DataType data_type1, DataType output_data_type,
50 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
51 {
52 _op = op;
53 _target = compute_target(shape0, shape1, data_type0, data_type1, output_data_type, qinfo0, qinfo1, qinfo_out);
54 _reference = compute_reference(shape0, shape1, data_type0, data_type1, output_data_type, qinfo0, qinfo1, qinfo_out);
55 }
56
57protected:
58 template <typename U>
59 void fill(U &&tensor, int i)
60 {
Usama Arif81e671e2019-05-13 13:33:14 +010061 switch(_op)
62 {
63 case ArithmeticOperation::DIV:
64 library->fill_tensor_uniform_ranged(tensor, i, { std::pair<float, float>(-0.001f, 0.001f) });
65 break;
66 case ArithmeticOperation::POWER:
67 library->fill_tensor_uniform(tensor, i, 0.0f, 5.0f);
68 break;
69 default:
70 library->fill_tensor_uniform(tensor, i);
71 }
giuros01164a2722018-11-20 18:34:46 +000072 }
73
74 TensorType compute_target(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type,
75 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
76 {
77 // Create tensors
78 TensorType ref_src1 = create_tensor<TensorType>(shape0, data_type0, 1, qinfo0);
79 TensorType ref_src2 = create_tensor<TensorType>(shape1, data_type1, 1, qinfo1);
80 TensorType dst = create_tensor<TensorType>(TensorShape::broadcast_shape(shape0, shape1), output_data_type, 1, qinfo_out);
81
82 // Create and configure function
83 FunctionType elem_op;
84 elem_op.configure(&ref_src1, &ref_src2, &dst);
85
86 ARM_COMPUTE_EXPECT(ref_src1.info()->is_resizable(), framework::LogLevel::ERRORS);
87 ARM_COMPUTE_EXPECT(ref_src2.info()->is_resizable(), framework::LogLevel::ERRORS);
88 ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS);
89
90 // Allocate tensors
91 ref_src1.allocator()->allocate();
92 ref_src2.allocator()->allocate();
93 dst.allocator()->allocate();
94
95 ARM_COMPUTE_EXPECT(!ref_src1.info()->is_resizable(), framework::LogLevel::ERRORS);
96 ARM_COMPUTE_EXPECT(!ref_src2.info()->is_resizable(), framework::LogLevel::ERRORS);
97 ARM_COMPUTE_EXPECT(!dst.info()->is_resizable(), framework::LogLevel::ERRORS);
98
99 // Fill tensors
100 fill(AccessorType(ref_src1), 0);
101 fill(AccessorType(ref_src2), 1);
102
103 // Compute function
104 elem_op.run();
105
106 return dst;
107 }
108
109 SimpleTensor<T> compute_reference(const TensorShape &shape0, const TensorShape &shape1,
110 DataType data_type0, DataType data_type1, DataType output_data_type,
111 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
112 {
113 // Create reference
114 SimpleTensor<T> ref_src1{ shape0, data_type0, 1, qinfo0 };
115 SimpleTensor<T> ref_src2{ shape1, data_type1, 1, qinfo1 };
116 SimpleTensor<T> ref_dst{ TensorShape::broadcast_shape(shape0, shape1), output_data_type, 1, qinfo_out };
117
118 // Fill reference
119 fill(ref_src1, 0);
120 fill(ref_src2, 1);
121
122 return reference::arithmetic_operation<T>(_op, ref_src1, ref_src2, ref_dst);
123 }
124
125 TensorType _target{};
126 SimpleTensor<T> _reference{};
127 ArithmeticOperation _op{ ArithmeticOperation::ADD };
128};
129
130template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
131class ArithmeticDivisionBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
132{
133public:
134 template <typename...>
135 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type)
136 {
137 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::DIV, shape0, shape1,
138 data_type0, data_type1, output_data_type,
139 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
140 }
141};
142
143template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
144class ArithmeticDivisionValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
145{
146public:
147 template <typename...>
148 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type)
149 {
150 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::DIV, shape, shape,
151 data_type0, data_type1, output_data_type,
152 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
153 }
154};
155
156template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
157class ArithmeticDivisionValidationQuantizedFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
158{
159public:
160 template <typename...>
161 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type,
162 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
163
164 {
165 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::DIV, shape, shape,
166 data_type0, data_type1, output_data_type,
167 qinfo0, qinfo1, qinfo_out);
168 }
169};
170
171template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
172class ElementwiseMaxBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
173{
174public:
175 template <typename...>
176 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type)
177 {
178 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::MAX, shape0, shape1,
179 data_type0, data_type1, output_data_type,
180 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
181 }
182};
183
184template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
185class ElementwiseMaxValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
186{
187public:
188 template <typename...>
189 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type)
190 {
191 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::MAX, shape, shape,
192 data_type0, data_type1, output_data_type,
193 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
194 }
195};
196
197template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
198class ElementwiseMaxValidationQuantizedFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
199{
200public:
201 template <typename...>
202 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type,
203 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
204
205 {
206 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::MAX, shape, shape,
207 data_type0, data_type1, output_data_type,
208 qinfo0, qinfo1, qinfo_out);
209 }
210};
211
212template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
giuros0192fd9432018-12-03 17:30:00 +0000213class ElementwiseMaxQuantizedBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
214{
215public:
216 template <typename...>
217 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type,
218 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
219
220 {
221 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::MAX, shape0, shape1,
222 data_type0, data_type1, output_data_type,
223 qinfo0, qinfo1, qinfo_out);
224 }
225};
226
227template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
giuros01164a2722018-11-20 18:34:46 +0000228class ElementwiseMinBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
229{
230public:
231 template <typename...>
232 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type)
233 {
234 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::MIN, shape0, shape1,
235 data_type0, data_type1, output_data_type,
236 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
237 }
238};
239
240template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
241class ElementwiseMinValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
242{
243public:
244 template <typename...>
245 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type)
246 {
247 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::MIN, shape, shape,
248 data_type0, data_type1, output_data_type,
249 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
250 }
251};
252
253template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
254class ElementwiseMinValidationQuantizedFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
255{
256public:
257 template <typename...>
258 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type,
259 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
260
261 {
262 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::MIN, shape, shape,
263 data_type0, data_type1, output_data_type,
264 qinfo0, qinfo1, qinfo_out);
265 }
266};
267
268template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
giuros0192fd9432018-12-03 17:30:00 +0000269class ElementwiseMinQuantizedBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
270{
271public:
272 template <typename...>
273 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type,
274 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
275
276 {
277 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::MIN, shape0, shape1,
278 data_type0, data_type1, output_data_type,
279 qinfo0, qinfo1, qinfo_out);
280 }
281};
282
283template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
giuros01164a2722018-11-20 18:34:46 +0000284class ElementwiseSquaredDiffBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
285{
286public:
287 template <typename...>
288 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type)
289 {
290 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::SQUARED_DIFF, shape0, shape1,
291 data_type0, data_type1, output_data_type,
292 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
293 }
294};
295
296template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
297class ElementwiseSquaredDiffValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
298{
299public:
300 template <typename...>
301 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type)
302 {
303 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::SQUARED_DIFF, shape, shape,
304 data_type0, data_type1, output_data_type,
305 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
306 }
307};
308
309template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
310class ElementwiseSquaredDiffValidationQuantizedFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
311{
312public:
313 template <typename...>
314 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type,
315 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
316
317 {
318 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::SQUARED_DIFF, shape, shape,
319 data_type0, data_type1, output_data_type,
320 qinfo0, qinfo1, qinfo_out);
321 }
322};
giuros0192fd9432018-12-03 17:30:00 +0000323
324template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
325class ElementwiseSquaredDiffQuantizedBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
326{
327public:
328 template <typename...>
329 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type,
330 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
331
332 {
333 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::SQUARED_DIFF, shape0, shape1,
334 data_type0, data_type1, output_data_type,
335 qinfo0, qinfo1, qinfo_out);
336 }
337};
George Worta1e7e282019-01-15 11:00:29 +0000338
339template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
giuros011e6e1b82019-05-14 16:12:53 +0100340class PReluLayerBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
341{
342public:
343 template <typename...>
344 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type)
345 {
346 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::PRELU, shape0, shape1,
347 data_type0, data_type1, output_data_type,
348 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
349 }
350};
351
352template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
353class PReluLayerValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
354{
355public:
356 template <typename...>
357 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type)
358 {
359 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::PRELU, shape, shape,
360 data_type0, data_type1, output_data_type,
361 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
362 }
363};
364
365template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
366class PReluLayerValidationQuantizedFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
367{
368public:
369 template <typename...>
370 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type,
371 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
372
373 {
374 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::PRELU, shape, shape,
375 data_type0, data_type1, output_data_type,
376 qinfo0, qinfo1, qinfo_out);
377 }
378};
379
380template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
381class PReluLayerQuantizedBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
382{
383public:
384 template <typename...>
385 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type,
386 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
387
388 {
389 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::PRELU, shape0, shape1,
390 data_type0, data_type1, output_data_type,
391 qinfo0, qinfo1, qinfo_out);
392 }
393};
394
395template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
George Worta1e7e282019-01-15 11:00:29 +0000396class ElementwiseDivisionBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
397{
398public:
399 template <typename...>
400 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type)
401 {
402 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::DIV, shape0, shape1,
403 data_type0, data_type1, output_data_type,
404 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
405 }
406};
407
408template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
409class ElementwiseDivisionValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
410{
411public:
412 template <typename...>
413 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type)
414 {
415 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::DIV, shape, shape,
416 data_type0, data_type1, output_data_type,
417 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
418 }
419};
420
421template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
422class ElementwiseDivisionValidationQuantizedFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
423{
424public:
425 template <typename...>
426 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type,
427 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
428
429 {
430 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::DIV, shape, shape,
431 data_type0, data_type1, output_data_type,
432 qinfo0, qinfo1, qinfo_out);
433 }
434};
435
436template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
437class ElementwiseDivisionQuantizedBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
438{
439public:
440 template <typename...>
441 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type,
442 QuantizationInfo qinfo0, QuantizationInfo qinfo1, QuantizationInfo qinfo_out)
443
444 {
445 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::DIV, shape0, shape1,
446 data_type0, data_type1, output_data_type,
447 qinfo0, qinfo1, qinfo_out);
448 }
449};
450
Usama Arif81e671e2019-05-13 13:33:14 +0100451template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
452class ElementwisePowerBroadcastValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
453{
454public:
455 template <typename...>
456 void setup(const TensorShape &shape0, const TensorShape &shape1, DataType data_type0, DataType data_type1, DataType output_data_type)
457 {
458 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::POWER, shape0, shape1,
459 data_type0, data_type1, output_data_type,
460 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
461 }
462};
463
464template <typename TensorType, typename AccessorType, typename FunctionType, typename T>
465class ElementwisePowerValidationFixture : public ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>
466{
467public:
468 template <typename...>
469 void setup(const TensorShape &shape, DataType data_type0, DataType data_type1, DataType output_data_type)
470 {
471 ArithmeticOperationsGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(ArithmeticOperation::POWER, shape, shape,
472 data_type0, data_type1, output_data_type,
473 QuantizationInfo(), QuantizationInfo(), QuantizationInfo());
474 }
475};
476
giuros01164a2722018-11-20 18:34:46 +0000477} // namespace validation
478} // namespace test
479} // namespace arm_compute
480#endif /* ARM_COMPUTE_TEST_ARITHMETIC_OPERATIONS_FIXTURE */