blob: c9ff7d6b95074d0184e9462cff18a3b528cf2533 [file] [log] [blame]
Moritz Pflanzer7655a672017-09-23 11:57:33 +01001/*
Michalis Spyrou5c9f0c42019-01-16 14:48:48 +00002 * Copyright (c) 2017-2019 ARM Limited.
Moritz Pflanzer7655a672017-09-23 11:57:33 +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,
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/Types.h"
25#include "arm_compute/runtime/NEON/functions/NESobel3x3.h"
26#include "arm_compute/runtime/NEON/functions/NESobel5x5.h"
27#include "arm_compute/runtime/NEON/functions/NESobel7x7.h"
28#include "arm_compute/runtime/Tensor.h"
29#include "arm_compute/runtime/TensorAllocator.h"
30#include "tests/NEON/Accessor.h"
31#include "tests/PaddingCalculator.h"
32#include "tests/datasets/BorderModeDataset.h"
33#include "tests/datasets/ShapeDatasets.h"
34#include "tests/framework/Asserts.h"
35#include "tests/framework/Macros.h"
36#include "tests/framework/datasets/Datasets.h"
37#include "tests/validation/Validation.h"
38#include "tests/validation/fixtures/SobelFixture.h"
39
40namespace arm_compute
41{
42namespace test
43{
44namespace validation
45{
46TEST_SUITE(NEON)
47TEST_SUITE(Sobel)
48
49TEST_SUITE(W3x3)
50using NESobel3x3Fixture = SobelValidationFixture<Tensor, Accessor, NESobel3x3, uint8_t, int16_t>;
51
Michalis Spyrou5c9f0c42019-01-16 14:48:48 +000052DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
Moritz Pflanzer7655a672017-09-23 11:57:33 +010053 Format::U8)),
54 shape, border_mode, format)
55{
56 // Generate a random constant value
57 std::mt19937 gen(library->seed());
58 std::uniform_int_distribution<uint8_t> int_dist(0, 255);
59 const uint8_t constant_border_value = int_dist(gen);
60
61 // Create tensors
62 Tensor src = create_tensor<Tensor>(shape, data_type_from_format(format));
63 Tensor dst_x = create_tensor<Tensor>(shape, DataType::S16);
64 Tensor dst_y = create_tensor<Tensor>(shape, DataType::S16);
65
66 src.info()->set_format(format);
67 dst_x.info()->set_format(Format::S16);
68 dst_y.info()->set_format(Format::S16);
69
70 ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS);
71 ARM_COMPUTE_EXPECT(dst_x.info()->is_resizable(), framework::LogLevel::ERRORS);
72 ARM_COMPUTE_EXPECT(dst_y.info()->is_resizable(), framework::LogLevel::ERRORS);
73
74 // Create sobel 3x3 configure function
75 NESobel3x3 sobel;
76 sobel.configure(&src, &dst_x, &dst_y, border_mode, constant_border_value);
77
78 // Validate valid region
79 constexpr BorderSize border_size{ 1 };
80 const ValidRegion dst_valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size);
81
82 validate(dst_x.info()->valid_region(), dst_valid_region);
83 validate(dst_y.info()->valid_region(), dst_valid_region);
84
85 // Validate padding
86 PaddingCalculator calculator(shape.x(), 8);
87
88 calculator.set_border_mode(border_mode);
89 calculator.set_border_size(1);
90
91 const PaddingSize dst_padding = calculator.required_padding();
92
93 calculator.set_accessed_elements(16);
94 calculator.set_access_offset(-1);
95
96 const PaddingSize src_padding = calculator.required_padding();
97
98 validate(src.info()->padding(), src_padding);
99 validate(dst_x.info()->padding(), dst_padding);
100 validate(dst_y.info()->padding(), dst_padding);
101}
102
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000103TEST_SUITE(X)
104FIXTURE_DATA_TEST_CASE(RunSmall, NESobel3x3Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
105 Format::U8)),
106 framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
107{
108 // Validate output
109 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
110 validate(Accessor(_target.first), _reference.first, valid_region_x);
111}
112
113FIXTURE_DATA_TEST_CASE(RunLarge, NESobel3x3Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
114 Format::U8)),
115 framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
116{
117 // Validate output
118 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
119 validate(Accessor(_target.first), _reference.first, valid_region_x);
120}
121TEST_SUITE_END()
122TEST_SUITE(Y)
123FIXTURE_DATA_TEST_CASE(RunSmall, NESobel3x3Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
124 Format::U8)),
125 framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
126{
127 // Validate output
128 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
129 validate(Accessor(_target.second), _reference.second, valid_region_y);
130}
131
132FIXTURE_DATA_TEST_CASE(RunLarge, NESobel3x3Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
133 Format::U8)),
134 framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
135{
136 // Validate output
137 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
138 validate(Accessor(_target.second), _reference.second, valid_region_y);
139}
140TEST_SUITE_END()
141TEST_SUITE(XY)
142FIXTURE_DATA_TEST_CASE(RunSmall, NESobel3x3Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
143 Format::U8)),
144 framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100145{
146 // Validate output
147 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
148 validate(Accessor(_target.first), _reference.first, valid_region_x);
149
150 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
151 validate(Accessor(_target.second), _reference.second, valid_region_y);
152}
153
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000154FIXTURE_DATA_TEST_CASE(RunLarge, NESobel3x3Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
155 Format::U8)),
156 framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100157{
158 // Validate output
159 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
160 validate(Accessor(_target.first), _reference.first, valid_region_x);
161
162 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
163 validate(Accessor(_target.second), _reference.second, valid_region_y);
164}
165TEST_SUITE_END()
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000166TEST_SUITE_END()
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100167
168TEST_SUITE(W5x5)
169using NESobel5x5Fixture = SobelValidationFixture<Tensor, Accessor, NESobel5x5, uint8_t, int16_t>;
170
Michalis Spyrou5c9f0c42019-01-16 14:48:48 +0000171DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100172 Format::U8)),
173 shape, border_mode, format)
174{
175 // Generate a random constant value
176 std::mt19937 gen(library->seed());
177 std::uniform_int_distribution<uint8_t> int_dist(0, 255);
178 const uint8_t constant_border_value = int_dist(gen);
179
180 // Create tensors
181 Tensor src = create_tensor<Tensor>(shape, data_type_from_format(format));
182 Tensor dst_x = create_tensor<Tensor>(shape, DataType::S16);
183 Tensor dst_y = create_tensor<Tensor>(shape, DataType::S16);
184
185 src.info()->set_format(format);
186 dst_x.info()->set_format(Format::S16);
187 dst_y.info()->set_format(Format::S16);
188
189 ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS);
190 ARM_COMPUTE_EXPECT(dst_x.info()->is_resizable(), framework::LogLevel::ERRORS);
191 ARM_COMPUTE_EXPECT(dst_y.info()->is_resizable(), framework::LogLevel::ERRORS);
192
193 // Create sobel 5x5 configure function
194 NESobel5x5 sobel;
195 sobel.configure(&src, &dst_x, &dst_y, border_mode, constant_border_value);
196
197 // Validate valid region
198 constexpr BorderSize border_size{ 2 };
199 const ValidRegion dst_valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size);
200
201 validate(dst_x.info()->valid_region(), dst_valid_region);
202 validate(dst_y.info()->valid_region(), dst_valid_region);
203
204 // Validate padding
205 PaddingCalculator calculator(shape.x(), 16);
206
207 calculator.set_border_mode(border_mode);
208 calculator.set_border_size(2);
209
210 const PaddingSize dst_padding = calculator.required_padding();
211
212 calculator.set_processed_elements(8);
213 calculator.set_access_offset(-2);
214
215 const PaddingSize src_padding = calculator.required_padding();
216
217 validate(src.info()->padding(), src_padding);
218 validate(dst_x.info()->padding(), dst_padding);
219 validate(dst_y.info()->padding(), dst_padding);
220}
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000221TEST_SUITE(X)
222FIXTURE_DATA_TEST_CASE(RunSmall, NESobel5x5Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
223 Format::U8)),
224 framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
225{
226 // Validate output
227 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
228 validate(Accessor(_target.first), _reference.first, valid_region_x);
229}
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100230
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000231FIXTURE_DATA_TEST_CASE(RunLarge, NESobel5x5Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
232 Format::U8)),
233 framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
234{
235 // Validate output
236 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
237 validate(Accessor(_target.first), _reference.first, valid_region_x);
238}
239TEST_SUITE_END()
240TEST_SUITE(Y)
241FIXTURE_DATA_TEST_CASE(RunSmall, NESobel5x5Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
242 Format::U8)),
243 framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
244{
245 // Validate output
246 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
247 validate(Accessor(_target.second), _reference.second, valid_region_y);
248}
249
250FIXTURE_DATA_TEST_CASE(RunLarge, NESobel5x5Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
251 Format::U8)),
252 framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
253{
254 // Validate output
255 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
256 validate(Accessor(_target.second), _reference.second, valid_region_y);
257}
258TEST_SUITE_END()
259TEST_SUITE(XY)
260FIXTURE_DATA_TEST_CASE(RunSmall, NESobel5x5Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
261 Format::U8)),
262 framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100263{
264 // Validate output
265 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
266 validate(Accessor(_target.first), _reference.first, valid_region_x);
267
268 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
269 validate(Accessor(_target.second), _reference.second, valid_region_y);
270}
271
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000272FIXTURE_DATA_TEST_CASE(RunLarge, NESobel5x5Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
273 Format::U8)),
274 framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100275{
276 // Validate output
277 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
278 validate(Accessor(_target.first), _reference.first, valid_region_x);
279
280 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
281 validate(Accessor(_target.second), _reference.second, valid_region_y);
282}
283TEST_SUITE_END()
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000284TEST_SUITE_END()
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100285
286TEST_SUITE(W7x7)
287using NESobel7x7Fixture = SobelValidationFixture<Tensor, Accessor, NESobel7x7, uint8_t, int32_t>;
288
Michalis Spyrou5c9f0c42019-01-16 14:48:48 +0000289DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100290 Format::U8)),
291 shape, border_mode, format)
292{
293 // Generate a random constant value
294 std::mt19937 gen(library->seed());
295 std::uniform_int_distribution<uint8_t> int_dist(0, 255);
296 const uint8_t constant_border_value = int_dist(gen);
297
298 // Create tensors
299 Tensor src = create_tensor<Tensor>(shape, data_type_from_format(format));
300 Tensor dst_x = create_tensor<Tensor>(shape, DataType::S32);
301 Tensor dst_y = create_tensor<Tensor>(shape, DataType::S32);
302
303 src.info()->set_format(format);
304 dst_x.info()->set_format(Format::S32);
305 dst_y.info()->set_format(Format::S32);
306
307 ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS);
308 ARM_COMPUTE_EXPECT(dst_x.info()->is_resizable(), framework::LogLevel::ERRORS);
309 ARM_COMPUTE_EXPECT(dst_y.info()->is_resizable(), framework::LogLevel::ERRORS);
310
311 // Create sobel 7x7 configure function
312 NESobel7x7 sobel;
313 sobel.configure(&src, &dst_x, &dst_y, border_mode, constant_border_value);
314
315 // Validate valid region
316 constexpr BorderSize border_size{ 3 };
317 const ValidRegion dst_valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size);
318
319 validate(dst_x.info()->valid_region(), dst_valid_region);
320 validate(dst_y.info()->valid_region(), dst_valid_region);
321
322 // Validate padding
323 PaddingCalculator calculator(shape.x(), 8);
324
325 calculator.set_border_mode(border_mode);
326 calculator.set_border_size(3);
327
328 const PaddingSize dst_padding = calculator.required_padding();
329
330 calculator.set_accessed_elements(16);
331 calculator.set_access_offset(-3);
332
333 const PaddingSize src_padding = calculator.required_padding();
334
335 validate(src.info()->padding(), src_padding);
336 validate(dst_x.info()->padding(), dst_padding);
337 validate(dst_y.info()->padding(), dst_padding);
338}
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000339TEST_SUITE(X)
340FIXTURE_DATA_TEST_CASE(RunSmall, NESobel7x7Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
341 Format::U8)),
342 framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
343{
344 // Validate output
345 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
346 validate(Accessor(_target.first), _reference.first, valid_region_x);
347}
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100348
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000349FIXTURE_DATA_TEST_CASE(RunLarge, NESobel7x7Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
350 Format::U8)),
351 framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
352{
353 // Validate output
354 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
355 validate(Accessor(_target.first), _reference.first, valid_region_x);
356}
357TEST_SUITE_END()
358TEST_SUITE(Y)
359FIXTURE_DATA_TEST_CASE(RunSmall, NESobel7x7Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
360 Format::U8)),
361 framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
362{
363 // Validate output
364 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
365 validate(Accessor(_target.second), _reference.second, valid_region_y);
366}
367
368FIXTURE_DATA_TEST_CASE(RunLarge, NESobel7x7Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
369 Format::U8)),
370 framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
371{
372 // Validate output
373 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
374 validate(Accessor(_target.second), _reference.second, valid_region_y);
375}
376TEST_SUITE_END()
377TEST_SUITE(XY)
378FIXTURE_DATA_TEST_CASE(RunSmall, NESobel7x7Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
379 Format::U8)),
380 framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100381{
382 // Validate output
383 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
384 validate(Accessor(_target.first), _reference.first, valid_region_x);
385
386 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
387 validate(Accessor(_target.second), _reference.second, valid_region_y);
388}
389
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000390FIXTURE_DATA_TEST_CASE(RunLarge, NESobel7x7Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
391 Format::U8)),
392 framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100393{
394 // Validate output
395 ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
396 validate(Accessor(_target.first), _reference.first, valid_region_x);
397
398 ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
399 validate(Accessor(_target.second), _reference.second, valid_region_y);
400}
401TEST_SUITE_END()
Isabella Gottardi43ce8982017-11-08 11:13:23 +0000402TEST_SUITE_END()
Moritz Pflanzer7655a672017-09-23 11:57:33 +0100403
404TEST_SUITE_END()
405TEST_SUITE_END()
406} // namespace validation
407} // namespace test
408} // namespace arm_compute