blob: 1aed9dddf5e4cb9c3433e7dbf93ac633c985ec50 [file] [log] [blame]
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001/*
2 * Copyright (c) 2017 ARM Limited.
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 "Globals.h"
Anthony Barbier6ff3b192017-09-04 18:44:23 +010025#include "NEON/NEAccessor.h"
Moritz Pflanzer5b512292017-06-21 15:54:07 +010026#include "PaddingCalculator.h"
Anthony Barbier6ff3b192017-09-04 18:44:23 +010027#include "TensorLibrary.h"
28#include "TypePrinter.h"
29#include "Utils.h"
30#include "validation/Datasets.h"
31#include "validation/Reference.h"
32#include "validation/Validation.h"
33
34#include "arm_compute/core/Helpers.h"
35#include "arm_compute/core/Types.h"
36#include "arm_compute/runtime/NEON/functions/NEDepthConvert.h"
37#include "arm_compute/runtime/Tensor.h"
38#include "arm_compute/runtime/TensorAllocator.h"
39
40#include "boost_wrapper.h"
41
42#include <random>
43#include <string>
44
45using namespace arm_compute;
46using namespace arm_compute::test;
47using namespace arm_compute::test::neon;
48using namespace arm_compute::test::validation;
49
50namespace
51{
52/** Compute Neon depth convert function.
53 *
54 * @param[in] shape Shape of the input and output tensors.
55 * @param[in] dt_in Data type of input tensor.
56 * @param[in] dt_out Data type of the output tensor.
57 * @param[in] policy Conversion policy.
58 * @param[in] shift Value for down/up conversions. Must be 0 <= shift < 8.
59 * @param[in] fixed_point_position Fixed point position.
60 *
61 * @return Computed output tensor.
62 */
63Tensor compute_depth_convert(const TensorShape &shape, DataType dt_in, DataType dt_out, ConvertPolicy policy, uint32_t shift, uint32_t fixed_point_position)
64{
65 // Create tensors
Moritz Pflanzer94450f12017-06-30 12:48:43 +010066 Tensor src = create_tensor<Tensor>(shape, dt_in, 1, fixed_point_position);
67 Tensor dst = create_tensor<Tensor>(shape, dt_out, 1, fixed_point_position);
Anthony Barbier6ff3b192017-09-04 18:44:23 +010068
69 // Create and configure function
70 NEDepthConvert depth_convert;
71 depth_convert.configure(&src, &dst, policy, shift);
72
73 // Allocate tensors
74 src.allocator()->allocate();
75 dst.allocator()->allocate();
76
77 BOOST_TEST(!src.info()->is_resizable());
78 BOOST_TEST(!dst.info()->is_resizable());
79
80 // Fill tensors
81 library->fill_tensor_uniform(NEAccessor(src), 0);
82
83 // Compute function
84 depth_convert.run();
85
86 return dst;
87}
88/** Configure and validate region/padding function.
89 *
90 * @param[in] shape Shape of the input and output tensors.
91 * @param[in] dt_in Data type of input tensor.
92 * @param[in] dt_out Data type of the output tensor.
93 * @param[in] policy Conversion policy.
94 * @param[in] shift Value for down/up conversions. Must be 0 <= shift < 8.
95 * @param[in] fixed_point_position Fixed point position.
96 *
97 */
98
99void compute_configure_validate(const TensorShape &shape, DataType dt_in, DataType dt_out, ConvertPolicy policy, uint32_t shift, uint32_t fixed_point_position)
100{
101 // Create tensors
Moritz Pflanzer94450f12017-06-30 12:48:43 +0100102 Tensor src = create_tensor<Tensor>(shape, dt_in, 1, fixed_point_position);
103 Tensor dst = create_tensor<Tensor>(shape, dt_out, 1, fixed_point_position);
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100104
105 BOOST_TEST(src.info()->is_resizable());
106 BOOST_TEST(dst.info()->is_resizable());
107
108 // Create and configure function
109 NEDepthConvert depth_convert;
110 depth_convert.configure(&src, &dst, policy, shift);
111
112 // Validate valid region
113 const ValidRegion valid_region = shape_to_valid_region(shape);
114 validate(src.info()->valid_region(), valid_region);
115 validate(dst.info()->valid_region(), valid_region);
116
117 // Validate padding
Moritz Pflanzer2509fba2017-06-23 14:15:03 +0100118 const PaddingSize padding = PaddingCalculator(shape.x(), 16).required_padding();
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100119 validate(src.info()->padding(), padding);
120 validate(dst.info()->padding(), padding);
121}
122} // namespace
123
124#ifndef DOXYGEN_SKIP_THIS
125BOOST_AUTO_TEST_SUITE(NEON)
126BOOST_AUTO_TEST_SUITE(DepthConvert)
127
128BOOST_AUTO_TEST_SUITE(QS8_to_F32)
129BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
130BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::unit_test::data::make({ ConvertPolicy::SATURATE })
131 * boost::unit_test::data::xrange(1, 7, 1),
132 shape, policy, fixed_point_position)
133{
134 // Compute configure and validate region/padding
135 compute_configure_validate(shape, DataType::QS8, DataType::F32, policy, 0, fixed_point_position);
136}
137
138BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit"))
139BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE })
140 * boost::unit_test::data::xrange(1, 7, 1),
141 shape, policy, fixed_point_position)
142{
143 // Compute function
144 Tensor dst = compute_depth_convert(shape, DataType::QS8, DataType::F32, policy, 0, fixed_point_position);
145
146 // Compute reference
147 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::QS8, DataType::F32, policy, 0, fixed_point_position);
148
149 // Validate output
150 validate(NEAccessor(dst), ref_dst);
151}
152
153BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
154BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE })
155 * boost::unit_test::data::xrange(1, 7, 1),
156 shape, policy, fixed_point_position)
157{
158 // Compute function
159 Tensor dst = compute_depth_convert(shape, DataType::QS8, DataType::F32, policy, 0, fixed_point_position);
160
161 // Compute reference
162 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::QS8, DataType::F32, policy, 0, fixed_point_position);
163
164 // Validate output
165 validate(NEAccessor(dst), ref_dst);
166}
167
168BOOST_AUTO_TEST_SUITE_END()
169
170BOOST_AUTO_TEST_SUITE(F32_to_QS8)
171BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
172BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::unit_test::data::make({ ConvertPolicy::SATURATE })
173 * boost::unit_test::data::xrange(1, 7, 1),
174 shape, policy, fixed_point_position)
175{
176 // Compute configure and validate region/padding
177 compute_configure_validate(shape, DataType::F32, DataType::QS8, policy, 0, fixed_point_position);
178}
179
180BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit"))
181BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE })
182 * boost::unit_test::data::xrange(1, 7, 1),
183 shape, policy, fixed_point_position)
184{
185 // Compute function
186 Tensor dst = compute_depth_convert(shape, DataType::F32, DataType::QS8, policy, 0, fixed_point_position);
187
188 // Compute reference
189 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::F32, DataType::QS8, policy, 0, fixed_point_position);
190
191 // Validate output
192 validate(NEAccessor(dst), ref_dst);
193}
194
195BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
196BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE })
197 * boost::unit_test::data::xrange(1, 7, 1),
198 shape, policy, fixed_point_position)
199{
200 // Compute function
201 Tensor dst = compute_depth_convert(shape, DataType::F32, DataType::QS8, policy, 0, fixed_point_position);
202
203 // Compute reference
204 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::F32, DataType::QS8, policy, 0, fixed_point_position);
205
206 // Validate output
207 validate(NEAccessor(dst), ref_dst);
208}
209BOOST_AUTO_TEST_SUITE_END()
210
211BOOST_AUTO_TEST_SUITE(U8_to_U16)
212BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
213
214BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
215 * boost::unit_test::data::xrange(0, 7, 1),
216 shape, policy, shift)
217{
218 // Compute configure and validate region/padding
219 compute_configure_validate(shape, DataType::U8, DataType::U16, policy, shift, 0);
220}
221
222BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit"))
223BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
224 * boost::unit_test::data::xrange(0, 7, 1),
225 shape, policy, shift)
226{
227 // Compute function
228 Tensor dst = compute_depth_convert(shape, DataType::U8, DataType::U16, policy, shift, 0);
229
230 // Compute reference
231 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::U16, policy, shift, 0);
232
233 // Validate output
234 validate(NEAccessor(dst), ref_dst);
235}
236BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
237BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
238 * boost::unit_test::data::xrange(0, 7, 1),
239 shape, policy, shift)
240{
241 // Compute function
242 Tensor dst = compute_depth_convert(shape, DataType::U8, DataType::U16, policy, shift, 0);
243
244 // Compute reference
245 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::U16, policy, shift, 0);
246
247 // Validate output
248 validate(NEAccessor(dst), ref_dst);
249}
250BOOST_AUTO_TEST_SUITE_END()
251
252BOOST_AUTO_TEST_SUITE(U8_to_S16)
253BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
254BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
255 * boost::unit_test::data::xrange(0, 7, 1),
256 shape, policy, shift)
257{
258 // Compute configure and validate region/padding
259 compute_configure_validate(shape, DataType::U8, DataType::S16, policy, shift, 0);
260}
261
262BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit"))
263BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
264 * boost::unit_test::data::xrange(0, 7, 1),
265 shape, policy, shift)
266{
267 // Compute function
268 Tensor dst = compute_depth_convert(shape, DataType::U8, DataType::S16, policy, shift, 0);
269
270 // Compute reference
271 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::S16, policy, shift, 0);
272
273 // Validate output
274 validate(NEAccessor(dst), ref_dst);
275}
276
277BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
278BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
279 * boost::unit_test::data::xrange(0, 7, 1),
280 shape, policy, shift)
281{
282 // Compute function
283 Tensor dst = compute_depth_convert(shape, DataType::U8, DataType::S16, policy, shift, 0);
284
285 // Compute reference
286 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::S16, policy, shift, 0);
287
288 // Validate output
289 validate(NEAccessor(dst), ref_dst);
290}
291BOOST_AUTO_TEST_SUITE_END()
292
293BOOST_AUTO_TEST_SUITE(U8_to_S32)
294BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
295BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
296 * boost::unit_test::data::xrange(0, 7, 1),
297 shape, policy, shift)
298{
299 // Compute configure and validate region/padding
300 compute_configure_validate(shape, DataType::U8, DataType::S32, policy, shift, 0);
301}
302
303BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit"))
304BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
305 * boost::unit_test::data::xrange(0, 7, 1),
306 shape, policy, shift)
307{
308 // Compute function
309 Tensor dst = compute_depth_convert(shape, DataType::U8, DataType::S32, policy, shift, 0);
310
311 // Compute reference
312 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::S32, policy, shift, 0);
313
314 // Validate output
315 validate(NEAccessor(dst), ref_dst);
316}
317
318BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
319BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
320 * boost::unit_test::data::xrange(0, 7, 1),
321 shape, policy, shift)
322{
323 // Compute function
324 Tensor dst = compute_depth_convert(shape, DataType::U8, DataType::S32, policy, shift, 0);
325
326 // Compute reference
327 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::S32, policy, shift, 0);
328
329 // Validate output
330 validate(NEAccessor(dst), ref_dst);
331}
332BOOST_AUTO_TEST_SUITE_END()
333
334BOOST_AUTO_TEST_SUITE(U16_to_U8)
335BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
336BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
337 * boost::unit_test::data::xrange(0, 7, 1),
338 shape, policy, shift)
339{
340 // Compute configure and validate region/padding
341 compute_configure_validate(shape, DataType::U16, DataType::U8, policy, shift, 0);
342}
343
344BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit"))
345BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
346 * boost::unit_test::data::xrange(0, 7, 1),
347 shape, policy, shift)
348{
349 // Compute function
350 Tensor dst = compute_depth_convert(shape, DataType::U16, DataType::U8, policy, shift, 0);
351
352 // Compute reference
353 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U16, DataType::U8, policy, shift, 0);
354
355 // Validate output
356 validate(NEAccessor(dst), ref_dst);
357}
358
359BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
360BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
361 * boost::unit_test::data::xrange(0, 7, 1),
362 shape, policy, shift)
363{
364 // Compute function
365 Tensor dst = compute_depth_convert(shape, DataType::U16, DataType::U8, policy, shift, 0);
366
367 // Compute reference
368 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U16, DataType::U8, policy, shift, 0);
369
370 // Validate output
371 validate(NEAccessor(dst), ref_dst);
372}
373BOOST_AUTO_TEST_SUITE_END()
374
375BOOST_AUTO_TEST_SUITE(U16_to_U32)
376BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
377BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
378 * boost::unit_test::data::xrange(0, 7, 1),
379 shape, policy, shift)
380{
381 // Compute configure and validate region/padding
382 compute_configure_validate(shape, DataType::U16, DataType::U32, policy, shift, 0);
383}
384
385BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit"))
386BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
387 * boost::unit_test::data::xrange(0, 7, 1),
388 shape, policy, shift)
389{
390 // Compute function
391 Tensor dst = compute_depth_convert(shape, DataType::U16, DataType::U32, policy, shift, 0);
392
393 // Compute reference
394 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U16, DataType::U32, policy, shift, 0);
395
396 // Validate output
397 validate(NEAccessor(dst), ref_dst);
398}
399
400BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
401BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
402 * boost::unit_test::data::xrange(0, 7, 1),
403 shape, policy, shift)
404{
405 // Compute function
406 Tensor dst = compute_depth_convert(shape, DataType::U16, DataType::U32, policy, shift, 0);
407
408 // Compute reference
409 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U16, DataType::U32, policy, shift, 0);
410
411 // Validate output
412 validate(NEAccessor(dst), ref_dst);
413}
414BOOST_AUTO_TEST_SUITE_END()
415
416BOOST_AUTO_TEST_SUITE(S16_to_U8)
417BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
418BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
419 * boost::unit_test::data::xrange(0, 7, 1),
420 shape, policy, shift)
421{
422 // Compute configure and validate region/padding
423 compute_configure_validate(shape, DataType::S16, DataType::U8, policy, shift, 0);
424}
425
426BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit"))
427BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
428 * boost::unit_test::data::xrange(0, 7, 1),
429 shape, policy, shift)
430{
431 // Compute function
432 Tensor dst = compute_depth_convert(shape, DataType::S16, DataType::U8, policy, shift, 0);
433
434 // Compute reference
435 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::S16, DataType::U8, policy, shift, 0);
436
437 // Validate output
438 validate(NEAccessor(dst), ref_dst);
439}
440
441BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
442BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
443 * boost::unit_test::data::xrange(0, 7, 1),
444 shape, policy, shift)
445{
446 // Compute function
447 Tensor dst = compute_depth_convert(shape, DataType::S16, DataType::U8, policy, shift, 0);
448
449 // Compute reference
450 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::S16, DataType::U8, policy, shift, 0);
451
452 // Validate output
453 validate(NEAccessor(dst), ref_dst);
454}
455BOOST_AUTO_TEST_SUITE_END()
456
457BOOST_AUTO_TEST_SUITE(S16_to_S32)
458BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::label("nightly"))
459BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
460 * boost::unit_test::data::xrange(0, 7, 1),
461 shape, policy, shift)
462{
463 // Compute configure and validate region/padding
464 compute_configure_validate(shape, DataType::S16, DataType::S32, policy, shift, 0);
465}
466
467BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit"))
468BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
469 * boost::unit_test::data::xrange(0, 7, 1),
470 shape, policy, shift)
471{
472 // Compute function
473 Tensor dst = compute_depth_convert(shape, DataType::S16, DataType::S32, policy, shift, 0);
474
475 // Compute reference
476 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::S16, DataType::S32, policy, shift, 0);
477
478 // Validate output
479 validate(NEAccessor(dst), ref_dst);
480}
481
482BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
483BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP })
484 * boost::unit_test::data::xrange(0, 7, 1),
485 shape, policy, shift)
486{
487 // Compute function
488 Tensor dst = compute_depth_convert(shape, DataType::S16, DataType::S32, policy, shift, 0);
489
490 // Compute reference
491 RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::S16, DataType::S32, policy, shift, 0);
492
493 // Validate output
494 validate(NEAccessor(dst), ref_dst);
495}
496BOOST_AUTO_TEST_SUITE_END()
497
498BOOST_AUTO_TEST_SUITE_END()
499BOOST_AUTO_TEST_SUITE_END()
500#endif