1 // Copyright (c) Facebook, Inc. and its affiliates.
2 // All rights reserved.
3 //
4 // Copyright 2019 Google LLC
5 //
6 // This source code is licensed under the BSD-style license found in the
7 // LICENSE file in the root directory of this source tree.
8
9 #include <gtest/gtest.h>
10
11 #include <xnnpack/common.h>
12 #include <xnnpack/isa-checks.h>
13
14 #include <xnnpack/gavgpool.h>
15 #include "gavgpool-microkernel-tester.h"
16
17
18 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_eq_8_fulltile)19 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_eq_8_fulltile) {
20 TEST_REQUIRES_ARM_NEON;
21 GAvgPoolMicrokernelTester()
22 .rows(7)
23 .channels(8)
24 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
25 }
26
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_eq_8_subtile)27 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_eq_8_subtile) {
28 TEST_REQUIRES_ARM_NEON;
29 for (size_t rows = 1; rows < 7; rows++) {
30 GAvgPoolMicrokernelTester()
31 .rows(rows)
32 .channels(8)
33 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
34 }
35 }
36
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_eq_8_fulltile_with_input_stride)37 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_eq_8_fulltile_with_input_stride) {
38 TEST_REQUIRES_ARM_NEON;
39 GAvgPoolMicrokernelTester()
40 .rows(7)
41 .channels(8)
42 .input_stride(11)
43 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
44 }
45
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_eq_8_fulltile_with_input_scale)46 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_eq_8_fulltile_with_input_scale) {
47 TEST_REQUIRES_ARM_NEON;
48 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
49 GAvgPoolMicrokernelTester()
50 .rows(7)
51 .channels(8)
52 .input_scale(input_scale)
53 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
54 }
55 }
56
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_eq_8_fulltile_with_input_zero_point)57 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_eq_8_fulltile_with_input_zero_point) {
58 TEST_REQUIRES_ARM_NEON;
59 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
60 GAvgPoolMicrokernelTester()
61 .rows(7)
62 .channels(8)
63 .input_zero_point(input_zero_point)
64 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
65 }
66 }
67
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_eq_8_fulltile_with_output_scale)68 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_eq_8_fulltile_with_output_scale) {
69 TEST_REQUIRES_ARM_NEON;
70 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
71 GAvgPoolMicrokernelTester()
72 .rows(7)
73 .channels(8)
74 .output_scale(output_scale)
75 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
76 }
77 }
78
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_eq_8_fulltile_with_output_zero_point)79 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_eq_8_fulltile_with_output_zero_point) {
80 TEST_REQUIRES_ARM_NEON;
81 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
82 GAvgPoolMicrokernelTester()
83 .rows(7)
84 .channels(8)
85 .output_zero_point(output_zero_point)
86 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
87 }
88 }
89
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_eq_8_fulltile_with_qmax)90 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_eq_8_fulltile_with_qmax) {
91 TEST_REQUIRES_ARM_NEON;
92 GAvgPoolMicrokernelTester()
93 .rows(7)
94 .channels(8)
95 .input_zero_point(128)
96 .output_zero_point(128)
97 .input_scale(1.0f)
98 .output_scale(1.0f)
99 .qmax(128)
100 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
101 }
102
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_eq_8_fulltile_with_qmin)103 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_eq_8_fulltile_with_qmin) {
104 TEST_REQUIRES_ARM_NEON;
105 GAvgPoolMicrokernelTester()
106 .rows(7)
107 .channels(8)
108 .input_zero_point(128)
109 .output_zero_point(128)
110 .input_scale(1.0f)
111 .output_scale(1.0f)
112 .qmin(128)
113 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
114 }
115
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_div_8_fulltile)116 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_div_8_fulltile) {
117 TEST_REQUIRES_ARM_NEON;
118 for (size_t channels = 8; channels < 128; channels += 24) {
119 GAvgPoolMicrokernelTester()
120 .rows(7)
121 .channels(channels)
122 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
123 }
124 }
125
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_div_8_subtile)126 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_div_8_subtile) {
127 TEST_REQUIRES_ARM_NEON;
128 for (size_t channels = 8; channels < 128; channels += 24) {
129 for (size_t rows = 1; rows < 7; rows++) {
130 GAvgPoolMicrokernelTester()
131 .rows(rows)
132 .channels(channels)
133 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
134 }
135 }
136 }
137
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_lt_8_fulltile)138 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_lt_8_fulltile) {
139 TEST_REQUIRES_ARM_NEON;
140 for (size_t channels = 1; channels < 8; channels++) {
141 GAvgPoolMicrokernelTester()
142 .rows(7)
143 .channels(channels)
144 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
145 }
146 }
147
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_lt_8_subtile)148 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_lt_8_subtile) {
149 TEST_REQUIRES_ARM_NEON;
150 for (size_t channels = 1; channels < 8; channels++) {
151 for (size_t rows = 1; rows < 7; rows++) {
152 GAvgPoolMicrokernelTester()
153 .rows(rows)
154 .channels(channels)
155 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
156 }
157 }
158 }
159
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_lt_8_fulltile_with_input_scale)160 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_lt_8_fulltile_with_input_scale) {
161 TEST_REQUIRES_ARM_NEON;
162 for (size_t channels = 1; channels < 8; channels++) {
163 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
164 GAvgPoolMicrokernelTester()
165 .rows(7)
166 .channels(channels)
167 .input_scale(input_scale)
168 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
169 }
170 }
171 }
172
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_lt_8_fulltile_with_input_zero_point)173 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_lt_8_fulltile_with_input_zero_point) {
174 TEST_REQUIRES_ARM_NEON;
175 for (size_t channels = 1; channels < 8; channels++) {
176 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
177 GAvgPoolMicrokernelTester()
178 .rows(7)
179 .channels(channels)
180 .input_zero_point(input_zero_point)
181 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
182 }
183 }
184 }
185
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_lt_8_fulltile_with_output_scale)186 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_lt_8_fulltile_with_output_scale) {
187 TEST_REQUIRES_ARM_NEON;
188 for (size_t channels = 1; channels < 8; channels++) {
189 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
190 GAvgPoolMicrokernelTester()
191 .rows(7)
192 .channels(channels)
193 .output_scale(output_scale)
194 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
195 }
196 }
197 }
198
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_lt_8_fulltile_with_output_zero_point)199 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_lt_8_fulltile_with_output_zero_point) {
200 TEST_REQUIRES_ARM_NEON;
201 for (size_t channels = 1; channels < 8; channels++) {
202 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
203 GAvgPoolMicrokernelTester()
204 .rows(7)
205 .channels(channels)
206 .output_zero_point(output_zero_point)
207 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
208 }
209 }
210 }
211
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_lt_8_fulltile_with_qmax)212 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_lt_8_fulltile_with_qmax) {
213 TEST_REQUIRES_ARM_NEON;
214 for (size_t channels = 1; channels < 8; channels++) {
215 GAvgPoolMicrokernelTester()
216 .rows(7)
217 .channels(channels)
218 .input_zero_point(128)
219 .output_zero_point(128)
220 .input_scale(1.0f)
221 .output_scale(1.0f)
222 .qmax(128)
223 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
224 }
225 }
226
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_lt_8_fulltile_with_qmin)227 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_lt_8_fulltile_with_qmin) {
228 TEST_REQUIRES_ARM_NEON;
229 for (size_t channels = 1; channels < 8; channels++) {
230 GAvgPoolMicrokernelTester()
231 .rows(7)
232 .channels(channels)
233 .input_zero_point(128)
234 .output_zero_point(128)
235 .input_scale(1.0f)
236 .output_scale(1.0f)
237 .qmin(128)
238 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
239 }
240 }
241
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_gt_8_fulltile)242 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_gt_8_fulltile) {
243 TEST_REQUIRES_ARM_NEON;
244 for (size_t channels = 9; channels < 16; channels++) {
245 GAvgPoolMicrokernelTester()
246 .rows(7)
247 .channels(channels)
248 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
249 }
250 }
251
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_gt_8_subtile)252 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_gt_8_subtile) {
253 TEST_REQUIRES_ARM_NEON;
254 for (size_t channels = 9; channels < 16; channels++) {
255 for (size_t rows = 1; rows < 7; rows++) {
256 GAvgPoolMicrokernelTester()
257 .rows(rows)
258 .channels(channels)
259 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
260 }
261 }
262 }
263
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_gt_8_fulltile_with_input_scale)264 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_gt_8_fulltile_with_input_scale) {
265 TEST_REQUIRES_ARM_NEON;
266 for (size_t channels = 9; channels < 16; channels++) {
267 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
268 GAvgPoolMicrokernelTester()
269 .rows(7)
270 .channels(channels)
271 .input_scale(input_scale)
272 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
273 }
274 }
275 }
276
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_gt_8_fulltile_with_input_zero_point)277 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_gt_8_fulltile_with_input_zero_point) {
278 TEST_REQUIRES_ARM_NEON;
279 for (size_t channels = 9; channels < 16; channels++) {
280 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
281 GAvgPoolMicrokernelTester()
282 .rows(7)
283 .channels(channels)
284 .input_zero_point(input_zero_point)
285 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
286 }
287 }
288 }
289
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_gt_8_fulltile_with_output_scale)290 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_gt_8_fulltile_with_output_scale) {
291 TEST_REQUIRES_ARM_NEON;
292 for (size_t channels = 9; channels < 16; channels++) {
293 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
294 GAvgPoolMicrokernelTester()
295 .rows(7)
296 .channels(channels)
297 .output_scale(output_scale)
298 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
299 }
300 }
301 }
302
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_gt_8_fulltile_with_output_zero_point)303 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_gt_8_fulltile_with_output_zero_point) {
304 TEST_REQUIRES_ARM_NEON;
305 for (size_t channels = 9; channels < 16; channels++) {
306 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
307 GAvgPoolMicrokernelTester()
308 .rows(7)
309 .channels(channels)
310 .output_zero_point(output_zero_point)
311 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
312 }
313 }
314 }
315
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_gt_8_fulltile_with_qmax)316 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_gt_8_fulltile_with_qmax) {
317 TEST_REQUIRES_ARM_NEON;
318 for (size_t channels = 9; channels < 16; channels++) {
319 GAvgPoolMicrokernelTester()
320 .rows(7)
321 .channels(channels)
322 .input_zero_point(128)
323 .output_zero_point(128)
324 .input_scale(1.0f)
325 .output_scale(1.0f)
326 .qmax(128)
327 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
328 }
329 }
330
TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8,channels_gt_8_fulltile_with_qmin)331 TEST(QU8_GAVGPOOL_MINMAX_7X__NEON_C8, channels_gt_8_fulltile_with_qmin) {
332 TEST_REQUIRES_ARM_NEON;
333 for (size_t channels = 9; channels < 16; channels++) {
334 GAvgPoolMicrokernelTester()
335 .rows(7)
336 .channels(channels)
337 .input_zero_point(128)
338 .output_zero_point(128)
339 .input_scale(1.0f)
340 .output_scale(1.0f)
341 .qmin(128)
342 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__neon_c8);
343 }
344 }
345
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_fulltile)346 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_fulltile) {
347 TEST_REQUIRES_ARM_NEON;
348 GAvgPoolMicrokernelTester()
349 .rows(14)
350 .channels(8)
351 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
352 }
353
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_fulltile_with_input_stride)354 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_fulltile_with_input_stride) {
355 TEST_REQUIRES_ARM_NEON;
356 GAvgPoolMicrokernelTester()
357 .rows(14)
358 .channels(8)
359 .input_stride(11)
360 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
361 }
362
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_fulltile_with_input_scale)363 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_fulltile_with_input_scale) {
364 TEST_REQUIRES_ARM_NEON;
365 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
366 GAvgPoolMicrokernelTester()
367 .rows(14)
368 .channels(8)
369 .input_scale(input_scale)
370 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
371 }
372 }
373
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_fulltile_with_input_zero_point)374 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_fulltile_with_input_zero_point) {
375 TEST_REQUIRES_ARM_NEON;
376 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
377 GAvgPoolMicrokernelTester()
378 .rows(14)
379 .channels(8)
380 .input_zero_point(input_zero_point)
381 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
382 }
383 }
384
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_fulltile_with_output_scale)385 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_fulltile_with_output_scale) {
386 TEST_REQUIRES_ARM_NEON;
387 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
388 GAvgPoolMicrokernelTester()
389 .rows(14)
390 .channels(8)
391 .output_scale(output_scale)
392 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
393 }
394 }
395
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_fulltile_with_output_zero_point)396 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_fulltile_with_output_zero_point) {
397 TEST_REQUIRES_ARM_NEON;
398 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
399 GAvgPoolMicrokernelTester()
400 .rows(14)
401 .channels(8)
402 .output_zero_point(output_zero_point)
403 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
404 }
405 }
406
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_fulltile_with_qmax)407 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_fulltile_with_qmax) {
408 TEST_REQUIRES_ARM_NEON;
409 GAvgPoolMicrokernelTester()
410 .rows(14)
411 .channels(8)
412 .input_zero_point(128)
413 .output_zero_point(128)
414 .input_scale(1.0f)
415 .output_scale(1.0f)
416 .qmax(128)
417 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
418 }
419
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_fulltile_with_qmin)420 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_fulltile_with_qmin) {
421 TEST_REQUIRES_ARM_NEON;
422 GAvgPoolMicrokernelTester()
423 .rows(14)
424 .channels(8)
425 .input_zero_point(128)
426 .output_zero_point(128)
427 .input_scale(1.0f)
428 .output_scale(1.0f)
429 .qmin(128)
430 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
431 }
432
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_subtile)433 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_subtile) {
434 TEST_REQUIRES_ARM_NEON;
435 for (size_t rows = 1; rows < 7; rows++) {
436 GAvgPoolMicrokernelTester()
437 .rows(7 + rows)
438 .channels(8)
439 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
440 }
441 }
442
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_2pass_subtile_with_input_stride)443 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_2pass_subtile_with_input_stride) {
444 TEST_REQUIRES_ARM_NEON;
445 for (size_t rows = 1; rows < 7; rows++) {
446 GAvgPoolMicrokernelTester()
447 .rows(7 + rows)
448 .channels(8)
449 .input_stride(11)
450 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
451 }
452 }
453
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_multipass_fulltile)454 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_multipass_fulltile) {
455 TEST_REQUIRES_ARM_NEON;
456 for (size_t rows = 14; rows <= 35; rows += 7) {
457 GAvgPoolMicrokernelTester()
458 .rows(rows)
459 .channels(8)
460 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
461 }
462 }
463
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_eq_8_multipass_fulltile_with_input_stride)464 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_eq_8_multipass_fulltile_with_input_stride) {
465 TEST_REQUIRES_ARM_NEON;
466 for (size_t rows = 14; rows <= 35; rows += 7) {
467 GAvgPoolMicrokernelTester()
468 .rows(rows)
469 .channels(8)
470 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
471 }
472 }
473
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_div_8_2pass_fulltile)474 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_div_8_2pass_fulltile) {
475 TEST_REQUIRES_ARM_NEON;
476 for (size_t channels = 8; channels < 128; channels += 24) {
477 GAvgPoolMicrokernelTester()
478 .rows(14)
479 .channels(channels)
480 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
481 }
482 }
483
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_div_8_2pass_subtile)484 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_div_8_2pass_subtile) {
485 TEST_REQUIRES_ARM_NEON;
486 for (size_t channels = 8; channels < 128; channels += 24) {
487 for (size_t rows = 1; rows < 7; rows++) {
488 GAvgPoolMicrokernelTester()
489 .rows(7 + rows)
490 .channels(channels)
491 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
492 }
493 }
494 }
495
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_div_8_multipass_fulltile)496 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_div_8_multipass_fulltile) {
497 TEST_REQUIRES_ARM_NEON;
498 for (size_t channels = 8; channels < 128; channels += 24) {
499 for (size_t rows = 14; rows <= 35; rows += 7) {
500 GAvgPoolMicrokernelTester()
501 .rows(rows)
502 .channels(channels)
503 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
504 }
505 }
506 }
507
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_div_8_multipass_fulltile_with_input_stride)508 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_div_8_multipass_fulltile_with_input_stride) {
509 TEST_REQUIRES_ARM_NEON;
510 for (size_t channels = 8; channels < 128; channels += 24) {
511 for (size_t rows = 14; rows <= 35; rows += 7) {
512 GAvgPoolMicrokernelTester()
513 .rows(rows)
514 .channels(channels)
515 .input_stride(131)
516 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
517 }
518 }
519 }
520
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_2pass_fulltile)521 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_2pass_fulltile) {
522 TEST_REQUIRES_ARM_NEON;
523 for (size_t channels = 1; channels < 8; channels++) {
524 GAvgPoolMicrokernelTester()
525 .rows(14)
526 .channels(channels)
527 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
528 }
529 }
530
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_2pass_fulltile_with_input_scale)531 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_2pass_fulltile_with_input_scale) {
532 TEST_REQUIRES_ARM_NEON;
533 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
534 for (size_t channels = 1; channels < 8; channels++) {
535 GAvgPoolMicrokernelTester()
536 .rows(14)
537 .channels(channels)
538 .input_scale(input_scale)
539 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
540 }
541 }
542 }
543
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_2pass_fulltile_with_input_zero_point)544 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_2pass_fulltile_with_input_zero_point) {
545 TEST_REQUIRES_ARM_NEON;
546 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
547 for (size_t channels = 1; channels < 8; channels++) {
548 GAvgPoolMicrokernelTester()
549 .rows(14)
550 .channels(channels)
551 .input_zero_point(input_zero_point)
552 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
553 }
554 }
555 }
556
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_2pass_fulltile_with_output_scale)557 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_2pass_fulltile_with_output_scale) {
558 TEST_REQUIRES_ARM_NEON;
559 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
560 for (size_t channels = 1; channels < 8; channels++) {
561 GAvgPoolMicrokernelTester()
562 .rows(14)
563 .channels(channels)
564 .output_scale(output_scale)
565 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
566 }
567 }
568 }
569
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_2pass_fulltile_with_output_zero_point)570 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_2pass_fulltile_with_output_zero_point) {
571 TEST_REQUIRES_ARM_NEON;
572 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
573 for (size_t channels = 1; channels < 8; channels++) {
574 GAvgPoolMicrokernelTester()
575 .rows(14)
576 .channels(channels)
577 .output_zero_point(output_zero_point)
578 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
579 }
580 }
581 }
582
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_2pass_fulltile_with_qmax)583 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_2pass_fulltile_with_qmax) {
584 TEST_REQUIRES_ARM_NEON;
585 for (size_t channels = 1; channels < 8; channels++) {
586 GAvgPoolMicrokernelTester()
587 .rows(14)
588 .channels(channels)
589 .input_zero_point(128)
590 .output_zero_point(128)
591 .input_scale(1.0f)
592 .output_scale(1.0f)
593 .qmax(128)
594 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
595 }
596 }
597
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_2pass_fulltile_with_qmin)598 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_2pass_fulltile_with_qmin) {
599 TEST_REQUIRES_ARM_NEON;
600 for (size_t channels = 1; channels < 8; channels++) {
601 GAvgPoolMicrokernelTester()
602 .rows(14)
603 .channels(channels)
604 .input_zero_point(128)
605 .output_zero_point(128)
606 .input_scale(1.0f)
607 .output_scale(1.0f)
608 .qmin(128)
609 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
610 }
611 }
612
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_2pass_subtile)613 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_2pass_subtile) {
614 TEST_REQUIRES_ARM_NEON;
615 for (size_t channels = 1; channels < 8; channels++) {
616 for (size_t rows = 1; rows < 7; rows++) {
617 GAvgPoolMicrokernelTester()
618 .rows(7 + rows)
619 .channels(channels)
620 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
621 }
622 }
623 }
624
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_multipass_fulltile)625 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_multipass_fulltile) {
626 TEST_REQUIRES_ARM_NEON;
627 for (size_t channels = 1; channels < 8; channels++) {
628 for (size_t rows = 14; rows <= 35; rows += 7) {
629 GAvgPoolMicrokernelTester()
630 .rows(rows)
631 .channels(channels)
632 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
633 }
634 }
635 }
636
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_lt_8_multipass_fulltile_with_input_stride)637 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_lt_8_multipass_fulltile_with_input_stride) {
638 TEST_REQUIRES_ARM_NEON;
639 for (size_t channels = 1; channels < 8; channels++) {
640 for (size_t rows = 14; rows <= 35; rows += 7) {
641 GAvgPoolMicrokernelTester()
642 .rows(rows)
643 .channels(channels)
644 .input_stride(23)
645 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
646 }
647 }
648 }
649
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_2pass_fulltile)650 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_2pass_fulltile) {
651 TEST_REQUIRES_ARM_NEON;
652 for (size_t channels = 9; channels < 16; channels++) {
653 GAvgPoolMicrokernelTester()
654 .rows(14)
655 .channels(channels)
656 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
657 }
658 }
659
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_2pass_fulltile_with_input_scale)660 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_2pass_fulltile_with_input_scale) {
661 TEST_REQUIRES_ARM_NEON;
662 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
663 for (size_t channels = 9; channels < 16; channels++) {
664 GAvgPoolMicrokernelTester()
665 .rows(14)
666 .channels(channels)
667 .input_scale(input_scale)
668 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
669 }
670 }
671 }
672
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_2pass_fulltile_with_input_zero_point)673 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_2pass_fulltile_with_input_zero_point) {
674 TEST_REQUIRES_ARM_NEON;
675 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
676 for (size_t channels = 9; channels < 16; channels++) {
677 GAvgPoolMicrokernelTester()
678 .rows(14)
679 .channels(channels)
680 .input_zero_point(input_zero_point)
681 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
682 }
683 }
684 }
685
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_2pass_fulltile_with_output_scale)686 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_2pass_fulltile_with_output_scale) {
687 TEST_REQUIRES_ARM_NEON;
688 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
689 for (size_t channels = 9; channels < 16; channels++) {
690 GAvgPoolMicrokernelTester()
691 .rows(14)
692 .channels(channels)
693 .output_scale(output_scale)
694 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
695 }
696 }
697 }
698
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_2pass_fulltile_with_output_zero_point)699 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_2pass_fulltile_with_output_zero_point) {
700 TEST_REQUIRES_ARM_NEON;
701 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
702 for (size_t channels = 9; channels < 16; channels++) {
703 GAvgPoolMicrokernelTester()
704 .rows(14)
705 .channels(channels)
706 .output_zero_point(output_zero_point)
707 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
708 }
709 }
710 }
711
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_2pass_fulltile_with_qmax)712 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_2pass_fulltile_with_qmax) {
713 TEST_REQUIRES_ARM_NEON;
714 for (size_t channels = 9; channels < 16; channels++) {
715 GAvgPoolMicrokernelTester()
716 .rows(14)
717 .channels(channels)
718 .input_zero_point(128)
719 .output_zero_point(128)
720 .input_scale(1.0f)
721 .output_scale(1.0f)
722 .qmax(128)
723 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
724 }
725 }
726
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_2pass_fulltile_with_qmin)727 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_2pass_fulltile_with_qmin) {
728 TEST_REQUIRES_ARM_NEON;
729 for (size_t channels = 9; channels < 16; channels++) {
730 GAvgPoolMicrokernelTester()
731 .rows(14)
732 .channels(channels)
733 .input_zero_point(128)
734 .output_zero_point(128)
735 .input_scale(1.0f)
736 .output_scale(1.0f)
737 .qmin(128)
738 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
739 }
740 }
741
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_2pass_subtile)742 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_2pass_subtile) {
743 TEST_REQUIRES_ARM_NEON;
744 for (size_t channels = 9; channels < 16; channels++) {
745 for (size_t rows = 1; rows < 7; rows++) {
746 GAvgPoolMicrokernelTester()
747 .rows(7 + rows)
748 .channels(channels)
749 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
750 }
751 }
752 }
753
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_multipass_fulltile)754 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_multipass_fulltile) {
755 TEST_REQUIRES_ARM_NEON;
756 for (size_t channels = 9; channels < 16; channels++) {
757 for (size_t rows = 14; rows <= 35; rows += 7) {
758 GAvgPoolMicrokernelTester()
759 .rows(rows)
760 .channels(channels)
761 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
762 }
763 }
764 }
765
TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8,channels_gt_8_multipass_fulltile_with_input_stride)766 TEST(QU8_GAVGPOOL_MINMAX_7P7X__NEON_C8, channels_gt_8_multipass_fulltile_with_input_stride) {
767 TEST_REQUIRES_ARM_NEON;
768 for (size_t channels = 9; channels < 16; channels++) {
769 for (size_t rows = 14; rows <= 35; rows += 7) {
770 GAvgPoolMicrokernelTester()
771 .rows(rows)
772 .channels(channels)
773 .input_stride(23)
774 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__neon_c8);
775 }
776 }
777 }
778 #endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
779
780 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_eq_8_fulltile)781 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_eq_8_fulltile) {
782 TEST_REQUIRES_X86_SSE2;
783 GAvgPoolMicrokernelTester()
784 .rows(7)
785 .channels(8)
786 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
787 }
788
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_eq_8_subtile)789 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_eq_8_subtile) {
790 TEST_REQUIRES_X86_SSE2;
791 for (size_t rows = 1; rows < 7; rows++) {
792 GAvgPoolMicrokernelTester()
793 .rows(rows)
794 .channels(8)
795 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
796 }
797 }
798
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_eq_8_fulltile_with_input_stride)799 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_eq_8_fulltile_with_input_stride) {
800 TEST_REQUIRES_X86_SSE2;
801 GAvgPoolMicrokernelTester()
802 .rows(7)
803 .channels(8)
804 .input_stride(11)
805 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
806 }
807
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_eq_8_fulltile_with_input_scale)808 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_eq_8_fulltile_with_input_scale) {
809 TEST_REQUIRES_X86_SSE2;
810 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
811 GAvgPoolMicrokernelTester()
812 .rows(7)
813 .channels(8)
814 .input_scale(input_scale)
815 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
816 }
817 }
818
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_eq_8_fulltile_with_input_zero_point)819 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_eq_8_fulltile_with_input_zero_point) {
820 TEST_REQUIRES_X86_SSE2;
821 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
822 GAvgPoolMicrokernelTester()
823 .rows(7)
824 .channels(8)
825 .input_zero_point(input_zero_point)
826 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
827 }
828 }
829
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_eq_8_fulltile_with_output_scale)830 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_eq_8_fulltile_with_output_scale) {
831 TEST_REQUIRES_X86_SSE2;
832 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
833 GAvgPoolMicrokernelTester()
834 .rows(7)
835 .channels(8)
836 .output_scale(output_scale)
837 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
838 }
839 }
840
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_eq_8_fulltile_with_output_zero_point)841 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_eq_8_fulltile_with_output_zero_point) {
842 TEST_REQUIRES_X86_SSE2;
843 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
844 GAvgPoolMicrokernelTester()
845 .rows(7)
846 .channels(8)
847 .output_zero_point(output_zero_point)
848 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
849 }
850 }
851
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_eq_8_fulltile_with_qmax)852 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_eq_8_fulltile_with_qmax) {
853 TEST_REQUIRES_X86_SSE2;
854 GAvgPoolMicrokernelTester()
855 .rows(7)
856 .channels(8)
857 .input_zero_point(128)
858 .output_zero_point(128)
859 .input_scale(1.0f)
860 .output_scale(1.0f)
861 .qmax(128)
862 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
863 }
864
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_eq_8_fulltile_with_qmin)865 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_eq_8_fulltile_with_qmin) {
866 TEST_REQUIRES_X86_SSE2;
867 GAvgPoolMicrokernelTester()
868 .rows(7)
869 .channels(8)
870 .input_zero_point(128)
871 .output_zero_point(128)
872 .input_scale(1.0f)
873 .output_scale(1.0f)
874 .qmin(128)
875 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
876 }
877
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_div_8_fulltile)878 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_div_8_fulltile) {
879 TEST_REQUIRES_X86_SSE2;
880 for (size_t channels = 8; channels < 128; channels += 24) {
881 GAvgPoolMicrokernelTester()
882 .rows(7)
883 .channels(channels)
884 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
885 }
886 }
887
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_div_8_subtile)888 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_div_8_subtile) {
889 TEST_REQUIRES_X86_SSE2;
890 for (size_t channels = 8; channels < 128; channels += 24) {
891 for (size_t rows = 1; rows < 7; rows++) {
892 GAvgPoolMicrokernelTester()
893 .rows(rows)
894 .channels(channels)
895 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
896 }
897 }
898 }
899
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_lt_8_fulltile)900 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_lt_8_fulltile) {
901 TEST_REQUIRES_X86_SSE2;
902 for (size_t channels = 1; channels < 8; channels++) {
903 GAvgPoolMicrokernelTester()
904 .rows(7)
905 .channels(channels)
906 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
907 }
908 }
909
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_lt_8_subtile)910 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_lt_8_subtile) {
911 TEST_REQUIRES_X86_SSE2;
912 for (size_t channels = 1; channels < 8; channels++) {
913 for (size_t rows = 1; rows < 7; rows++) {
914 GAvgPoolMicrokernelTester()
915 .rows(rows)
916 .channels(channels)
917 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
918 }
919 }
920 }
921
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_lt_8_fulltile_with_input_scale)922 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_lt_8_fulltile_with_input_scale) {
923 TEST_REQUIRES_X86_SSE2;
924 for (size_t channels = 1; channels < 8; channels++) {
925 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
926 GAvgPoolMicrokernelTester()
927 .rows(7)
928 .channels(channels)
929 .input_scale(input_scale)
930 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
931 }
932 }
933 }
934
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_lt_8_fulltile_with_input_zero_point)935 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_lt_8_fulltile_with_input_zero_point) {
936 TEST_REQUIRES_X86_SSE2;
937 for (size_t channels = 1; channels < 8; channels++) {
938 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
939 GAvgPoolMicrokernelTester()
940 .rows(7)
941 .channels(channels)
942 .input_zero_point(input_zero_point)
943 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
944 }
945 }
946 }
947
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_lt_8_fulltile_with_output_scale)948 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_lt_8_fulltile_with_output_scale) {
949 TEST_REQUIRES_X86_SSE2;
950 for (size_t channels = 1; channels < 8; channels++) {
951 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
952 GAvgPoolMicrokernelTester()
953 .rows(7)
954 .channels(channels)
955 .output_scale(output_scale)
956 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
957 }
958 }
959 }
960
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_lt_8_fulltile_with_output_zero_point)961 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_lt_8_fulltile_with_output_zero_point) {
962 TEST_REQUIRES_X86_SSE2;
963 for (size_t channels = 1; channels < 8; channels++) {
964 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
965 GAvgPoolMicrokernelTester()
966 .rows(7)
967 .channels(channels)
968 .output_zero_point(output_zero_point)
969 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
970 }
971 }
972 }
973
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_lt_8_fulltile_with_qmax)974 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_lt_8_fulltile_with_qmax) {
975 TEST_REQUIRES_X86_SSE2;
976 for (size_t channels = 1; channels < 8; channels++) {
977 GAvgPoolMicrokernelTester()
978 .rows(7)
979 .channels(channels)
980 .input_zero_point(128)
981 .output_zero_point(128)
982 .input_scale(1.0f)
983 .output_scale(1.0f)
984 .qmax(128)
985 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
986 }
987 }
988
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_lt_8_fulltile_with_qmin)989 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_lt_8_fulltile_with_qmin) {
990 TEST_REQUIRES_X86_SSE2;
991 for (size_t channels = 1; channels < 8; channels++) {
992 GAvgPoolMicrokernelTester()
993 .rows(7)
994 .channels(channels)
995 .input_zero_point(128)
996 .output_zero_point(128)
997 .input_scale(1.0f)
998 .output_scale(1.0f)
999 .qmin(128)
1000 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
1001 }
1002 }
1003
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_gt_8_fulltile)1004 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_gt_8_fulltile) {
1005 TEST_REQUIRES_X86_SSE2;
1006 for (size_t channels = 9; channels < 16; channels++) {
1007 GAvgPoolMicrokernelTester()
1008 .rows(7)
1009 .channels(channels)
1010 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
1011 }
1012 }
1013
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_gt_8_subtile)1014 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_gt_8_subtile) {
1015 TEST_REQUIRES_X86_SSE2;
1016 for (size_t channels = 9; channels < 16; channels++) {
1017 for (size_t rows = 1; rows < 7; rows++) {
1018 GAvgPoolMicrokernelTester()
1019 .rows(rows)
1020 .channels(channels)
1021 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
1022 }
1023 }
1024 }
1025
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_gt_8_fulltile_with_input_scale)1026 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_gt_8_fulltile_with_input_scale) {
1027 TEST_REQUIRES_X86_SSE2;
1028 for (size_t channels = 9; channels < 16; channels++) {
1029 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
1030 GAvgPoolMicrokernelTester()
1031 .rows(7)
1032 .channels(channels)
1033 .input_scale(input_scale)
1034 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
1035 }
1036 }
1037 }
1038
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_gt_8_fulltile_with_input_zero_point)1039 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_gt_8_fulltile_with_input_zero_point) {
1040 TEST_REQUIRES_X86_SSE2;
1041 for (size_t channels = 9; channels < 16; channels++) {
1042 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
1043 GAvgPoolMicrokernelTester()
1044 .rows(7)
1045 .channels(channels)
1046 .input_zero_point(input_zero_point)
1047 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
1048 }
1049 }
1050 }
1051
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_gt_8_fulltile_with_output_scale)1052 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_gt_8_fulltile_with_output_scale) {
1053 TEST_REQUIRES_X86_SSE2;
1054 for (size_t channels = 9; channels < 16; channels++) {
1055 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
1056 GAvgPoolMicrokernelTester()
1057 .rows(7)
1058 .channels(channels)
1059 .output_scale(output_scale)
1060 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
1061 }
1062 }
1063 }
1064
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_gt_8_fulltile_with_output_zero_point)1065 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_gt_8_fulltile_with_output_zero_point) {
1066 TEST_REQUIRES_X86_SSE2;
1067 for (size_t channels = 9; channels < 16; channels++) {
1068 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
1069 GAvgPoolMicrokernelTester()
1070 .rows(7)
1071 .channels(channels)
1072 .output_zero_point(output_zero_point)
1073 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
1074 }
1075 }
1076 }
1077
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_gt_8_fulltile_with_qmax)1078 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_gt_8_fulltile_with_qmax) {
1079 TEST_REQUIRES_X86_SSE2;
1080 for (size_t channels = 9; channels < 16; channels++) {
1081 GAvgPoolMicrokernelTester()
1082 .rows(7)
1083 .channels(channels)
1084 .input_zero_point(128)
1085 .output_zero_point(128)
1086 .input_scale(1.0f)
1087 .output_scale(1.0f)
1088 .qmax(128)
1089 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
1090 }
1091 }
1092
TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8,channels_gt_8_fulltile_with_qmin)1093 TEST(QU8_GAVGPOOL_MINMAX_7X__SSE2_C8, channels_gt_8_fulltile_with_qmin) {
1094 TEST_REQUIRES_X86_SSE2;
1095 for (size_t channels = 9; channels < 16; channels++) {
1096 GAvgPoolMicrokernelTester()
1097 .rows(7)
1098 .channels(channels)
1099 .input_zero_point(128)
1100 .output_zero_point(128)
1101 .input_scale(1.0f)
1102 .output_scale(1.0f)
1103 .qmin(128)
1104 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__sse2_c8);
1105 }
1106 }
1107
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_fulltile)1108 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_fulltile) {
1109 TEST_REQUIRES_X86_SSE2;
1110 GAvgPoolMicrokernelTester()
1111 .rows(14)
1112 .channels(8)
1113 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1114 }
1115
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_fulltile_with_input_stride)1116 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_fulltile_with_input_stride) {
1117 TEST_REQUIRES_X86_SSE2;
1118 GAvgPoolMicrokernelTester()
1119 .rows(14)
1120 .channels(8)
1121 .input_stride(11)
1122 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1123 }
1124
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_fulltile_with_input_scale)1125 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_fulltile_with_input_scale) {
1126 TEST_REQUIRES_X86_SSE2;
1127 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
1128 GAvgPoolMicrokernelTester()
1129 .rows(14)
1130 .channels(8)
1131 .input_scale(input_scale)
1132 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1133 }
1134 }
1135
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_fulltile_with_input_zero_point)1136 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_fulltile_with_input_zero_point) {
1137 TEST_REQUIRES_X86_SSE2;
1138 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
1139 GAvgPoolMicrokernelTester()
1140 .rows(14)
1141 .channels(8)
1142 .input_zero_point(input_zero_point)
1143 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1144 }
1145 }
1146
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_fulltile_with_output_scale)1147 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_fulltile_with_output_scale) {
1148 TEST_REQUIRES_X86_SSE2;
1149 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
1150 GAvgPoolMicrokernelTester()
1151 .rows(14)
1152 .channels(8)
1153 .output_scale(output_scale)
1154 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1155 }
1156 }
1157
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_fulltile_with_output_zero_point)1158 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_fulltile_with_output_zero_point) {
1159 TEST_REQUIRES_X86_SSE2;
1160 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
1161 GAvgPoolMicrokernelTester()
1162 .rows(14)
1163 .channels(8)
1164 .output_zero_point(output_zero_point)
1165 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1166 }
1167 }
1168
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_fulltile_with_qmax)1169 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_fulltile_with_qmax) {
1170 TEST_REQUIRES_X86_SSE2;
1171 GAvgPoolMicrokernelTester()
1172 .rows(14)
1173 .channels(8)
1174 .input_zero_point(128)
1175 .output_zero_point(128)
1176 .input_scale(1.0f)
1177 .output_scale(1.0f)
1178 .qmax(128)
1179 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1180 }
1181
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_fulltile_with_qmin)1182 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_fulltile_with_qmin) {
1183 TEST_REQUIRES_X86_SSE2;
1184 GAvgPoolMicrokernelTester()
1185 .rows(14)
1186 .channels(8)
1187 .input_zero_point(128)
1188 .output_zero_point(128)
1189 .input_scale(1.0f)
1190 .output_scale(1.0f)
1191 .qmin(128)
1192 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1193 }
1194
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_subtile)1195 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_subtile) {
1196 TEST_REQUIRES_X86_SSE2;
1197 for (size_t rows = 1; rows < 7; rows++) {
1198 GAvgPoolMicrokernelTester()
1199 .rows(7 + rows)
1200 .channels(8)
1201 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1202 }
1203 }
1204
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_2pass_subtile_with_input_stride)1205 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_2pass_subtile_with_input_stride) {
1206 TEST_REQUIRES_X86_SSE2;
1207 for (size_t rows = 1; rows < 7; rows++) {
1208 GAvgPoolMicrokernelTester()
1209 .rows(7 + rows)
1210 .channels(8)
1211 .input_stride(11)
1212 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1213 }
1214 }
1215
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_multipass_fulltile)1216 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_multipass_fulltile) {
1217 TEST_REQUIRES_X86_SSE2;
1218 for (size_t rows = 14; rows <= 35; rows += 7) {
1219 GAvgPoolMicrokernelTester()
1220 .rows(rows)
1221 .channels(8)
1222 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1223 }
1224 }
1225
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_eq_8_multipass_fulltile_with_input_stride)1226 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_eq_8_multipass_fulltile_with_input_stride) {
1227 TEST_REQUIRES_X86_SSE2;
1228 for (size_t rows = 14; rows <= 35; rows += 7) {
1229 GAvgPoolMicrokernelTester()
1230 .rows(rows)
1231 .channels(8)
1232 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1233 }
1234 }
1235
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_div_8_2pass_fulltile)1236 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_div_8_2pass_fulltile) {
1237 TEST_REQUIRES_X86_SSE2;
1238 for (size_t channels = 8; channels < 128; channels += 24) {
1239 GAvgPoolMicrokernelTester()
1240 .rows(14)
1241 .channels(channels)
1242 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1243 }
1244 }
1245
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_div_8_2pass_subtile)1246 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_div_8_2pass_subtile) {
1247 TEST_REQUIRES_X86_SSE2;
1248 for (size_t channels = 8; channels < 128; channels += 24) {
1249 for (size_t rows = 1; rows < 7; rows++) {
1250 GAvgPoolMicrokernelTester()
1251 .rows(7 + rows)
1252 .channels(channels)
1253 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1254 }
1255 }
1256 }
1257
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_div_8_multipass_fulltile)1258 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_div_8_multipass_fulltile) {
1259 TEST_REQUIRES_X86_SSE2;
1260 for (size_t channels = 8; channels < 128; channels += 24) {
1261 for (size_t rows = 14; rows <= 35; rows += 7) {
1262 GAvgPoolMicrokernelTester()
1263 .rows(rows)
1264 .channels(channels)
1265 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1266 }
1267 }
1268 }
1269
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_div_8_multipass_fulltile_with_input_stride)1270 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_div_8_multipass_fulltile_with_input_stride) {
1271 TEST_REQUIRES_X86_SSE2;
1272 for (size_t channels = 8; channels < 128; channels += 24) {
1273 for (size_t rows = 14; rows <= 35; rows += 7) {
1274 GAvgPoolMicrokernelTester()
1275 .rows(rows)
1276 .channels(channels)
1277 .input_stride(131)
1278 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1279 }
1280 }
1281 }
1282
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_2pass_fulltile)1283 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_2pass_fulltile) {
1284 TEST_REQUIRES_X86_SSE2;
1285 for (size_t channels = 1; channels < 8; channels++) {
1286 GAvgPoolMicrokernelTester()
1287 .rows(14)
1288 .channels(channels)
1289 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1290 }
1291 }
1292
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_2pass_fulltile_with_input_scale)1293 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_2pass_fulltile_with_input_scale) {
1294 TEST_REQUIRES_X86_SSE2;
1295 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
1296 for (size_t channels = 1; channels < 8; channels++) {
1297 GAvgPoolMicrokernelTester()
1298 .rows(14)
1299 .channels(channels)
1300 .input_scale(input_scale)
1301 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1302 }
1303 }
1304 }
1305
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_2pass_fulltile_with_input_zero_point)1306 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_2pass_fulltile_with_input_zero_point) {
1307 TEST_REQUIRES_X86_SSE2;
1308 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
1309 for (size_t channels = 1; channels < 8; channels++) {
1310 GAvgPoolMicrokernelTester()
1311 .rows(14)
1312 .channels(channels)
1313 .input_zero_point(input_zero_point)
1314 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1315 }
1316 }
1317 }
1318
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_2pass_fulltile_with_output_scale)1319 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_2pass_fulltile_with_output_scale) {
1320 TEST_REQUIRES_X86_SSE2;
1321 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
1322 for (size_t channels = 1; channels < 8; channels++) {
1323 GAvgPoolMicrokernelTester()
1324 .rows(14)
1325 .channels(channels)
1326 .output_scale(output_scale)
1327 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1328 }
1329 }
1330 }
1331
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_2pass_fulltile_with_output_zero_point)1332 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_2pass_fulltile_with_output_zero_point) {
1333 TEST_REQUIRES_X86_SSE2;
1334 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
1335 for (size_t channels = 1; channels < 8; channels++) {
1336 GAvgPoolMicrokernelTester()
1337 .rows(14)
1338 .channels(channels)
1339 .output_zero_point(output_zero_point)
1340 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1341 }
1342 }
1343 }
1344
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_2pass_fulltile_with_qmax)1345 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_2pass_fulltile_with_qmax) {
1346 TEST_REQUIRES_X86_SSE2;
1347 for (size_t channels = 1; channels < 8; channels++) {
1348 GAvgPoolMicrokernelTester()
1349 .rows(14)
1350 .channels(channels)
1351 .input_zero_point(128)
1352 .output_zero_point(128)
1353 .input_scale(1.0f)
1354 .output_scale(1.0f)
1355 .qmax(128)
1356 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1357 }
1358 }
1359
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_2pass_fulltile_with_qmin)1360 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_2pass_fulltile_with_qmin) {
1361 TEST_REQUIRES_X86_SSE2;
1362 for (size_t channels = 1; channels < 8; channels++) {
1363 GAvgPoolMicrokernelTester()
1364 .rows(14)
1365 .channels(channels)
1366 .input_zero_point(128)
1367 .output_zero_point(128)
1368 .input_scale(1.0f)
1369 .output_scale(1.0f)
1370 .qmin(128)
1371 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1372 }
1373 }
1374
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_2pass_subtile)1375 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_2pass_subtile) {
1376 TEST_REQUIRES_X86_SSE2;
1377 for (size_t channels = 1; channels < 8; channels++) {
1378 for (size_t rows = 1; rows < 7; rows++) {
1379 GAvgPoolMicrokernelTester()
1380 .rows(7 + rows)
1381 .channels(channels)
1382 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1383 }
1384 }
1385 }
1386
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_multipass_fulltile)1387 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_multipass_fulltile) {
1388 TEST_REQUIRES_X86_SSE2;
1389 for (size_t channels = 1; channels < 8; channels++) {
1390 for (size_t rows = 14; rows <= 35; rows += 7) {
1391 GAvgPoolMicrokernelTester()
1392 .rows(rows)
1393 .channels(channels)
1394 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1395 }
1396 }
1397 }
1398
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_lt_8_multipass_fulltile_with_input_stride)1399 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_lt_8_multipass_fulltile_with_input_stride) {
1400 TEST_REQUIRES_X86_SSE2;
1401 for (size_t channels = 1; channels < 8; channels++) {
1402 for (size_t rows = 14; rows <= 35; rows += 7) {
1403 GAvgPoolMicrokernelTester()
1404 .rows(rows)
1405 .channels(channels)
1406 .input_stride(23)
1407 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1408 }
1409 }
1410 }
1411
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_2pass_fulltile)1412 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_2pass_fulltile) {
1413 TEST_REQUIRES_X86_SSE2;
1414 for (size_t channels = 9; channels < 16; channels++) {
1415 GAvgPoolMicrokernelTester()
1416 .rows(14)
1417 .channels(channels)
1418 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1419 }
1420 }
1421
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_2pass_fulltile_with_input_scale)1422 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_2pass_fulltile_with_input_scale) {
1423 TEST_REQUIRES_X86_SSE2;
1424 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
1425 for (size_t channels = 9; channels < 16; channels++) {
1426 GAvgPoolMicrokernelTester()
1427 .rows(14)
1428 .channels(channels)
1429 .input_scale(input_scale)
1430 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1431 }
1432 }
1433 }
1434
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_2pass_fulltile_with_input_zero_point)1435 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_2pass_fulltile_with_input_zero_point) {
1436 TEST_REQUIRES_X86_SSE2;
1437 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
1438 for (size_t channels = 9; channels < 16; channels++) {
1439 GAvgPoolMicrokernelTester()
1440 .rows(14)
1441 .channels(channels)
1442 .input_zero_point(input_zero_point)
1443 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1444 }
1445 }
1446 }
1447
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_2pass_fulltile_with_output_scale)1448 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_2pass_fulltile_with_output_scale) {
1449 TEST_REQUIRES_X86_SSE2;
1450 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
1451 for (size_t channels = 9; channels < 16; channels++) {
1452 GAvgPoolMicrokernelTester()
1453 .rows(14)
1454 .channels(channels)
1455 .output_scale(output_scale)
1456 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1457 }
1458 }
1459 }
1460
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_2pass_fulltile_with_output_zero_point)1461 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_2pass_fulltile_with_output_zero_point) {
1462 TEST_REQUIRES_X86_SSE2;
1463 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
1464 for (size_t channels = 9; channels < 16; channels++) {
1465 GAvgPoolMicrokernelTester()
1466 .rows(14)
1467 .channels(channels)
1468 .output_zero_point(output_zero_point)
1469 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1470 }
1471 }
1472 }
1473
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_2pass_fulltile_with_qmax)1474 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_2pass_fulltile_with_qmax) {
1475 TEST_REQUIRES_X86_SSE2;
1476 for (size_t channels = 9; channels < 16; channels++) {
1477 GAvgPoolMicrokernelTester()
1478 .rows(14)
1479 .channels(channels)
1480 .input_zero_point(128)
1481 .output_zero_point(128)
1482 .input_scale(1.0f)
1483 .output_scale(1.0f)
1484 .qmax(128)
1485 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1486 }
1487 }
1488
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_2pass_fulltile_with_qmin)1489 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_2pass_fulltile_with_qmin) {
1490 TEST_REQUIRES_X86_SSE2;
1491 for (size_t channels = 9; channels < 16; channels++) {
1492 GAvgPoolMicrokernelTester()
1493 .rows(14)
1494 .channels(channels)
1495 .input_zero_point(128)
1496 .output_zero_point(128)
1497 .input_scale(1.0f)
1498 .output_scale(1.0f)
1499 .qmin(128)
1500 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1501 }
1502 }
1503
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_2pass_subtile)1504 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_2pass_subtile) {
1505 TEST_REQUIRES_X86_SSE2;
1506 for (size_t channels = 9; channels < 16; channels++) {
1507 for (size_t rows = 1; rows < 7; rows++) {
1508 GAvgPoolMicrokernelTester()
1509 .rows(7 + rows)
1510 .channels(channels)
1511 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1512 }
1513 }
1514 }
1515
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_multipass_fulltile)1516 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_multipass_fulltile) {
1517 TEST_REQUIRES_X86_SSE2;
1518 for (size_t channels = 9; channels < 16; channels++) {
1519 for (size_t rows = 14; rows <= 35; rows += 7) {
1520 GAvgPoolMicrokernelTester()
1521 .rows(rows)
1522 .channels(channels)
1523 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1524 }
1525 }
1526 }
1527
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8,channels_gt_8_multipass_fulltile_with_input_stride)1528 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SSE2_C8, channels_gt_8_multipass_fulltile_with_input_stride) {
1529 TEST_REQUIRES_X86_SSE2;
1530 for (size_t channels = 9; channels < 16; channels++) {
1531 for (size_t rows = 14; rows <= 35; rows += 7) {
1532 GAvgPoolMicrokernelTester()
1533 .rows(rows)
1534 .channels(channels)
1535 .input_stride(23)
1536 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__sse2_c8);
1537 }
1538 }
1539 }
1540 #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
1541
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_eq_1_fulltile)1542 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_eq_1_fulltile) {
1543 GAvgPoolMicrokernelTester()
1544 .rows(7)
1545 .channels(1)
1546 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1547 }
1548
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_eq_1_subtile)1549 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_eq_1_subtile) {
1550 for (size_t rows = 1; rows < 7; rows++) {
1551 GAvgPoolMicrokernelTester()
1552 .rows(rows)
1553 .channels(1)
1554 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1555 }
1556 }
1557
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_eq_1_fulltile_with_input_stride)1558 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_eq_1_fulltile_with_input_stride) {
1559 GAvgPoolMicrokernelTester()
1560 .rows(7)
1561 .channels(1)
1562 .input_stride(11)
1563 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1564 }
1565
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_eq_1_fulltile_with_input_scale)1566 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_eq_1_fulltile_with_input_scale) {
1567 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
1568 GAvgPoolMicrokernelTester()
1569 .rows(7)
1570 .channels(1)
1571 .input_scale(input_scale)
1572 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1573 }
1574 }
1575
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_eq_1_fulltile_with_input_zero_point)1576 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_eq_1_fulltile_with_input_zero_point) {
1577 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
1578 GAvgPoolMicrokernelTester()
1579 .rows(7)
1580 .channels(1)
1581 .input_zero_point(input_zero_point)
1582 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1583 }
1584 }
1585
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_eq_1_fulltile_with_output_scale)1586 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_eq_1_fulltile_with_output_scale) {
1587 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
1588 GAvgPoolMicrokernelTester()
1589 .rows(7)
1590 .channels(1)
1591 .output_scale(output_scale)
1592 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1593 }
1594 }
1595
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_eq_1_fulltile_with_output_zero_point)1596 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_eq_1_fulltile_with_output_zero_point) {
1597 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
1598 GAvgPoolMicrokernelTester()
1599 .rows(7)
1600 .channels(1)
1601 .output_zero_point(output_zero_point)
1602 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1603 }
1604 }
1605
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_eq_1_fulltile_with_qmax)1606 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_eq_1_fulltile_with_qmax) {
1607 GAvgPoolMicrokernelTester()
1608 .rows(7)
1609 .channels(1)
1610 .input_zero_point(128)
1611 .output_zero_point(128)
1612 .input_scale(1.0f)
1613 .output_scale(1.0f)
1614 .qmax(128)
1615 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1616 }
1617
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_eq_1_fulltile_with_qmin)1618 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_eq_1_fulltile_with_qmin) {
1619 GAvgPoolMicrokernelTester()
1620 .rows(7)
1621 .channels(1)
1622 .input_zero_point(128)
1623 .output_zero_point(128)
1624 .input_scale(1.0f)
1625 .output_scale(1.0f)
1626 .qmin(128)
1627 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1628 }
1629
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_gt_1_fulltile)1630 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_gt_1_fulltile) {
1631 for (size_t channels = 2; channels < 8; channels++) {
1632 GAvgPoolMicrokernelTester()
1633 .rows(7)
1634 .channels(channels)
1635 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1636 }
1637 }
1638
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_gt_1_subtile)1639 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_gt_1_subtile) {
1640 for (size_t channels = 2; channels < 8; channels++) {
1641 for (size_t rows = 1; rows < 7; rows++) {
1642 GAvgPoolMicrokernelTester()
1643 .rows(rows)
1644 .channels(channels)
1645 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1646 }
1647 }
1648 }
1649
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_gt_1_fulltile_with_input_scale)1650 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_gt_1_fulltile_with_input_scale) {
1651 for (size_t channels = 2; channels < 8; channels++) {
1652 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
1653 GAvgPoolMicrokernelTester()
1654 .rows(7)
1655 .channels(channels)
1656 .input_scale(input_scale)
1657 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1658 }
1659 }
1660 }
1661
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_gt_1_fulltile_with_input_zero_point)1662 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_gt_1_fulltile_with_input_zero_point) {
1663 for (size_t channels = 2; channels < 8; channels++) {
1664 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
1665 GAvgPoolMicrokernelTester()
1666 .rows(7)
1667 .channels(channels)
1668 .input_zero_point(input_zero_point)
1669 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1670 }
1671 }
1672 }
1673
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_gt_1_fulltile_with_output_scale)1674 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_gt_1_fulltile_with_output_scale) {
1675 for (size_t channels = 2; channels < 8; channels++) {
1676 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
1677 GAvgPoolMicrokernelTester()
1678 .rows(7)
1679 .channels(channels)
1680 .output_scale(output_scale)
1681 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1682 }
1683 }
1684 }
1685
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_gt_1_fulltile_with_output_zero_point)1686 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_gt_1_fulltile_with_output_zero_point) {
1687 for (size_t channels = 2; channels < 8; channels++) {
1688 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
1689 GAvgPoolMicrokernelTester()
1690 .rows(7)
1691 .channels(channels)
1692 .output_zero_point(output_zero_point)
1693 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1694 }
1695 }
1696 }
1697
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_gt_1_fulltile_with_qmax)1698 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_gt_1_fulltile_with_qmax) {
1699 for (size_t channels = 2; channels < 8; channels++) {
1700 GAvgPoolMicrokernelTester()
1701 .rows(7)
1702 .channels(channels)
1703 .input_zero_point(128)
1704 .output_zero_point(128)
1705 .input_scale(1.0f)
1706 .output_scale(1.0f)
1707 .qmax(128)
1708 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1709 }
1710 }
1711
TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1,channels_gt_1_fulltile_with_qmin)1712 TEST(QU8_GAVGPOOL_MINMAX_7X__SCALAR_C1, channels_gt_1_fulltile_with_qmin) {
1713 for (size_t channels = 2; channels < 8; channels++) {
1714 GAvgPoolMicrokernelTester()
1715 .rows(7)
1716 .channels(channels)
1717 .input_zero_point(128)
1718 .output_zero_point(128)
1719 .input_scale(1.0f)
1720 .output_scale(1.0f)
1721 .qmin(128)
1722 .Test(xnn_qu8_gavgpool_minmax_ukernel_7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1723 }
1724 }
1725
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_fulltile)1726 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_fulltile) {
1727 GAvgPoolMicrokernelTester()
1728 .rows(14)
1729 .channels(1)
1730 .channel_tile(8)
1731 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1732 }
1733
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_fulltile_with_input_stride)1734 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_fulltile_with_input_stride) {
1735 GAvgPoolMicrokernelTester()
1736 .rows(14)
1737 .channels(1)
1738 .channel_tile(8)
1739 .input_stride(11)
1740 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1741 }
1742
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_fulltile_with_input_scale)1743 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_fulltile_with_input_scale) {
1744 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
1745 GAvgPoolMicrokernelTester()
1746 .rows(14)
1747 .channels(1)
1748 .input_scale(input_scale)
1749 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1750 }
1751 }
1752
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_fulltile_with_input_zero_point)1753 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_fulltile_with_input_zero_point) {
1754 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
1755 GAvgPoolMicrokernelTester()
1756 .rows(14)
1757 .channels(1)
1758 .input_zero_point(input_zero_point)
1759 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1760 }
1761 }
1762
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_fulltile_with_output_scale)1763 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_fulltile_with_output_scale) {
1764 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
1765 GAvgPoolMicrokernelTester()
1766 .rows(14)
1767 .channels(1)
1768 .output_scale(output_scale)
1769 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1770 }
1771 }
1772
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_fulltile_with_output_zero_point)1773 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_fulltile_with_output_zero_point) {
1774 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
1775 GAvgPoolMicrokernelTester()
1776 .rows(14)
1777 .channels(1)
1778 .output_zero_point(output_zero_point)
1779 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1780 }
1781 }
1782
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_fulltile_with_qmax)1783 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_fulltile_with_qmax) {
1784 GAvgPoolMicrokernelTester()
1785 .rows(14)
1786 .channels(1)
1787 .channel_tile(8)
1788 .input_zero_point(128)
1789 .output_zero_point(128)
1790 .input_scale(1.0f)
1791 .output_scale(1.0f)
1792 .qmax(128)
1793 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1794 }
1795
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_fulltile_with_qmin)1796 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_fulltile_with_qmin) {
1797 GAvgPoolMicrokernelTester()
1798 .rows(14)
1799 .channels(1)
1800 .channel_tile(8)
1801 .input_zero_point(128)
1802 .output_zero_point(128)
1803 .input_scale(1.0f)
1804 .output_scale(1.0f)
1805 .qmin(128)
1806 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1807 }
1808
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_subtile)1809 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_subtile) {
1810 for (size_t rows = 1; rows < 7; rows++) {
1811 GAvgPoolMicrokernelTester()
1812 .rows(7 + rows)
1813 .channels(1)
1814 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1815 }
1816 }
1817
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_2pass_subtile_with_input_stride)1818 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_2pass_subtile_with_input_stride) {
1819 for (size_t rows = 1; rows < 7; rows++) {
1820 GAvgPoolMicrokernelTester()
1821 .rows(7 + rows)
1822 .channels(1)
1823 .input_stride(11)
1824 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1825 }
1826 }
1827
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_multipass_fulltile)1828 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_multipass_fulltile) {
1829 for (size_t rows = 14; rows <= 35; rows += 7) {
1830 GAvgPoolMicrokernelTester()
1831 .rows(rows)
1832 .channels(1)
1833 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1834 }
1835 }
1836
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_eq_1_multipass_fulltile_with_input_stride)1837 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_eq_1_multipass_fulltile_with_input_stride) {
1838 for (size_t rows = 14; rows <= 35; rows += 7) {
1839 GAvgPoolMicrokernelTester()
1840 .rows(rows)
1841 .channels(1)
1842 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1843 }
1844 }
1845
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_2pass_fulltile)1846 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_2pass_fulltile) {
1847 for (size_t channels = 2; channels < 8; channels++) {
1848 GAvgPoolMicrokernelTester()
1849 .rows(14)
1850 .channels(channels)
1851 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1852 }
1853 }
1854
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_2pass_fulltile_with_input_scale)1855 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_2pass_fulltile_with_input_scale) {
1856 for (float input_scale = 0.01f; input_scale < 100.0f; input_scale *= 3.14159265f) {
1857 for (size_t channels = 2; channels < 8; channels++) {
1858 GAvgPoolMicrokernelTester()
1859 .rows(14)
1860 .channels(channels)
1861 .input_scale(input_scale)
1862 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1863 }
1864 }
1865 }
1866
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_2pass_fulltile_with_input_zero_point)1867 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_2pass_fulltile_with_input_zero_point) {
1868 for (int32_t input_zero_point = 0; input_zero_point <= 255; input_zero_point += 51) {
1869 for (size_t channels = 2; channels < 8; channels++) {
1870 GAvgPoolMicrokernelTester()
1871 .rows(14)
1872 .channels(channels)
1873 .input_zero_point(input_zero_point)
1874 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1875 }
1876 }
1877 }
1878
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_2pass_fulltile_with_output_scale)1879 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_2pass_fulltile_with_output_scale) {
1880 for (float output_scale = 0.01f; output_scale < 100.0f; output_scale *= 3.14159265f) {
1881 for (size_t channels = 2; channels < 8; channels++) {
1882 GAvgPoolMicrokernelTester()
1883 .rows(14)
1884 .channels(channels)
1885 .output_scale(output_scale)
1886 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1887 }
1888 }
1889 }
1890
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_2pass_fulltile_with_output_zero_point)1891 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_2pass_fulltile_with_output_zero_point) {
1892 for (int32_t output_zero_point = 0; output_zero_point <= 255; output_zero_point += 51) {
1893 for (size_t channels = 2; channels < 8; channels++) {
1894 GAvgPoolMicrokernelTester()
1895 .rows(14)
1896 .channels(channels)
1897 .output_zero_point(output_zero_point)
1898 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1899 }
1900 }
1901 }
1902
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_2pass_fulltile_with_qmax)1903 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_2pass_fulltile_with_qmax) {
1904 for (size_t channels = 2; channels < 8; channels++) {
1905 GAvgPoolMicrokernelTester()
1906 .rows(14)
1907 .channels(channels)
1908 .input_zero_point(128)
1909 .output_zero_point(128)
1910 .input_scale(1.0f)
1911 .output_scale(1.0f)
1912 .qmax(128)
1913 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1914 }
1915 }
1916
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_2pass_fulltile_with_qmin)1917 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_2pass_fulltile_with_qmin) {
1918 for (size_t channels = 2; channels < 8; channels++) {
1919 GAvgPoolMicrokernelTester()
1920 .rows(14)
1921 .channels(channels)
1922 .input_zero_point(128)
1923 .output_zero_point(128)
1924 .input_scale(1.0f)
1925 .output_scale(1.0f)
1926 .qmin(128)
1927 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1928 }
1929 }
1930
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_2pass_subtile)1931 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_2pass_subtile) {
1932 for (size_t channels = 2; channels < 8; channels++) {
1933 for (size_t rows = 1; rows < 7; rows++) {
1934 GAvgPoolMicrokernelTester()
1935 .rows(7 + rows)
1936 .channels(channels)
1937 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1938 }
1939 }
1940 }
1941
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_multipass_fulltile)1942 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_multipass_fulltile) {
1943 for (size_t channels = 2; channels < 8; channels++) {
1944 for (size_t rows = 14; rows <= 35; rows += 7) {
1945 GAvgPoolMicrokernelTester()
1946 .rows(rows)
1947 .channels(channels)
1948 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1949 }
1950 }
1951 }
1952
TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1,channels_gt_1_multipass_fulltile_with_input_stride)1953 TEST(QU8_GAVGPOOL_MINMAX_7P7X__SCALAR_C1, channels_gt_1_multipass_fulltile_with_input_stride) {
1954 for (size_t channels = 2; channels < 8; channels++) {
1955 for (size_t rows = 14; rows <= 35; rows += 7) {
1956 GAvgPoolMicrokernelTester()
1957 .rows(rows)
1958 .channels(channels)
1959 .input_stride(23)
1960 .Test(xnn_qu8_gavgpool_minmax_ukernel_7p7x__scalar_c1, GAvgPoolMicrokernelTester::Variant::Scalar);
1961 }
1962 }
1963 }
1964