blob: e6e6d8afe88a29247096902e05d672f205852722 [file] [log] [blame]
XNNPACK Team21432672020-10-19 19:58:48 -07001// Copyright 2020 Google LLC
2//
3// This source code is licensed under the BSD-style license found in the
4// LICENSE file in the root directory of this source tree.
XNNPACK Team6be46b22020-10-22 23:34:54 -07005//
6// Auto-generated file. Do not edit!
7// Specification: test/f32-ibilinear-chw.yaml
8// Generator: tools/generate-ibilinear-chw-test.py
9
XNNPACK Team21432672020-10-19 19:58:48 -070010
11#include <gtest/gtest.h>
12
13#include <xnnpack/common.h>
14#include <xnnpack/isa-checks.h>
15
16#include <xnnpack/ibilinear.h>
XNNPACK Team6be46b22020-10-22 23:34:54 -070017#include "ibilinear-microkernel-tester.h"
XNNPACK Team21432672020-10-19 19:58:48 -070018
19
XNNPACK Team6be46b22020-10-22 23:34:54 -070020TEST(F32_IBILINEAR_CHW__SCALAR_P1, pixels_eq_1) {
21 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -070022 .pixels(1)
23 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -070024 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1);
XNNPACK Team21432672020-10-19 19:58:48 -070025}
26
XNNPACK Team6be46b22020-10-22 23:34:54 -070027TEST(F32_IBILINEAR_CHW__SCALAR_P1, pixels_gt_1) {
28 for (size_t pixels = 2; pixels < 10; pixels++) {
29 IBilinearMicrokernelTester()
30 .pixels(pixels)
31 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -070032 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1);
XNNPACK Team21432672020-10-19 19:58:48 -070033 }
34}
35
XNNPACK Team965272b2020-10-23 21:10:15 -070036TEST(F32_IBILINEAR_CHW__SCALAR_P1, channels_eq_1) {
37 for (size_t pixels = 1; pixels <= 5; pixels += 1) {
38 IBilinearMicrokernelTester()
39 .pixels(pixels)
40 .channels(1)
41 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1);
42 }
43}
44
XNNPACK Team6be46b22020-10-22 23:34:54 -070045TEST(F32_IBILINEAR_CHW__SCALAR_P1, channels_gt_1) {
46 for (size_t channels = 2; channels < 3; channels++) {
47 for (size_t pixels = 1; pixels <= 5; pixels += 1) {
48 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -070049 .pixels(pixels)
50 .channels(channels)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -070051 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1);
XNNPACK Team21432672020-10-19 19:58:48 -070052 }
53 }
54}
55
XNNPACK Team6be46b22020-10-22 23:34:54 -070056TEST(F32_IBILINEAR_CHW__SCALAR_P1, input_offset) {
XNNPACK Team21432672020-10-19 19:58:48 -070057 for (size_t pixels = 1; pixels < 5; pixels += 1) {
58 for (size_t channels = 1; channels <= 5; channels += 1) {
XNNPACK Team6be46b22020-10-22 23:34:54 -070059 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -070060 .pixels(pixels)
61 .channels(channels)
62 .input_offset(7)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -070063 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1);
XNNPACK Team21432672020-10-19 19:58:48 -070064 }
65 }
66}
67
XNNPACK Team6be46b22020-10-22 23:34:54 -070068TEST(F32_IBILINEAR_CHW__SCALAR_P1, input_stride) {
XNNPACK Team21432672020-10-19 19:58:48 -070069 for (size_t pixels = 1; pixels < 5; pixels += 1) {
70 for (size_t channels = 1; channels <= 5; channels += 1) {
XNNPACK Team6be46b22020-10-22 23:34:54 -070071 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -070072 .pixels(pixels)
73 .channels(channels)
XNNPACK Team6be46b22020-10-22 23:34:54 -070074 .input_stride(23)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -070075 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1);
XNNPACK Team21432672020-10-19 19:58:48 -070076 }
77 }
78}
79
XNNPACK Team6be46b22020-10-22 23:34:54 -070080
81TEST(F32_IBILINEAR_CHW__SCALAR_P2, pixels_eq_2) {
82 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -070083 .pixels(2)
84 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -070085 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2);
XNNPACK Team21432672020-10-19 19:58:48 -070086}
87
XNNPACK Team6be46b22020-10-22 23:34:54 -070088TEST(F32_IBILINEAR_CHW__SCALAR_P2, pixels_div_2) {
XNNPACK Team21432672020-10-19 19:58:48 -070089 for (size_t pixels = 4; pixels < 20; pixels += 2) {
XNNPACK Team6be46b22020-10-22 23:34:54 -070090 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -070091 .pixels(pixels)
92 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -070093 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2);
XNNPACK Team21432672020-10-19 19:58:48 -070094 }
95}
96
XNNPACK Team6be46b22020-10-22 23:34:54 -070097TEST(F32_IBILINEAR_CHW__SCALAR_P2, pixels_lt_2) {
XNNPACK Team21432672020-10-19 19:58:48 -070098 for (size_t pixels = 1; pixels < 2; pixels++) {
XNNPACK Team6be46b22020-10-22 23:34:54 -070099 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700100 .pixels(pixels)
101 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700102 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2);
XNNPACK Team21432672020-10-19 19:58:48 -0700103 }
104}
105
XNNPACK Team6be46b22020-10-22 23:34:54 -0700106TEST(F32_IBILINEAR_CHW__SCALAR_P2, pixels_gt_2) {
XNNPACK Team21432672020-10-19 19:58:48 -0700107 for (size_t pixels = 3; pixels < 4; pixels++) {
XNNPACK Team6be46b22020-10-22 23:34:54 -0700108 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700109 .pixels(pixels)
110 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700111 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2);
XNNPACK Team21432672020-10-19 19:58:48 -0700112 }
113}
114
XNNPACK Team965272b2020-10-23 21:10:15 -0700115TEST(F32_IBILINEAR_CHW__SCALAR_P2, channels_eq_1) {
116 for (size_t pixels = 1; pixels <= 10; pixels += 1) {
117 IBilinearMicrokernelTester()
118 .pixels(pixels)
119 .channels(1)
120 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2);
121 }
122}
123
124TEST(F32_IBILINEAR_CHW__SCALAR_P2, channels_gt_1) {
XNNPACK Team6be46b22020-10-22 23:34:54 -0700125 for (size_t channels = 2; channels < 3; channels++) {
126 for (size_t pixels = 1; pixels <= 10; pixels += 1) {
127 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700128 .pixels(pixels)
129 .channels(channels)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700130 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2);
XNNPACK Team21432672020-10-19 19:58:48 -0700131 }
132 }
133}
134
XNNPACK Team6be46b22020-10-22 23:34:54 -0700135TEST(F32_IBILINEAR_CHW__SCALAR_P2, input_offset) {
136 for (size_t pixels = 1; pixels < 10; pixels += 1) {
137 for (size_t channels = 1; channels <= 5; channels += 1) {
138 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700139 .pixels(pixels)
140 .channels(channels)
XNNPACK Team6be46b22020-10-22 23:34:54 -0700141 .input_offset(7)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700142 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2);
XNNPACK Team21432672020-10-19 19:58:48 -0700143 }
144 }
145}
146
XNNPACK Team6be46b22020-10-22 23:34:54 -0700147TEST(F32_IBILINEAR_CHW__SCALAR_P2, input_stride) {
148 for (size_t pixels = 1; pixels < 10; pixels += 1) {
149 for (size_t channels = 1; channels <= 5; channels += 1) {
150 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700151 .pixels(pixels)
152 .channels(channels)
XNNPACK Team6be46b22020-10-22 23:34:54 -0700153 .input_stride(43)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700154 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2);
XNNPACK Team21432672020-10-19 19:58:48 -0700155 }
156 }
157}
158
XNNPACK Team6be46b22020-10-22 23:34:54 -0700159
160TEST(F32_IBILINEAR_CHW__SCALAR_P4, pixels_eq_4) {
161 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700162 .pixels(4)
163 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700164 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4);
XNNPACK Team21432672020-10-19 19:58:48 -0700165}
166
XNNPACK Team6be46b22020-10-22 23:34:54 -0700167TEST(F32_IBILINEAR_CHW__SCALAR_P4, pixels_div_4) {
XNNPACK Team21432672020-10-19 19:58:48 -0700168 for (size_t pixels = 8; pixels < 40; pixels += 4) {
XNNPACK Team6be46b22020-10-22 23:34:54 -0700169 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700170 .pixels(pixels)
171 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700172 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4);
XNNPACK Team21432672020-10-19 19:58:48 -0700173 }
174}
175
XNNPACK Team6be46b22020-10-22 23:34:54 -0700176TEST(F32_IBILINEAR_CHW__SCALAR_P4, pixels_lt_4) {
XNNPACK Team21432672020-10-19 19:58:48 -0700177 for (size_t pixels = 1; pixels < 4; pixels++) {
XNNPACK Team6be46b22020-10-22 23:34:54 -0700178 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700179 .pixels(pixels)
180 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700181 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4);
XNNPACK Team21432672020-10-19 19:58:48 -0700182 }
183}
184
XNNPACK Team6be46b22020-10-22 23:34:54 -0700185TEST(F32_IBILINEAR_CHW__SCALAR_P4, pixels_gt_4) {
XNNPACK Team21432672020-10-19 19:58:48 -0700186 for (size_t pixels = 5; pixels < 8; pixels++) {
XNNPACK Team6be46b22020-10-22 23:34:54 -0700187 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700188 .pixels(pixels)
189 .channels(1)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700190 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4);
XNNPACK Team21432672020-10-19 19:58:48 -0700191 }
192}
193
XNNPACK Team965272b2020-10-23 21:10:15 -0700194TEST(F32_IBILINEAR_CHW__SCALAR_P4, channels_eq_1) {
195 for (size_t pixels = 1; pixels <= 20; pixels += 3) {
196 IBilinearMicrokernelTester()
197 .pixels(pixels)
198 .channels(1)
199 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4);
200 }
201}
202
203TEST(F32_IBILINEAR_CHW__SCALAR_P4, channels_gt_1) {
XNNPACK Team6be46b22020-10-22 23:34:54 -0700204 for (size_t channels = 2; channels < 3; channels++) {
205 for (size_t pixels = 1; pixels <= 20; pixels += 3) {
206 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700207 .pixels(pixels)
208 .channels(channels)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700209 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4);
XNNPACK Team21432672020-10-19 19:58:48 -0700210 }
211 }
212}
213
XNNPACK Team6be46b22020-10-22 23:34:54 -0700214TEST(F32_IBILINEAR_CHW__SCALAR_P4, input_offset) {
215 for (size_t pixels = 1; pixels < 20; pixels += 3) {
216 for (size_t channels = 1; channels <= 5; channels += 1) {
217 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700218 .pixels(pixels)
219 .channels(channels)
XNNPACK Team6be46b22020-10-22 23:34:54 -0700220 .input_offset(7)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700221 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4);
XNNPACK Team21432672020-10-19 19:58:48 -0700222 }
223 }
224}
225
XNNPACK Team6be46b22020-10-22 23:34:54 -0700226TEST(F32_IBILINEAR_CHW__SCALAR_P4, input_stride) {
227 for (size_t pixels = 1; pixels < 20; pixels += 3) {
228 for (size_t channels = 1; channels <= 5; channels += 1) {
229 IBilinearMicrokernelTester()
XNNPACK Team21432672020-10-19 19:58:48 -0700230 .pixels(pixels)
231 .channels(channels)
XNNPACK Team6be46b22020-10-22 23:34:54 -0700232 .input_stride(83)
XNNPACK Teamcb2b6672020-10-23 19:30:50 -0700233 .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4);
XNNPACK Team21432672020-10-19 19:58:48 -0700234 }
235 }
236}
XNNPACK Team965272b2020-10-23 21:10:15 -0700237
238
239#if XNN_ARCH_WASMSIMD
240 TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, pixels_eq_4) {
241 IBilinearMicrokernelTester()
242 .pixels(4)
243 .channels(1)
244 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4);
245 }
246
247 TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, pixels_div_4) {
248 for (size_t pixels = 8; pixels < 40; pixels += 4) {
249 IBilinearMicrokernelTester()
250 .pixels(pixels)
251 .channels(1)
252 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4);
253 }
254 }
255
256 TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, pixels_lt_4) {
257 for (size_t pixels = 1; pixels < 4; pixels++) {
258 IBilinearMicrokernelTester()
259 .pixels(pixels)
260 .channels(1)
261 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4);
262 }
263 }
264
265 TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, pixels_gt_4) {
266 for (size_t pixels = 5; pixels < 8; pixels++) {
267 IBilinearMicrokernelTester()
268 .pixels(pixels)
269 .channels(1)
270 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4);
271 }
272 }
273
274 TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, channels_eq_1) {
275 for (size_t pixels = 1; pixels <= 20; pixels += 3) {
276 IBilinearMicrokernelTester()
277 .pixels(pixels)
278 .channels(1)
279 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4);
280 }
281 }
282
283 TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, channels_gt_1) {
284 for (size_t channels = 2; channels < 3; channels++) {
285 for (size_t pixels = 1; pixels <= 20; pixels += 3) {
286 IBilinearMicrokernelTester()
287 .pixels(pixels)
288 .channels(channels)
289 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4);
290 }
291 }
292 }
293
294 TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, input_offset) {
295 for (size_t pixels = 1; pixels < 20; pixels += 3) {
296 for (size_t channels = 1; channels <= 5; channels += 1) {
297 IBilinearMicrokernelTester()
298 .pixels(pixels)
299 .channels(channels)
300 .input_offset(7)
301 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4);
302 }
303 }
304 }
305
306 TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, input_stride) {
307 for (size_t pixels = 1; pixels < 20; pixels += 3) {
308 for (size_t channels = 1; channels <= 5; channels += 1) {
309 IBilinearMicrokernelTester()
310 .pixels(pixels)
311 .channels(channels)
312 .input_stride(83)
313 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4);
314 }
315 }
316 }
317#endif // XNN_ARCH_WASMSIMD
318
319
320#if XNN_ARCH_WASMSIMD
321 TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, pixels_eq_8) {
322 IBilinearMicrokernelTester()
323 .pixels(8)
324 .channels(1)
325 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8);
326 }
327
328 TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, pixels_div_8) {
329 for (size_t pixels = 16; pixels < 80; pixels += 8) {
330 IBilinearMicrokernelTester()
331 .pixels(pixels)
332 .channels(1)
333 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8);
334 }
335 }
336
337 TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, pixels_lt_8) {
338 for (size_t pixels = 1; pixels < 8; pixels++) {
339 IBilinearMicrokernelTester()
340 .pixels(pixels)
341 .channels(1)
342 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8);
343 }
344 }
345
346 TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, pixels_gt_8) {
347 for (size_t pixels = 9; pixels < 16; pixels++) {
348 IBilinearMicrokernelTester()
349 .pixels(pixels)
350 .channels(1)
351 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8);
352 }
353 }
354
355 TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, channels_eq_1) {
356 for (size_t pixels = 1; pixels <= 40; pixels += 7) {
357 IBilinearMicrokernelTester()
358 .pixels(pixels)
359 .channels(1)
360 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8);
361 }
362 }
363
364 TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, channels_gt_1) {
365 for (size_t channels = 2; channels < 3; channels++) {
366 for (size_t pixels = 1; pixels <= 40; pixels += 7) {
367 IBilinearMicrokernelTester()
368 .pixels(pixels)
369 .channels(channels)
370 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8);
371 }
372 }
373 }
374
375 TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, input_offset) {
376 for (size_t pixels = 1; pixels < 40; pixels += 7) {
377 for (size_t channels = 1; channels <= 5; channels += 1) {
378 IBilinearMicrokernelTester()
379 .pixels(pixels)
380 .channels(channels)
381 .input_offset(7)
382 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8);
383 }
384 }
385 }
386
387 TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, input_stride) {
388 for (size_t pixels = 1; pixels < 40; pixels += 7) {
389 for (size_t channels = 1; channels <= 5; channels += 1) {
390 IBilinearMicrokernelTester()
391 .pixels(pixels)
392 .channels(channels)
393 .input_stride(163)
394 .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8);
395 }
396 }
397 }
398#endif // XNN_ARCH_WASMSIMD
Artsiom Ablavatski2202c812021-01-22 14:16:43 -0800399
400
401#if XNN_ARCH_ARM || XNN_ARCH_ARM64
402 TEST(F32_IBILINEAR_CHW__NEON_P4, pixels_eq_4) {
403 TEST_REQUIRES_ARM_NEON;
404 IBilinearMicrokernelTester()
405 .pixels(4)
406 .channels(1)
407 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4);
408 }
409
410 TEST(F32_IBILINEAR_CHW__NEON_P4, pixels_div_4) {
411 TEST_REQUIRES_ARM_NEON;
412 for (size_t pixels = 8; pixels < 40; pixels += 4) {
413 IBilinearMicrokernelTester()
414 .pixels(pixels)
415 .channels(1)
416 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4);
417 }
418 }
419
420 TEST(F32_IBILINEAR_CHW__NEON_P4, pixels_lt_4) {
421 TEST_REQUIRES_ARM_NEON;
422 for (size_t pixels = 1; pixels < 4; pixels++) {
423 IBilinearMicrokernelTester()
424 .pixels(pixels)
425 .channels(1)
426 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4);
427 }
428 }
429
430 TEST(F32_IBILINEAR_CHW__NEON_P4, pixels_gt_4) {
431 TEST_REQUIRES_ARM_NEON;
432 for (size_t pixels = 5; pixels < 8; pixels++) {
433 IBilinearMicrokernelTester()
434 .pixels(pixels)
435 .channels(1)
436 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4);
437 }
438 }
439
440 TEST(F32_IBILINEAR_CHW__NEON_P4, channels_eq_1) {
441 TEST_REQUIRES_ARM_NEON;
442 for (size_t pixels = 1; pixels <= 20; pixels += 3) {
443 IBilinearMicrokernelTester()
444 .pixels(pixels)
445 .channels(1)
446 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4);
447 }
448 }
449
450 TEST(F32_IBILINEAR_CHW__NEON_P4, channels_gt_1) {
451 TEST_REQUIRES_ARM_NEON;
452 for (size_t channels = 2; channels < 3; channels++) {
453 for (size_t pixels = 1; pixels <= 20; pixels += 3) {
454 IBilinearMicrokernelTester()
455 .pixels(pixels)
456 .channels(channels)
457 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4);
458 }
459 }
460 }
461
462 TEST(F32_IBILINEAR_CHW__NEON_P4, input_offset) {
463 TEST_REQUIRES_ARM_NEON;
464 for (size_t pixels = 1; pixels < 20; pixels += 3) {
465 for (size_t channels = 1; channels <= 5; channels += 1) {
466 IBilinearMicrokernelTester()
467 .pixels(pixels)
468 .channels(channels)
469 .input_offset(7)
470 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4);
471 }
472 }
473 }
474
475 TEST(F32_IBILINEAR_CHW__NEON_P4, input_stride) {
476 TEST_REQUIRES_ARM_NEON;
477 for (size_t pixels = 1; pixels < 20; pixels += 3) {
478 for (size_t channels = 1; channels <= 5; channels += 1) {
479 IBilinearMicrokernelTester()
480 .pixels(pixels)
481 .channels(channels)
482 .input_stride(83)
483 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4);
484 }
485 }
486 }
487#endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
488
489
490#if XNN_ARCH_ARM || XNN_ARCH_ARM64
491 TEST(F32_IBILINEAR_CHW__NEON_P8, pixels_eq_8) {
492 TEST_REQUIRES_ARM_NEON;
493 IBilinearMicrokernelTester()
494 .pixels(8)
495 .channels(1)
496 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8);
497 }
498
499 TEST(F32_IBILINEAR_CHW__NEON_P8, pixels_div_8) {
500 TEST_REQUIRES_ARM_NEON;
501 for (size_t pixels = 16; pixels < 80; pixels += 8) {
502 IBilinearMicrokernelTester()
503 .pixels(pixels)
504 .channels(1)
505 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8);
506 }
507 }
508
509 TEST(F32_IBILINEAR_CHW__NEON_P8, pixels_lt_8) {
510 TEST_REQUIRES_ARM_NEON;
511 for (size_t pixels = 1; pixels < 8; pixels++) {
512 IBilinearMicrokernelTester()
513 .pixels(pixels)
514 .channels(1)
515 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8);
516 }
517 }
518
519 TEST(F32_IBILINEAR_CHW__NEON_P8, pixels_gt_8) {
520 TEST_REQUIRES_ARM_NEON;
521 for (size_t pixels = 9; pixels < 16; pixels++) {
522 IBilinearMicrokernelTester()
523 .pixels(pixels)
524 .channels(1)
525 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8);
526 }
527 }
528
529 TEST(F32_IBILINEAR_CHW__NEON_P8, channels_eq_1) {
530 TEST_REQUIRES_ARM_NEON;
531 for (size_t pixels = 1; pixels <= 40; pixels += 7) {
532 IBilinearMicrokernelTester()
533 .pixels(pixels)
534 .channels(1)
535 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8);
536 }
537 }
538
539 TEST(F32_IBILINEAR_CHW__NEON_P8, channels_gt_1) {
540 TEST_REQUIRES_ARM_NEON;
541 for (size_t channels = 2; channels < 3; channels++) {
542 for (size_t pixels = 1; pixels <= 40; pixels += 7) {
543 IBilinearMicrokernelTester()
544 .pixels(pixels)
545 .channels(channels)
546 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8);
547 }
548 }
549 }
550
551 TEST(F32_IBILINEAR_CHW__NEON_P8, input_offset) {
552 TEST_REQUIRES_ARM_NEON;
553 for (size_t pixels = 1; pixels < 40; pixels += 7) {
554 for (size_t channels = 1; channels <= 5; channels += 1) {
555 IBilinearMicrokernelTester()
556 .pixels(pixels)
557 .channels(channels)
558 .input_offset(7)
559 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8);
560 }
561 }
562 }
563
564 TEST(F32_IBILINEAR_CHW__NEON_P8, input_stride) {
565 TEST_REQUIRES_ARM_NEON;
566 for (size_t pixels = 1; pixels < 40; pixels += 7) {
567 for (size_t channels = 1; channels <= 5; channels += 1) {
568 IBilinearMicrokernelTester()
569 .pixels(pixels)
570 .channels(channels)
571 .input_stride(163)
572 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8);
573 }
574 }
575 }
576#endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
577
578
579#if XNN_ARCH_ARM || XNN_ARCH_ARM64
580 TEST(F32_IBILINEAR_CHW__NEONFMA_P4, pixels_eq_4) {
581 TEST_REQUIRES_ARM_NEON_FMA;
582 IBilinearMicrokernelTester()
583 .pixels(4)
584 .channels(1)
585 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4);
586 }
587
588 TEST(F32_IBILINEAR_CHW__NEONFMA_P4, pixels_div_4) {
589 TEST_REQUIRES_ARM_NEON_FMA;
590 for (size_t pixels = 8; pixels < 40; pixels += 4) {
591 IBilinearMicrokernelTester()
592 .pixels(pixels)
593 .channels(1)
594 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4);
595 }
596 }
597
598 TEST(F32_IBILINEAR_CHW__NEONFMA_P4, pixels_lt_4) {
599 TEST_REQUIRES_ARM_NEON_FMA;
600 for (size_t pixels = 1; pixels < 4; pixels++) {
601 IBilinearMicrokernelTester()
602 .pixels(pixels)
603 .channels(1)
604 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4);
605 }
606 }
607
608 TEST(F32_IBILINEAR_CHW__NEONFMA_P4, pixels_gt_4) {
609 TEST_REQUIRES_ARM_NEON_FMA;
610 for (size_t pixels = 5; pixels < 8; pixels++) {
611 IBilinearMicrokernelTester()
612 .pixels(pixels)
613 .channels(1)
614 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4);
615 }
616 }
617
618 TEST(F32_IBILINEAR_CHW__NEONFMA_P4, channels_eq_1) {
619 TEST_REQUIRES_ARM_NEON_FMA;
620 for (size_t pixels = 1; pixels <= 20; pixels += 3) {
621 IBilinearMicrokernelTester()
622 .pixels(pixels)
623 .channels(1)
624 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4);
625 }
626 }
627
628 TEST(F32_IBILINEAR_CHW__NEONFMA_P4, channels_gt_1) {
629 TEST_REQUIRES_ARM_NEON_FMA;
630 for (size_t channels = 2; channels < 3; channels++) {
631 for (size_t pixels = 1; pixels <= 20; pixels += 3) {
632 IBilinearMicrokernelTester()
633 .pixels(pixels)
634 .channels(channels)
635 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4);
636 }
637 }
638 }
639
640 TEST(F32_IBILINEAR_CHW__NEONFMA_P4, input_offset) {
641 TEST_REQUIRES_ARM_NEON_FMA;
642 for (size_t pixels = 1; pixels < 20; pixels += 3) {
643 for (size_t channels = 1; channels <= 5; channels += 1) {
644 IBilinearMicrokernelTester()
645 .pixels(pixels)
646 .channels(channels)
647 .input_offset(7)
648 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4);
649 }
650 }
651 }
652
653 TEST(F32_IBILINEAR_CHW__NEONFMA_P4, input_stride) {
654 TEST_REQUIRES_ARM_NEON_FMA;
655 for (size_t pixels = 1; pixels < 20; pixels += 3) {
656 for (size_t channels = 1; channels <= 5; channels += 1) {
657 IBilinearMicrokernelTester()
658 .pixels(pixels)
659 .channels(channels)
660 .input_stride(83)
661 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4);
662 }
663 }
664 }
665#endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
666
667
668#if XNN_ARCH_ARM || XNN_ARCH_ARM64
669 TEST(F32_IBILINEAR_CHW__NEONFMA_P8, pixels_eq_8) {
670 TEST_REQUIRES_ARM_NEON_FMA;
671 IBilinearMicrokernelTester()
672 .pixels(8)
673 .channels(1)
674 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8);
675 }
676
677 TEST(F32_IBILINEAR_CHW__NEONFMA_P8, pixels_div_8) {
678 TEST_REQUIRES_ARM_NEON_FMA;
679 for (size_t pixels = 16; pixels < 80; pixels += 8) {
680 IBilinearMicrokernelTester()
681 .pixels(pixels)
682 .channels(1)
683 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8);
684 }
685 }
686
687 TEST(F32_IBILINEAR_CHW__NEONFMA_P8, pixels_lt_8) {
688 TEST_REQUIRES_ARM_NEON_FMA;
689 for (size_t pixels = 1; pixels < 8; pixels++) {
690 IBilinearMicrokernelTester()
691 .pixels(pixels)
692 .channels(1)
693 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8);
694 }
695 }
696
697 TEST(F32_IBILINEAR_CHW__NEONFMA_P8, pixels_gt_8) {
698 TEST_REQUIRES_ARM_NEON_FMA;
699 for (size_t pixels = 9; pixels < 16; pixels++) {
700 IBilinearMicrokernelTester()
701 .pixels(pixels)
702 .channels(1)
703 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8);
704 }
705 }
706
707 TEST(F32_IBILINEAR_CHW__NEONFMA_P8, channels_eq_1) {
708 TEST_REQUIRES_ARM_NEON_FMA;
709 for (size_t pixels = 1; pixels <= 40; pixels += 7) {
710 IBilinearMicrokernelTester()
711 .pixels(pixels)
712 .channels(1)
713 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8);
714 }
715 }
716
717 TEST(F32_IBILINEAR_CHW__NEONFMA_P8, channels_gt_1) {
718 TEST_REQUIRES_ARM_NEON_FMA;
719 for (size_t channels = 2; channels < 3; channels++) {
720 for (size_t pixels = 1; pixels <= 40; pixels += 7) {
721 IBilinearMicrokernelTester()
722 .pixels(pixels)
723 .channels(channels)
724 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8);
725 }
726 }
727 }
728
729 TEST(F32_IBILINEAR_CHW__NEONFMA_P8, input_offset) {
730 TEST_REQUIRES_ARM_NEON_FMA;
731 for (size_t pixels = 1; pixels < 40; pixels += 7) {
732 for (size_t channels = 1; channels <= 5; channels += 1) {
733 IBilinearMicrokernelTester()
734 .pixels(pixels)
735 .channels(channels)
736 .input_offset(7)
737 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8);
738 }
739 }
740 }
741
742 TEST(F32_IBILINEAR_CHW__NEONFMA_P8, input_stride) {
743 TEST_REQUIRES_ARM_NEON_FMA;
744 for (size_t pixels = 1; pixels < 40; pixels += 7) {
745 for (size_t channels = 1; channels <= 5; channels += 1) {
746 IBilinearMicrokernelTester()
747 .pixels(pixels)
748 .channels(channels)
749 .input_stride(163)
750 .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8);
751 }
752 }
753 }
754#endif // XNN_ARCH_ARM || XNN_ARCH_ARM64