blob: 1d54f2d98abce0aba3085b4daa4e20b89a2a1f15 [file] [log] [blame]
Marat Dukhan660fd192020-03-10 04:55:30 -07001// Copyright 2019 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.
5//
6// Auto-generated file. Do not edit!
7// Specification: test/f32-ibilinear.yaml
8// Generator: tools/generate-ibilinear-test.py
9
10
11#include <gtest/gtest.h>
12
13#include <xnnpack/common.h>
14#include <xnnpack/isa-checks.h>
15
16#include <xnnpack/ibilinear.h>
17#include "ibilinear-microkernel-tester.h"
18
19
20TEST(F32_IBILINEAR__SCALAR_C1, channels_eq_1) {
21 IBilinearMicrokernelTester()
22 .pixels(1)
23 .channels(1)
24 .Test(xnn_f32_ibilinear_ukernel__scalar_c1);
25}
26
27TEST(F32_IBILINEAR__SCALAR_C1, channels_gt_1) {
28 for (size_t channels = 2; channels < 10; channels++) {
29 IBilinearMicrokernelTester()
30 .pixels(1)
31 .channels(channels)
32 .Test(xnn_f32_ibilinear_ukernel__scalar_c1);
33 }
34}
35
36TEST(F32_IBILINEAR__SCALAR_C1, pixels_gt_1) {
37 for (size_t pixels = 2; pixels < 3; pixels++) {
38 for (size_t channels = 1; channels <= 5; channels += 1) {
39 IBilinearMicrokernelTester()
40 .pixels(pixels)
41 .channels(channels)
42 .Test(xnn_f32_ibilinear_ukernel__scalar_c1);
43 }
44 }
45}
46
47TEST(F32_IBILINEAR__SCALAR_C1, input_offset) {
48 for (size_t pixels = 1; pixels < 5; pixels += 1) {
49 for (size_t channels = 1; channels <= 5; channels += 1) {
50 IBilinearMicrokernelTester()
51 .pixels(pixels)
52 .channels(channels)
53 .input_offset(7)
54 .Test(xnn_f32_ibilinear_ukernel__scalar_c1);
55 }
56 }
57}
XNNPACK Team6be46b22020-10-22 23:34:54 -070058
Marat Dukhan660fd192020-03-10 04:55:30 -070059TEST(F32_IBILINEAR__SCALAR_C1, output_stride) {
60 for (size_t pixels = 1; pixels < 5; pixels += 1) {
61 for (size_t channels = 1; channels <= 5; channels += 1) {
62 IBilinearMicrokernelTester()
63 .pixels(pixels)
64 .channels(channels)
65 .output_stride(7)
66 .Test(xnn_f32_ibilinear_ukernel__scalar_c1);
67 }
68 }
69}
70
71TEST(F32_IBILINEAR__SCALAR_C2, channels_eq_2) {
72 IBilinearMicrokernelTester()
73 .pixels(1)
74 .channels(2)
75 .Test(xnn_f32_ibilinear_ukernel__scalar_c2);
76}
77
78TEST(F32_IBILINEAR__SCALAR_C2, channels_div_2) {
79 for (size_t channels = 4; channels < 20; channels += 2) {
80 IBilinearMicrokernelTester()
81 .pixels(1)
82 .channels(channels)
83 .Test(xnn_f32_ibilinear_ukernel__scalar_c2);
84 }
85}
86
87TEST(F32_IBILINEAR__SCALAR_C2, channels_lt_2) {
88 for (size_t channels = 1; channels < 2; channels++) {
89 IBilinearMicrokernelTester()
90 .pixels(1)
91 .channels(channels)
92 .Test(xnn_f32_ibilinear_ukernel__scalar_c2);
93 }
94}
95
96TEST(F32_IBILINEAR__SCALAR_C2, channels_gt_2) {
97 for (size_t channels = 3; channels < 4; channels++) {
98 IBilinearMicrokernelTester()
99 .pixels(1)
100 .channels(channels)
101 .Test(xnn_f32_ibilinear_ukernel__scalar_c2);
102 }
103}
104
105TEST(F32_IBILINEAR__SCALAR_C2, pixels_gt_1) {
106 for (size_t pixels = 2; pixels < 3; pixels++) {
107 for (size_t channels = 1; channels <= 10; channels += 1) {
108 IBilinearMicrokernelTester()
109 .pixels(pixels)
110 .channels(channels)
111 .Test(xnn_f32_ibilinear_ukernel__scalar_c2);
112 }
113 }
114}
115
116TEST(F32_IBILINEAR__SCALAR_C2, input_offset) {
117 for (size_t pixels = 1; pixels < 5; pixels += 1) {
118 for (size_t channels = 1; channels <= 10; channels += 1) {
119 IBilinearMicrokernelTester()
120 .pixels(pixels)
121 .channels(channels)
122 .input_offset(13)
123 .Test(xnn_f32_ibilinear_ukernel__scalar_c2);
124 }
125 }
126}
XNNPACK Team6be46b22020-10-22 23:34:54 -0700127
Marat Dukhan660fd192020-03-10 04:55:30 -0700128TEST(F32_IBILINEAR__SCALAR_C2, output_stride) {
129 for (size_t pixels = 1; pixels < 5; pixels += 1) {
130 for (size_t channels = 1; channels <= 10; channels += 1) {
131 IBilinearMicrokernelTester()
132 .pixels(pixels)
133 .channels(channels)
134 .output_stride(13)
135 .Test(xnn_f32_ibilinear_ukernel__scalar_c2);
136 }
137 }
138}
139
140TEST(F32_IBILINEAR__SCALAR_C4, channels_eq_4) {
141 IBilinearMicrokernelTester()
142 .pixels(1)
143 .channels(4)
144 .Test(xnn_f32_ibilinear_ukernel__scalar_c4);
145}
146
147TEST(F32_IBILINEAR__SCALAR_C4, channels_div_4) {
148 for (size_t channels = 8; channels < 40; channels += 4) {
149 IBilinearMicrokernelTester()
150 .pixels(1)
151 .channels(channels)
152 .Test(xnn_f32_ibilinear_ukernel__scalar_c4);
153 }
154}
155
156TEST(F32_IBILINEAR__SCALAR_C4, channels_lt_4) {
157 for (size_t channels = 1; channels < 4; channels++) {
158 IBilinearMicrokernelTester()
159 .pixels(1)
160 .channels(channels)
161 .Test(xnn_f32_ibilinear_ukernel__scalar_c4);
162 }
163}
164
165TEST(F32_IBILINEAR__SCALAR_C4, channels_gt_4) {
166 for (size_t channels = 5; channels < 8; channels++) {
167 IBilinearMicrokernelTester()
168 .pixels(1)
169 .channels(channels)
170 .Test(xnn_f32_ibilinear_ukernel__scalar_c4);
171 }
172}
173
174TEST(F32_IBILINEAR__SCALAR_C4, pixels_gt_1) {
175 for (size_t pixels = 2; pixels < 3; pixels++) {
176 for (size_t channels = 1; channels <= 20; channels += 3) {
177 IBilinearMicrokernelTester()
178 .pixels(pixels)
179 .channels(channels)
180 .Test(xnn_f32_ibilinear_ukernel__scalar_c4);
181 }
182 }
183}
184
185TEST(F32_IBILINEAR__SCALAR_C4, input_offset) {
186 for (size_t pixels = 1; pixels < 5; pixels += 1) {
187 for (size_t channels = 1; channels <= 20; channels += 3) {
188 IBilinearMicrokernelTester()
189 .pixels(pixels)
190 .channels(channels)
191 .input_offset(23)
192 .Test(xnn_f32_ibilinear_ukernel__scalar_c4);
193 }
194 }
195}
XNNPACK Team6be46b22020-10-22 23:34:54 -0700196
Marat Dukhan660fd192020-03-10 04:55:30 -0700197TEST(F32_IBILINEAR__SCALAR_C4, output_stride) {
198 for (size_t pixels = 1; pixels < 5; pixels += 1) {
199 for (size_t channels = 1; channels <= 20; channels += 3) {
200 IBilinearMicrokernelTester()
201 .pixels(pixels)
202 .channels(channels)
203 .output_stride(23)
204 .Test(xnn_f32_ibilinear_ukernel__scalar_c4);
205 }
206 }
207}
208
209#if XNN_ARCH_ARM || XNN_ARCH_ARM64
210 TEST(F32_IBILINEAR__NEON_C4, channels_eq_4) {
211 TEST_REQUIRES_ARM_NEON;
212 IBilinearMicrokernelTester()
213 .pixels(1)
214 .channels(4)
215 .Test(xnn_f32_ibilinear_ukernel__neon_c4);
216 }
217
218 TEST(F32_IBILINEAR__NEON_C4, channels_div_4) {
219 TEST_REQUIRES_ARM_NEON;
220 for (size_t channels = 8; channels < 40; channels += 4) {
221 IBilinearMicrokernelTester()
222 .pixels(1)
223 .channels(channels)
224 .Test(xnn_f32_ibilinear_ukernel__neon_c4);
225 }
226 }
227
228 TEST(F32_IBILINEAR__NEON_C4, channels_lt_4) {
229 TEST_REQUIRES_ARM_NEON;
230 for (size_t channels = 1; channels < 4; channels++) {
231 IBilinearMicrokernelTester()
232 .pixels(1)
233 .channels(channels)
234 .Test(xnn_f32_ibilinear_ukernel__neon_c4);
235 }
236 }
237
238 TEST(F32_IBILINEAR__NEON_C4, channels_gt_4) {
239 TEST_REQUIRES_ARM_NEON;
240 for (size_t channels = 5; channels < 8; channels++) {
241 IBilinearMicrokernelTester()
242 .pixels(1)
243 .channels(channels)
244 .Test(xnn_f32_ibilinear_ukernel__neon_c4);
245 }
246 }
247
248 TEST(F32_IBILINEAR__NEON_C4, pixels_gt_1) {
249 TEST_REQUIRES_ARM_NEON;
250 for (size_t pixels = 2; pixels < 3; pixels++) {
251 for (size_t channels = 1; channels <= 20; channels += 3) {
252 IBilinearMicrokernelTester()
253 .pixels(pixels)
254 .channels(channels)
255 .Test(xnn_f32_ibilinear_ukernel__neon_c4);
256 }
257 }
258 }
259
260 TEST(F32_IBILINEAR__NEON_C4, input_offset) {
261 TEST_REQUIRES_ARM_NEON;
262 for (size_t pixels = 1; pixels < 5; pixels += 1) {
263 for (size_t channels = 1; channels <= 20; channels += 3) {
264 IBilinearMicrokernelTester()
265 .pixels(pixels)
266 .channels(channels)
267 .input_offset(23)
268 .Test(xnn_f32_ibilinear_ukernel__neon_c4);
269 }
270 }
271 }
XNNPACK Team6be46b22020-10-22 23:34:54 -0700272
Marat Dukhan660fd192020-03-10 04:55:30 -0700273 TEST(F32_IBILINEAR__NEON_C4, output_stride) {
274 TEST_REQUIRES_ARM_NEON;
275 for (size_t pixels = 1; pixels < 5; pixels += 1) {
276 for (size_t channels = 1; channels <= 20; channels += 3) {
277 IBilinearMicrokernelTester()
278 .pixels(pixels)
279 .channels(channels)
280 .output_stride(23)
281 .Test(xnn_f32_ibilinear_ukernel__neon_c4);
282 }
283 }
284 }
285#endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
286
287
288#if XNN_ARCH_ARM || XNN_ARCH_ARM64
289 TEST(F32_IBILINEAR__NEON_C8, channels_eq_8) {
290 TEST_REQUIRES_ARM_NEON;
291 IBilinearMicrokernelTester()
292 .pixels(1)
293 .channels(8)
294 .Test(xnn_f32_ibilinear_ukernel__neon_c8);
295 }
296
297 TEST(F32_IBILINEAR__NEON_C8, channels_div_8) {
298 TEST_REQUIRES_ARM_NEON;
299 for (size_t channels = 16; channels < 80; channels += 8) {
300 IBilinearMicrokernelTester()
301 .pixels(1)
302 .channels(channels)
303 .Test(xnn_f32_ibilinear_ukernel__neon_c8);
304 }
305 }
306
307 TEST(F32_IBILINEAR__NEON_C8, channels_lt_8) {
308 TEST_REQUIRES_ARM_NEON;
309 for (size_t channels = 1; channels < 8; channels++) {
310 IBilinearMicrokernelTester()
311 .pixels(1)
312 .channels(channels)
313 .Test(xnn_f32_ibilinear_ukernel__neon_c8);
314 }
315 }
316
317 TEST(F32_IBILINEAR__NEON_C8, channels_gt_8) {
318 TEST_REQUIRES_ARM_NEON;
319 for (size_t channels = 9; channels < 16; channels++) {
320 IBilinearMicrokernelTester()
321 .pixels(1)
322 .channels(channels)
323 .Test(xnn_f32_ibilinear_ukernel__neon_c8);
324 }
325 }
326
327 TEST(F32_IBILINEAR__NEON_C8, pixels_gt_1) {
328 TEST_REQUIRES_ARM_NEON;
329 for (size_t pixels = 2; pixels < 3; pixels++) {
330 for (size_t channels = 1; channels <= 40; channels += 7) {
331 IBilinearMicrokernelTester()
332 .pixels(pixels)
333 .channels(channels)
334 .Test(xnn_f32_ibilinear_ukernel__neon_c8);
335 }
336 }
337 }
338
339 TEST(F32_IBILINEAR__NEON_C8, input_offset) {
340 TEST_REQUIRES_ARM_NEON;
341 for (size_t pixels = 1; pixels < 5; pixels += 1) {
342 for (size_t channels = 1; channels <= 40; channels += 7) {
343 IBilinearMicrokernelTester()
344 .pixels(pixels)
345 .channels(channels)
346 .input_offset(43)
347 .Test(xnn_f32_ibilinear_ukernel__neon_c8);
348 }
349 }
350 }
XNNPACK Team6be46b22020-10-22 23:34:54 -0700351
Marat Dukhan660fd192020-03-10 04:55:30 -0700352 TEST(F32_IBILINEAR__NEON_C8, output_stride) {
353 TEST_REQUIRES_ARM_NEON;
354 for (size_t pixels = 1; pixels < 5; pixels += 1) {
355 for (size_t channels = 1; channels <= 40; channels += 7) {
356 IBilinearMicrokernelTester()
357 .pixels(pixels)
358 .channels(channels)
359 .output_stride(43)
360 .Test(xnn_f32_ibilinear_ukernel__neon_c8);
361 }
362 }
363 }
364#endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
365
366
367#if XNN_ARCH_ARM || XNN_ARCH_ARM64
368 TEST(F32_IBILINEAR__NEONFMA_C4, channels_eq_4) {
369 TEST_REQUIRES_ARM_NEON_FMA;
370 IBilinearMicrokernelTester()
371 .pixels(1)
372 .channels(4)
373 .Test(xnn_f32_ibilinear_ukernel__neonfma_c4);
374 }
375
376 TEST(F32_IBILINEAR__NEONFMA_C4, channels_div_4) {
377 TEST_REQUIRES_ARM_NEON_FMA;
378 for (size_t channels = 8; channels < 40; channels += 4) {
379 IBilinearMicrokernelTester()
380 .pixels(1)
381 .channels(channels)
382 .Test(xnn_f32_ibilinear_ukernel__neonfma_c4);
383 }
384 }
385
386 TEST(F32_IBILINEAR__NEONFMA_C4, channels_lt_4) {
387 TEST_REQUIRES_ARM_NEON_FMA;
388 for (size_t channels = 1; channels < 4; channels++) {
389 IBilinearMicrokernelTester()
390 .pixels(1)
391 .channels(channels)
392 .Test(xnn_f32_ibilinear_ukernel__neonfma_c4);
393 }
394 }
395
396 TEST(F32_IBILINEAR__NEONFMA_C4, channels_gt_4) {
397 TEST_REQUIRES_ARM_NEON_FMA;
398 for (size_t channels = 5; channels < 8; channels++) {
399 IBilinearMicrokernelTester()
400 .pixels(1)
401 .channels(channels)
402 .Test(xnn_f32_ibilinear_ukernel__neonfma_c4);
403 }
404 }
405
406 TEST(F32_IBILINEAR__NEONFMA_C4, pixels_gt_1) {
407 TEST_REQUIRES_ARM_NEON_FMA;
408 for (size_t pixels = 2; pixels < 3; pixels++) {
409 for (size_t channels = 1; channels <= 20; channels += 3) {
410 IBilinearMicrokernelTester()
411 .pixels(pixels)
412 .channels(channels)
413 .Test(xnn_f32_ibilinear_ukernel__neonfma_c4);
414 }
415 }
416 }
417
418 TEST(F32_IBILINEAR__NEONFMA_C4, input_offset) {
419 TEST_REQUIRES_ARM_NEON_FMA;
420 for (size_t pixels = 1; pixels < 5; pixels += 1) {
421 for (size_t channels = 1; channels <= 20; channels += 3) {
422 IBilinearMicrokernelTester()
423 .pixels(pixels)
424 .channels(channels)
425 .input_offset(23)
426 .Test(xnn_f32_ibilinear_ukernel__neonfma_c4);
427 }
428 }
429 }
XNNPACK Team6be46b22020-10-22 23:34:54 -0700430
Marat Dukhan660fd192020-03-10 04:55:30 -0700431 TEST(F32_IBILINEAR__NEONFMA_C4, output_stride) {
432 TEST_REQUIRES_ARM_NEON_FMA;
433 for (size_t pixels = 1; pixels < 5; pixels += 1) {
434 for (size_t channels = 1; channels <= 20; channels += 3) {
435 IBilinearMicrokernelTester()
436 .pixels(pixels)
437 .channels(channels)
438 .output_stride(23)
439 .Test(xnn_f32_ibilinear_ukernel__neonfma_c4);
440 }
441 }
442 }
443#endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
444
445
446#if XNN_ARCH_ARM || XNN_ARCH_ARM64
447 TEST(F32_IBILINEAR__NEONFMA_C8, channels_eq_8) {
448 TEST_REQUIRES_ARM_NEON_FMA;
449 IBilinearMicrokernelTester()
450 .pixels(1)
451 .channels(8)
452 .Test(xnn_f32_ibilinear_ukernel__neonfma_c8);
453 }
454
455 TEST(F32_IBILINEAR__NEONFMA_C8, channels_div_8) {
456 TEST_REQUIRES_ARM_NEON_FMA;
457 for (size_t channels = 16; channels < 80; channels += 8) {
458 IBilinearMicrokernelTester()
459 .pixels(1)
460 .channels(channels)
461 .Test(xnn_f32_ibilinear_ukernel__neonfma_c8);
462 }
463 }
464
465 TEST(F32_IBILINEAR__NEONFMA_C8, channels_lt_8) {
466 TEST_REQUIRES_ARM_NEON_FMA;
467 for (size_t channels = 1; channels < 8; channels++) {
468 IBilinearMicrokernelTester()
469 .pixels(1)
470 .channels(channels)
471 .Test(xnn_f32_ibilinear_ukernel__neonfma_c8);
472 }
473 }
474
475 TEST(F32_IBILINEAR__NEONFMA_C8, channels_gt_8) {
476 TEST_REQUIRES_ARM_NEON_FMA;
477 for (size_t channels = 9; channels < 16; channels++) {
478 IBilinearMicrokernelTester()
479 .pixels(1)
480 .channels(channels)
481 .Test(xnn_f32_ibilinear_ukernel__neonfma_c8);
482 }
483 }
484
485 TEST(F32_IBILINEAR__NEONFMA_C8, pixels_gt_1) {
486 TEST_REQUIRES_ARM_NEON_FMA;
487 for (size_t pixels = 2; pixels < 3; pixels++) {
488 for (size_t channels = 1; channels <= 40; channels += 7) {
489 IBilinearMicrokernelTester()
490 .pixels(pixels)
491 .channels(channels)
492 .Test(xnn_f32_ibilinear_ukernel__neonfma_c8);
493 }
494 }
495 }
496
497 TEST(F32_IBILINEAR__NEONFMA_C8, input_offset) {
498 TEST_REQUIRES_ARM_NEON_FMA;
499 for (size_t pixels = 1; pixels < 5; pixels += 1) {
500 for (size_t channels = 1; channels <= 40; channels += 7) {
501 IBilinearMicrokernelTester()
502 .pixels(pixels)
503 .channels(channels)
504 .input_offset(43)
505 .Test(xnn_f32_ibilinear_ukernel__neonfma_c8);
506 }
507 }
508 }
XNNPACK Team6be46b22020-10-22 23:34:54 -0700509
Marat Dukhan660fd192020-03-10 04:55:30 -0700510 TEST(F32_IBILINEAR__NEONFMA_C8, output_stride) {
511 TEST_REQUIRES_ARM_NEON_FMA;
512 for (size_t pixels = 1; pixels < 5; pixels += 1) {
513 for (size_t channels = 1; channels <= 40; channels += 7) {
514 IBilinearMicrokernelTester()
515 .pixels(pixels)
516 .channels(channels)
517 .output_stride(43)
518 .Test(xnn_f32_ibilinear_ukernel__neonfma_c8);
519 }
520 }
521 }
522#endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
523
524
525#if XNN_ARCH_X86 || XNN_ARCH_X86_64
526 TEST(F32_IBILINEAR__SSE_C4, channels_eq_4) {
527 TEST_REQUIRES_X86_SSE;
528 IBilinearMicrokernelTester()
529 .pixels(1)
530 .channels(4)
531 .Test(xnn_f32_ibilinear_ukernel__sse_c4);
532 }
533
534 TEST(F32_IBILINEAR__SSE_C4, channels_div_4) {
535 TEST_REQUIRES_X86_SSE;
536 for (size_t channels = 8; channels < 40; channels += 4) {
537 IBilinearMicrokernelTester()
538 .pixels(1)
539 .channels(channels)
540 .Test(xnn_f32_ibilinear_ukernel__sse_c4);
541 }
542 }
543
544 TEST(F32_IBILINEAR__SSE_C4, channels_lt_4) {
545 TEST_REQUIRES_X86_SSE;
546 for (size_t channels = 1; channels < 4; channels++) {
547 IBilinearMicrokernelTester()
548 .pixels(1)
549 .channels(channels)
550 .Test(xnn_f32_ibilinear_ukernel__sse_c4);
551 }
552 }
553
554 TEST(F32_IBILINEAR__SSE_C4, channels_gt_4) {
555 TEST_REQUIRES_X86_SSE;
556 for (size_t channels = 5; channels < 8; channels++) {
557 IBilinearMicrokernelTester()
558 .pixels(1)
559 .channels(channels)
560 .Test(xnn_f32_ibilinear_ukernel__sse_c4);
561 }
562 }
563
564 TEST(F32_IBILINEAR__SSE_C4, pixels_gt_1) {
565 TEST_REQUIRES_X86_SSE;
566 for (size_t pixels = 2; pixels < 3; pixels++) {
567 for (size_t channels = 1; channels <= 20; channels += 3) {
568 IBilinearMicrokernelTester()
569 .pixels(pixels)
570 .channels(channels)
571 .Test(xnn_f32_ibilinear_ukernel__sse_c4);
572 }
573 }
574 }
575
576 TEST(F32_IBILINEAR__SSE_C4, input_offset) {
577 TEST_REQUIRES_X86_SSE;
578 for (size_t pixels = 1; pixels < 5; pixels += 1) {
579 for (size_t channels = 1; channels <= 20; channels += 3) {
580 IBilinearMicrokernelTester()
581 .pixels(pixels)
582 .channels(channels)
583 .input_offset(23)
584 .Test(xnn_f32_ibilinear_ukernel__sse_c4);
585 }
586 }
587 }
XNNPACK Team6be46b22020-10-22 23:34:54 -0700588
Marat Dukhan660fd192020-03-10 04:55:30 -0700589 TEST(F32_IBILINEAR__SSE_C4, output_stride) {
590 TEST_REQUIRES_X86_SSE;
591 for (size_t pixels = 1; pixels < 5; pixels += 1) {
592 for (size_t channels = 1; channels <= 20; channels += 3) {
593 IBilinearMicrokernelTester()
594 .pixels(pixels)
595 .channels(channels)
596 .output_stride(23)
597 .Test(xnn_f32_ibilinear_ukernel__sse_c4);
598 }
599 }
600 }
601#endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
602
603
604#if XNN_ARCH_X86 || XNN_ARCH_X86_64
605 TEST(F32_IBILINEAR__SSE_C8, channels_eq_8) {
606 TEST_REQUIRES_X86_SSE;
607 IBilinearMicrokernelTester()
608 .pixels(1)
609 .channels(8)
610 .Test(xnn_f32_ibilinear_ukernel__sse_c8);
611 }
612
613 TEST(F32_IBILINEAR__SSE_C8, channels_div_8) {
614 TEST_REQUIRES_X86_SSE;
615 for (size_t channels = 16; channels < 80; channels += 8) {
616 IBilinearMicrokernelTester()
617 .pixels(1)
618 .channels(channels)
619 .Test(xnn_f32_ibilinear_ukernel__sse_c8);
620 }
621 }
622
623 TEST(F32_IBILINEAR__SSE_C8, channels_lt_8) {
624 TEST_REQUIRES_X86_SSE;
625 for (size_t channels = 1; channels < 8; channels++) {
626 IBilinearMicrokernelTester()
627 .pixels(1)
628 .channels(channels)
629 .Test(xnn_f32_ibilinear_ukernel__sse_c8);
630 }
631 }
632
633 TEST(F32_IBILINEAR__SSE_C8, channels_gt_8) {
634 TEST_REQUIRES_X86_SSE;
635 for (size_t channels = 9; channels < 16; channels++) {
636 IBilinearMicrokernelTester()
637 .pixels(1)
638 .channels(channels)
639 .Test(xnn_f32_ibilinear_ukernel__sse_c8);
640 }
641 }
642
643 TEST(F32_IBILINEAR__SSE_C8, pixels_gt_1) {
644 TEST_REQUIRES_X86_SSE;
645 for (size_t pixels = 2; pixels < 3; pixels++) {
646 for (size_t channels = 1; channels <= 40; channels += 7) {
647 IBilinearMicrokernelTester()
648 .pixels(pixels)
649 .channels(channels)
650 .Test(xnn_f32_ibilinear_ukernel__sse_c8);
651 }
652 }
653 }
654
655 TEST(F32_IBILINEAR__SSE_C8, input_offset) {
656 TEST_REQUIRES_X86_SSE;
657 for (size_t pixels = 1; pixels < 5; pixels += 1) {
658 for (size_t channels = 1; channels <= 40; channels += 7) {
659 IBilinearMicrokernelTester()
660 .pixels(pixels)
661 .channels(channels)
662 .input_offset(43)
663 .Test(xnn_f32_ibilinear_ukernel__sse_c8);
664 }
665 }
666 }
XNNPACK Team6be46b22020-10-22 23:34:54 -0700667
Marat Dukhan660fd192020-03-10 04:55:30 -0700668 TEST(F32_IBILINEAR__SSE_C8, output_stride) {
669 TEST_REQUIRES_X86_SSE;
670 for (size_t pixels = 1; pixels < 5; pixels += 1) {
671 for (size_t channels = 1; channels <= 40; channels += 7) {
672 IBilinearMicrokernelTester()
673 .pixels(pixels)
674 .channels(channels)
675 .output_stride(43)
676 .Test(xnn_f32_ibilinear_ukernel__sse_c8);
677 }
678 }
679 }
680#endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
681
682
Marat Dukhan4c617792021-12-21 15:47:58 -0800683#if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
Marat Dukhan00d1d6e2020-07-09 01:37:27 -0700684 TEST(F32_IBILINEAR__WASMSIMD_C4, channels_eq_4) {
685 IBilinearMicrokernelTester()
686 .pixels(1)
687 .channels(4)
688 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c4);
689 }
690
691 TEST(F32_IBILINEAR__WASMSIMD_C4, channels_div_4) {
692 for (size_t channels = 8; channels < 40; channels += 4) {
693 IBilinearMicrokernelTester()
694 .pixels(1)
695 .channels(channels)
696 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c4);
697 }
698 }
699
700 TEST(F32_IBILINEAR__WASMSIMD_C4, channels_lt_4) {
701 for (size_t channels = 1; channels < 4; channels++) {
702 IBilinearMicrokernelTester()
703 .pixels(1)
704 .channels(channels)
705 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c4);
706 }
707 }
708
709 TEST(F32_IBILINEAR__WASMSIMD_C4, channels_gt_4) {
710 for (size_t channels = 5; channels < 8; channels++) {
711 IBilinearMicrokernelTester()
712 .pixels(1)
713 .channels(channels)
714 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c4);
715 }
716 }
717
718 TEST(F32_IBILINEAR__WASMSIMD_C4, pixels_gt_1) {
719 for (size_t pixels = 2; pixels < 3; pixels++) {
720 for (size_t channels = 1; channels <= 20; channels += 3) {
721 IBilinearMicrokernelTester()
722 .pixels(pixels)
723 .channels(channels)
724 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c4);
725 }
726 }
727 }
728
729 TEST(F32_IBILINEAR__WASMSIMD_C4, input_offset) {
730 for (size_t pixels = 1; pixels < 5; pixels += 1) {
731 for (size_t channels = 1; channels <= 20; channels += 3) {
732 IBilinearMicrokernelTester()
733 .pixels(pixels)
734 .channels(channels)
735 .input_offset(23)
736 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c4);
737 }
738 }
739 }
XNNPACK Team6be46b22020-10-22 23:34:54 -0700740
Marat Dukhan00d1d6e2020-07-09 01:37:27 -0700741 TEST(F32_IBILINEAR__WASMSIMD_C4, output_stride) {
742 for (size_t pixels = 1; pixels < 5; pixels += 1) {
743 for (size_t channels = 1; channels <= 20; channels += 3) {
744 IBilinearMicrokernelTester()
745 .pixels(pixels)
746 .channels(channels)
747 .output_stride(23)
748 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c4);
749 }
750 }
751 }
Marat Dukhan4c617792021-12-21 15:47:58 -0800752#endif // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
Marat Dukhan00d1d6e2020-07-09 01:37:27 -0700753
754
Marat Dukhan4c617792021-12-21 15:47:58 -0800755#if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
Marat Dukhan00d1d6e2020-07-09 01:37:27 -0700756 TEST(F32_IBILINEAR__WASMSIMD_C8, channels_eq_8) {
757 IBilinearMicrokernelTester()
758 .pixels(1)
759 .channels(8)
760 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c8);
761 }
762
763 TEST(F32_IBILINEAR__WASMSIMD_C8, channels_div_8) {
764 for (size_t channels = 16; channels < 80; channels += 8) {
765 IBilinearMicrokernelTester()
766 .pixels(1)
767 .channels(channels)
768 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c8);
769 }
770 }
771
772 TEST(F32_IBILINEAR__WASMSIMD_C8, channels_lt_8) {
773 for (size_t channels = 1; channels < 8; channels++) {
774 IBilinearMicrokernelTester()
775 .pixels(1)
776 .channels(channels)
777 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c8);
778 }
779 }
780
781 TEST(F32_IBILINEAR__WASMSIMD_C8, channels_gt_8) {
782 for (size_t channels = 9; channels < 16; channels++) {
783 IBilinearMicrokernelTester()
784 .pixels(1)
785 .channels(channels)
786 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c8);
787 }
788 }
789
790 TEST(F32_IBILINEAR__WASMSIMD_C8, pixels_gt_1) {
791 for (size_t pixels = 2; pixels < 3; pixels++) {
792 for (size_t channels = 1; channels <= 40; channels += 7) {
793 IBilinearMicrokernelTester()
794 .pixels(pixels)
795 .channels(channels)
796 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c8);
797 }
798 }
799 }
800
801 TEST(F32_IBILINEAR__WASMSIMD_C8, input_offset) {
802 for (size_t pixels = 1; pixels < 5; pixels += 1) {
803 for (size_t channels = 1; channels <= 40; channels += 7) {
804 IBilinearMicrokernelTester()
805 .pixels(pixels)
806 .channels(channels)
807 .input_offset(43)
808 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c8);
809 }
810 }
811 }
XNNPACK Team6be46b22020-10-22 23:34:54 -0700812
Marat Dukhan00d1d6e2020-07-09 01:37:27 -0700813 TEST(F32_IBILINEAR__WASMSIMD_C8, output_stride) {
814 for (size_t pixels = 1; pixels < 5; pixels += 1) {
815 for (size_t channels = 1; channels <= 40; channels += 7) {
816 IBilinearMicrokernelTester()
817 .pixels(pixels)
818 .channels(channels)
819 .output_stride(43)
820 .Test(xnn_f32_ibilinear_ukernel__wasmsimd_c8);
821 }
822 }
823 }
Marat Dukhan4c617792021-12-21 15:47:58 -0800824#endif // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD