• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) Facebook, Inc. and its affiliates.
2 // All rights reserved.
3 //
4 // Copyright 2020 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 // Auto-generated file. Do not edit!
10 //   Specification: test/qu8-avgpool-minmax.yaml
11 //   Generator: tools/generate-avgpool-test.py
12 
13 
14 #include <gtest/gtest.h>
15 
16 #include <xnnpack/common.h>
17 #include <xnnpack/isa-checks.h>
18 
19 #include <xnnpack/avgpool.h>
20 #include <xnnpack/pavgpool.h>
21 #include "avgpool-microkernel-tester.h"
22 
23 
24 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_fulltile)25   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_fulltile) {
26     TEST_REQUIRES_ARM_NEON;
27     AvgPoolMicrokernelTester()
28       .pooling_elements(17)
29       .pooling_tile(9, 8)
30       .channels(8)
31       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
32   }
33 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_fulltile_with_input_offset)34   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_fulltile_with_input_offset) {
35     TEST_REQUIRES_ARM_NEON;
36     AvgPoolMicrokernelTester()
37       .pooling_elements(17)
38       .pooling_tile(9, 8)
39       .channels(8)
40       .input_offset(11)
41       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
42   }
43 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_fulltile_with_zero)44   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_fulltile_with_zero) {
45     TEST_REQUIRES_ARM_NEON;
46     for (size_t zero_index = 0; zero_index < 17; zero_index++) {
47       AvgPoolMicrokernelTester()
48         .pooling_elements(17)
49         .pooling_tile(9, 8)
50         .channels(8)
51         .input_offset(11)
52         .zero_index(zero_index)
53         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
54     }
55   }
56 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_fulltile_with_input_scale)57   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_fulltile_with_input_scale) {
58     TEST_REQUIRES_ARM_NEON;
59     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
60       AvgPoolMicrokernelTester()
61         .pooling_elements(17)
62         .pooling_tile(9, 8)
63         .channels(8)
64         .input_scale(scale)
65         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
66     }
67   }
68 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_fulltile_with_input_zero_point)69   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_fulltile_with_input_zero_point) {
70     TEST_REQUIRES_ARM_NEON;
71     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
72       AvgPoolMicrokernelTester()
73         .pooling_elements(17)
74         .pooling_tile(9, 8)
75         .channels(8)
76         .input_zero_point(zero_point)
77         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
78     }
79   }
80 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_fulltile_with_output_scale)81   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_fulltile_with_output_scale) {
82     TEST_REQUIRES_ARM_NEON;
83     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
84       AvgPoolMicrokernelTester()
85         .pooling_elements(17)
86         .pooling_tile(9, 8)
87         .channels(8)
88         .output_scale(scale)
89         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
90     }
91   }
92 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_fulltile_with_output_zero_point)93   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_fulltile_with_output_zero_point) {
94     TEST_REQUIRES_ARM_NEON;
95     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
96       AvgPoolMicrokernelTester()
97         .pooling_elements(17)
98         .pooling_tile(9, 8)
99         .channels(8)
100         .output_zero_point(zero_point)
101         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
102     }
103   }
104 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_fulltile_with_qmin)105   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_fulltile_with_qmin) {
106     TEST_REQUIRES_ARM_NEON;
107     AvgPoolMicrokernelTester()
108       .pooling_elements(17)
109       .pooling_tile(9, 8)
110       .channels(8)
111       .qmin(128)
112       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
113   }
114 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_fulltile_with_qmax)115   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_fulltile_with_qmax) {
116     TEST_REQUIRES_ARM_NEON;
117     AvgPoolMicrokernelTester()
118       .pooling_elements(17)
119       .pooling_tile(9, 8)
120       .channels(8)
121       .qmax(128)
122       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
123   }
124 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_subtile)125   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_subtile) {
126     TEST_REQUIRES_ARM_NEON;
127     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
128       AvgPoolMicrokernelTester()
129         .pooling_elements(pooling_elements)
130         .pooling_tile(9, 8)
131         .channels(8)
132         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
133     }
134   }
135 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_subtile_with_input_offset)136   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_subtile_with_input_offset) {
137     TEST_REQUIRES_ARM_NEON;
138     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
139       AvgPoolMicrokernelTester()
140         .pooling_elements(pooling_elements)
141         .pooling_tile(9, 8)
142         .channels(8)
143         .input_offset(11)
144         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
145     }
146   }
147 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_twopass_subtile_with_zero)148   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_twopass_subtile_with_zero) {
149     TEST_REQUIRES_ARM_NEON;
150     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
151       for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
152         AvgPoolMicrokernelTester()
153           .pooling_elements(pooling_elements)
154           .pooling_tile(9, 8)
155           .channels(8)
156           .input_offset(11)
157           .zero_index(zero_index)
158           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
159       }
160     }
161   }
162 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_fulltile)163   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_fulltile) {
164     TEST_REQUIRES_ARM_NEON;
165     for (size_t channels = 16; channels < 64; channels += 8) {
166       AvgPoolMicrokernelTester()
167         .pooling_elements(17)
168         .pooling_tile(9, 8)
169         .channels(channels)
170         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
171     }
172   }
173 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_fulltile_with_input_offset)174   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_fulltile_with_input_offset) {
175     TEST_REQUIRES_ARM_NEON;
176     for (size_t channels = 16; channels < 64; channels += 8) {
177       AvgPoolMicrokernelTester()
178         .pooling_elements(17)
179         .pooling_tile(9, 8)
180         .channels(channels)
181         .input_offset(41)
182         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
183     }
184   }
185 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_fulltile_with_zero)186   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_fulltile_with_zero) {
187     TEST_REQUIRES_ARM_NEON;
188     for (size_t channels = 16; channels < 64; channels += 8) {
189       for (size_t zero_index = 0; zero_index < 17; zero_index++) {
190         AvgPoolMicrokernelTester()
191           .pooling_elements(17)
192           .pooling_tile(9, 8)
193           .channels(channels)
194           .input_offset(41)
195           .zero_index(zero_index)
196           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
197       }
198     }
199   }
200 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_fulltile_with_input_scale)201   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_fulltile_with_input_scale) {
202     TEST_REQUIRES_ARM_NEON;
203     for (size_t channels = 16; channels < 64; channels += 8) {
204       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
205         AvgPoolMicrokernelTester()
206           .pooling_elements(17)
207           .pooling_tile(9, 8)
208           .channels(channels)
209           .input_scale(scale)
210           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
211       }
212     }
213   }
214 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_fulltile_with_input_zero_point)215   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_fulltile_with_input_zero_point) {
216     TEST_REQUIRES_ARM_NEON;
217     for (size_t channels = 16; channels < 64; channels += 8) {
218       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
219         AvgPoolMicrokernelTester()
220           .pooling_elements(17)
221           .pooling_tile(9, 8)
222           .channels(channels)
223           .input_zero_point(zero_point)
224           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
225       }
226     }
227   }
228 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_fulltile_with_output_scale)229   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_fulltile_with_output_scale) {
230     TEST_REQUIRES_ARM_NEON;
231     for (size_t channels = 16; channels < 64; channels += 8) {
232       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
233         AvgPoolMicrokernelTester()
234           .pooling_elements(17)
235           .pooling_tile(9, 8)
236           .channels(channels)
237           .output_scale(scale)
238           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
239       }
240     }
241   }
242 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_fulltile_with_output_zero_point)243   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_fulltile_with_output_zero_point) {
244     TEST_REQUIRES_ARM_NEON;
245     for (size_t channels = 16; channels < 64; channels += 8) {
246       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
247         AvgPoolMicrokernelTester()
248           .pooling_elements(17)
249           .pooling_tile(9, 8)
250           .channels(channels)
251           .output_zero_point(zero_point)
252           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
253       }
254     }
255   }
256 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_fulltile_with_qmin)257   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_fulltile_with_qmin) {
258     TEST_REQUIRES_ARM_NEON;
259     for (size_t channels = 16; channels < 64; channels += 8) {
260       AvgPoolMicrokernelTester()
261         .pooling_elements(17)
262         .pooling_tile(9, 8)
263         .channels(channels)
264         .qmin(128)
265         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
266     }
267   }
268 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_fulltile_with_qmax)269   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_fulltile_with_qmax) {
270     TEST_REQUIRES_ARM_NEON;
271     for (size_t channels = 16; channels < 64; channels += 8) {
272       AvgPoolMicrokernelTester()
273         .pooling_elements(17)
274         .pooling_tile(9, 8)
275         .channels(channels)
276         .qmax(128)
277         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
278     }
279   }
280 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_subtile)281   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_subtile) {
282     TEST_REQUIRES_ARM_NEON;
283     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
284       for (size_t channels = 16; channels < 64; channels += 8) {
285         AvgPoolMicrokernelTester()
286           .pooling_elements(pooling_elements)
287           .pooling_tile(9, 8)
288           .channels(channels)
289           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
290       }
291     }
292   }
293 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_subtile_with_input_offset)294   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_subtile_with_input_offset) {
295     TEST_REQUIRES_ARM_NEON;
296     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
297       for (size_t channels = 16; channels < 64; channels += 8) {
298         AvgPoolMicrokernelTester()
299           .pooling_elements(pooling_elements)
300           .pooling_tile(9, 8)
301           .channels(channels)
302           .input_offset(67)
303           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
304       }
305     }
306   }
307 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_twopass_subtile_with_zero)308   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_twopass_subtile_with_zero) {
309     TEST_REQUIRES_ARM_NEON;
310     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
311       for (size_t channels = 16; channels < 64; channels += 8) {
312         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
313           AvgPoolMicrokernelTester()
314             .pooling_elements(pooling_elements)
315             .pooling_tile(9, 8)
316             .channels(channels)
317             .input_offset(67)
318             .zero_index(zero_index)
319             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
320         }
321       }
322     }
323   }
324 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_fulltile)325   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_fulltile) {
326     TEST_REQUIRES_ARM_NEON;
327     for (size_t channels = 1; channels < 8; channels++) {
328       AvgPoolMicrokernelTester()
329         .pooling_elements(17)
330         .pooling_tile(9, 8)
331         .channels(channels)
332         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
333     }
334   }
335 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_fulltile_with_input_offset)336   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_fulltile_with_input_offset) {
337     TEST_REQUIRES_ARM_NEON;
338     for (size_t channels = 1; channels < 8; channels++) {
339       AvgPoolMicrokernelTester()
340         .pooling_elements(17)
341         .pooling_tile(9, 8)
342         .channels(channels)
343         .input_offset(11)
344         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
345     }
346   }
347 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_fulltile_with_zero_index)348   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_fulltile_with_zero_index) {
349     TEST_REQUIRES_ARM_NEON;
350     for (size_t channels = 1; channels < 8; channels++) {
351       for (size_t zero_index = 0; zero_index < 17; zero_index++) {
352         AvgPoolMicrokernelTester()
353           .pooling_elements(17)
354           .pooling_tile(9, 8)
355           .channels(channels)
356           .input_offset(11)
357           .zero_index(zero_index)
358           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
359       }
360     }
361   }
362 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_fulltile_with_input_scale)363   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_fulltile_with_input_scale) {
364     TEST_REQUIRES_ARM_NEON;
365     for (size_t channels = 1; channels < 8; channels++) {
366       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
367         AvgPoolMicrokernelTester()
368           .pooling_elements(17)
369           .pooling_tile(9, 8)
370           .channels(channels)
371           .input_scale(scale)
372           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
373       }
374     }
375   }
376 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_fulltile_with_input_zero_point)377   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_fulltile_with_input_zero_point) {
378     TEST_REQUIRES_ARM_NEON;
379     for (size_t channels = 1; channels < 8; channels++) {
380       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
381         AvgPoolMicrokernelTester()
382           .pooling_elements(17)
383           .pooling_tile(9, 8)
384           .channels(channels)
385           .input_zero_point(zero_point)
386           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
387       }
388     }
389   }
390 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_fulltile_with_output_scale)391   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_fulltile_with_output_scale) {
392     TEST_REQUIRES_ARM_NEON;
393     for (size_t channels = 1; channels < 8; channels++) {
394       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
395         AvgPoolMicrokernelTester()
396           .pooling_elements(17)
397           .pooling_tile(9, 8)
398           .channels(channels)
399           .output_scale(scale)
400           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
401       }
402     }
403   }
404 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_fulltile_with_output_zero_point)405   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_fulltile_with_output_zero_point) {
406     TEST_REQUIRES_ARM_NEON;
407     for (size_t channels = 1; channels < 8; channels++) {
408       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
409         AvgPoolMicrokernelTester()
410           .pooling_elements(17)
411           .pooling_tile(9, 8)
412           .channels(channels)
413           .output_zero_point(zero_point)
414           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
415       }
416     }
417   }
418 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_fulltile_with_qmin)419   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_fulltile_with_qmin) {
420     TEST_REQUIRES_ARM_NEON;
421     for (size_t channels = 1; channels < 8; channels++) {
422       AvgPoolMicrokernelTester()
423         .pooling_elements(17)
424         .pooling_tile(9, 8)
425         .channels(channels)
426         .qmin(128)
427         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
428     }
429   }
430 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_fulltile_with_qmax)431   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_fulltile_with_qmax) {
432     TEST_REQUIRES_ARM_NEON;
433     for (size_t channels = 1; channels < 8; channels++) {
434       AvgPoolMicrokernelTester()
435         .pooling_elements(17)
436         .pooling_tile(9, 8)
437         .channels(channels)
438         .qmax(128)
439         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
440     }
441   }
442 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_subtile)443   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_subtile) {
444     TEST_REQUIRES_ARM_NEON;
445     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
446       for (size_t channels = 1; channels < 8; channels++) {
447         AvgPoolMicrokernelTester()
448           .pooling_elements(pooling_elements)
449           .pooling_tile(9, 8)
450           .channels(channels)
451           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
452       }
453     }
454   }
455 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_subtile_with_input_offset)456   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_subtile_with_input_offset) {
457     TEST_REQUIRES_ARM_NEON;
458     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
459       for (size_t channels = 1; channels < 8; channels++) {
460         AvgPoolMicrokernelTester()
461           .pooling_elements(pooling_elements)
462           .pooling_tile(9, 8)
463           .channels(channels)
464           .input_offset(11)
465           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
466       }
467     }
468   }
469 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_twopass_subtile_with_zero)470   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_twopass_subtile_with_zero) {
471     TEST_REQUIRES_ARM_NEON;
472     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
473       for (size_t channels = 1; channels < 8; channels++) {
474         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
475           AvgPoolMicrokernelTester()
476             .pooling_elements(pooling_elements)
477             .pooling_tile(9, 8)
478             .channels(channels)
479             .input_offset(11)
480             .zero_index(zero_index)
481             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
482         }
483       }
484     }
485   }
486 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_fulltile)487   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_fulltile) {
488     TEST_REQUIRES_ARM_NEON;
489     for (size_t channels = 9; channels < 16; channels++) {
490       AvgPoolMicrokernelTester()
491         .pooling_elements(17)
492         .pooling_tile(9, 8)
493         .channels(channels)
494         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
495     }
496   }
497 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_fulltile_with_input_offset)498   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_fulltile_with_input_offset) {
499     TEST_REQUIRES_ARM_NEON;
500     for (size_t channels = 9; channels < 16; channels++) {
501       AvgPoolMicrokernelTester()
502         .pooling_elements(17)
503         .pooling_tile(9, 8)
504         .channels(channels)
505         .input_offset(17)
506         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
507     }
508   }
509 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_fulltile_with_zero)510   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_fulltile_with_zero) {
511     TEST_REQUIRES_ARM_NEON;
512     for (size_t channels = 9; channels < 16; channels++) {
513       for (size_t zero_index = 0; zero_index < 17; zero_index++) {
514         AvgPoolMicrokernelTester()
515           .pooling_elements(17)
516           .pooling_tile(9, 8)
517           .channels(channels)
518           .input_offset(17)
519           .zero_index(zero_index)
520           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
521       }
522     }
523   }
524 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_fulltile_with_input_scale)525   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_fulltile_with_input_scale) {
526     TEST_REQUIRES_ARM_NEON;
527     for (size_t channels = 9; channels < 16; channels++) {
528       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
529         AvgPoolMicrokernelTester()
530           .pooling_elements(17)
531           .pooling_tile(9, 8)
532           .channels(channels)
533           .input_scale(scale)
534           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
535       }
536     }
537   }
538 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_fulltile_with_input_zero_point)539   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_fulltile_with_input_zero_point) {
540     TEST_REQUIRES_ARM_NEON;
541     for (size_t channels = 9; channels < 16; channels++) {
542       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
543         AvgPoolMicrokernelTester()
544           .pooling_elements(17)
545           .pooling_tile(9, 8)
546           .channels(channels)
547           .input_zero_point(zero_point)
548           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
549       }
550     }
551   }
552 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_fulltile_with_output_scale)553   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_fulltile_with_output_scale) {
554     TEST_REQUIRES_ARM_NEON;
555     for (size_t channels = 9; channels < 16; channels++) {
556       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
557         AvgPoolMicrokernelTester()
558           .pooling_elements(17)
559           .pooling_tile(9, 8)
560           .channels(channels)
561           .output_scale(scale)
562           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
563       }
564     }
565   }
566 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_fulltile_with_output_zero_point)567   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_fulltile_with_output_zero_point) {
568     TEST_REQUIRES_ARM_NEON;
569     for (size_t channels = 9; channels < 16; channels++) {
570       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
571         AvgPoolMicrokernelTester()
572           .pooling_elements(17)
573           .pooling_tile(9, 8)
574           .channels(channels)
575           .output_zero_point(zero_point)
576           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
577       }
578     }
579   }
580 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_fulltile_with_qmin)581   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_fulltile_with_qmin) {
582     TEST_REQUIRES_ARM_NEON;
583     for (size_t channels = 9; channels < 16; channels++) {
584       AvgPoolMicrokernelTester()
585         .pooling_elements(17)
586         .pooling_tile(9, 8)
587         .channels(channels)
588         .qmin(128)
589         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
590     }
591   }
592 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_fulltile_with_qmax)593   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_fulltile_with_qmax) {
594     TEST_REQUIRES_ARM_NEON;
595     for (size_t channels = 9; channels < 16; channels++) {
596       AvgPoolMicrokernelTester()
597         .pooling_elements(17)
598         .pooling_tile(9, 8)
599         .channels(channels)
600         .qmax(128)
601         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
602     }
603   }
604 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_subtile)605   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_subtile) {
606     TEST_REQUIRES_ARM_NEON;
607     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
608       for (size_t channels = 9; channels < 16; channels++) {
609         AvgPoolMicrokernelTester()
610           .pooling_elements(pooling_elements)
611           .pooling_tile(9, 8)
612           .channels(channels)
613           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
614       }
615     }
616   }
617 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_subtile_with_input_offset)618   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_subtile_with_input_offset) {
619     TEST_REQUIRES_ARM_NEON;
620     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
621       for (size_t channels = 9; channels < 16; channels++) {
622         AvgPoolMicrokernelTester()
623           .pooling_elements(pooling_elements)
624           .pooling_tile(9, 8)
625           .channels(channels)
626           .input_offset(17)
627           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
628       }
629     }
630   }
631 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_twopass_subtile_with_zero)632   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_twopass_subtile_with_zero) {
633     TEST_REQUIRES_ARM_NEON;
634     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
635       for (size_t channels = 9; channels < 16; channels++) {
636         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
637           AvgPoolMicrokernelTester()
638             .pooling_elements(pooling_elements)
639             .pooling_tile(9, 8)
640             .channels(channels)
641             .input_offset(17)
642             .zero_index(zero_index)
643             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
644         }
645       }
646     }
647   }
648 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_multipass)649   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_multipass) {
650     TEST_REQUIRES_ARM_NEON;
651     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
652       AvgPoolMicrokernelTester()
653         .pooling_elements(pooling_elements)
654         .pooling_tile(9, 8)
655         .channels(8)
656         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
657     }
658   }
659 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_multipass_with_input_offset)660   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_multipass_with_input_offset) {
661     TEST_REQUIRES_ARM_NEON;
662     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
663       AvgPoolMicrokernelTester()
664         .pooling_elements(pooling_elements)
665         .pooling_tile(9, 8)
666         .channels(8)
667         .input_offset(11)
668         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
669     }
670   }
671 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_multipass_with_zero)672   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_multipass_with_zero) {
673     TEST_REQUIRES_ARM_NEON;
674     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
675       for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
676         AvgPoolMicrokernelTester()
677           .pooling_elements(pooling_elements)
678           .pooling_tile(9, 8)
679           .channels(8)
680           .input_offset(11)
681           .zero_index(zero_index)
682           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
683       }
684     }
685   }
686 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_multipass_with_input_scale)687   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_multipass_with_input_scale) {
688     TEST_REQUIRES_ARM_NEON;
689     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
690       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
691         AvgPoolMicrokernelTester()
692           .pooling_elements(pooling_elements)
693           .pooling_tile(9, 8)
694           .channels(8)
695           .input_scale(scale)
696           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
697       }
698     }
699   }
700 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_multipass_with_input_zero_point)701   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_multipass_with_input_zero_point) {
702     TEST_REQUIRES_ARM_NEON;
703     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
704       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
705         AvgPoolMicrokernelTester()
706           .pooling_elements(pooling_elements)
707           .pooling_tile(9, 8)
708           .channels(8)
709           .input_zero_point(zero_point)
710           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
711       }
712     }
713   }
714 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_multipass_with_output_scale)715   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_multipass_with_output_scale) {
716     TEST_REQUIRES_ARM_NEON;
717     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
718       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
719         AvgPoolMicrokernelTester()
720           .pooling_elements(pooling_elements)
721           .pooling_tile(9, 8)
722           .channels(8)
723           .output_scale(scale)
724           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
725       }
726     }
727   }
728 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_multipass_with_output_zero_point)729   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_multipass_with_output_zero_point) {
730     TEST_REQUIRES_ARM_NEON;
731     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
732       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
733         AvgPoolMicrokernelTester()
734           .pooling_elements(pooling_elements)
735           .pooling_tile(9, 8)
736           .channels(8)
737           .output_zero_point(zero_point)
738           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
739       }
740     }
741   }
742 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_multipass_with_qmin)743   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_multipass_with_qmin) {
744     TEST_REQUIRES_ARM_NEON;
745     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
746       AvgPoolMicrokernelTester()
747         .pooling_elements(pooling_elements)
748         .pooling_tile(9, 8)
749         .channels(8)
750         .qmin(128)
751         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
752     }
753   }
754 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_eq_8_multipass_with_qmax)755   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_eq_8_multipass_with_qmax) {
756     TEST_REQUIRES_ARM_NEON;
757     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
758       AvgPoolMicrokernelTester()
759         .pooling_elements(pooling_elements)
760         .pooling_tile(9, 8)
761         .channels(8)
762         .qmax(128)
763         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
764     }
765   }
766 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_multipass)767   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_multipass) {
768     TEST_REQUIRES_ARM_NEON;
769     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
770       for (size_t channels = 16; channels < 64; channels += 8) {
771         AvgPoolMicrokernelTester()
772           .pooling_elements(pooling_elements)
773           .pooling_tile(9, 8)
774           .channels(channels)
775           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
776       }
777     }
778   }
779 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_multipass_with_input_offset)780   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_multipass_with_input_offset) {
781     TEST_REQUIRES_ARM_NEON;
782     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
783       for (size_t channels = 16; channels < 64; channels += 8) {
784         AvgPoolMicrokernelTester()
785           .pooling_elements(pooling_elements)
786           .pooling_tile(9, 8)
787           .channels(channels)
788           .input_offset(67)
789           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
790       }
791     }
792   }
793 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_multipass_with_zero)794   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_multipass_with_zero) {
795     TEST_REQUIRES_ARM_NEON;
796     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
797       for (size_t channels = 16; channels < 64; channels += 8) {
798         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
799           AvgPoolMicrokernelTester()
800             .pooling_elements(pooling_elements)
801             .pooling_tile(9, 8)
802             .channels(channels)
803             .input_offset(67)
804             .zero_index(zero_index)
805             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
806         }
807       }
808     }
809   }
810 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_multipass_with_input_scale)811   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_multipass_with_input_scale) {
812     TEST_REQUIRES_ARM_NEON;
813     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
814       for (size_t channels = 16; channels < 64; channels += 8) {
815         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
816           AvgPoolMicrokernelTester()
817             .pooling_elements(pooling_elements)
818             .pooling_tile(9, 8)
819             .channels(channels)
820             .input_scale(scale)
821             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
822         }
823       }
824     }
825   }
826 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_multipass_with_input_zero_point)827   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_multipass_with_input_zero_point) {
828     TEST_REQUIRES_ARM_NEON;
829     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
830       for (size_t channels = 16; channels < 64; channels += 8) {
831         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
832           AvgPoolMicrokernelTester()
833             .pooling_elements(pooling_elements)
834             .pooling_tile(9, 8)
835             .channels(channels)
836             .input_zero_point(zero_point)
837             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
838         }
839       }
840     }
841   }
842 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_multipass_with_output_scale)843   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_multipass_with_output_scale) {
844     TEST_REQUIRES_ARM_NEON;
845     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
846       for (size_t channels = 16; channels < 64; channels += 8) {
847         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
848           AvgPoolMicrokernelTester()
849             .pooling_elements(pooling_elements)
850             .pooling_tile(9, 8)
851             .channels(channels)
852             .output_scale(scale)
853             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
854         }
855       }
856     }
857   }
858 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_multipass_with_output_zero_point)859   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_multipass_with_output_zero_point) {
860     TEST_REQUIRES_ARM_NEON;
861     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
862       for (size_t channels = 16; channels < 64; channels += 8) {
863         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
864           AvgPoolMicrokernelTester()
865             .pooling_elements(pooling_elements)
866             .pooling_tile(9, 8)
867             .channels(channels)
868             .output_zero_point(zero_point)
869             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
870         }
871       }
872     }
873   }
874 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_multipass_with_qmin)875   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_multipass_with_qmin) {
876     TEST_REQUIRES_ARM_NEON;
877     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
878       for (size_t channels = 16; channels < 64; channels += 8) {
879         AvgPoolMicrokernelTester()
880           .pooling_elements(pooling_elements)
881           .pooling_tile(9, 8)
882           .channels(channels)
883           .qmin(128)
884           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
885       }
886     }
887   }
888 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_div_8_multipass_with_qmax)889   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_div_8_multipass_with_qmax) {
890     TEST_REQUIRES_ARM_NEON;
891     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
892       for (size_t channels = 16; channels < 64; channels += 8) {
893         AvgPoolMicrokernelTester()
894           .pooling_elements(pooling_elements)
895           .pooling_tile(9, 8)
896           .channels(channels)
897           .qmax(128)
898           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
899       }
900     }
901   }
902 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_multipass)903   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_multipass) {
904     TEST_REQUIRES_ARM_NEON;
905     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
906       for (size_t channels = 1; channels < 8; channels++) {
907         AvgPoolMicrokernelTester()
908           .pooling_elements(pooling_elements)
909           .pooling_tile(9, 8)
910           .channels(channels)
911           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
912       }
913     }
914   }
915 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_multipass_with_input_offset)916   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_multipass_with_input_offset) {
917     TEST_REQUIRES_ARM_NEON;
918     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
919       for (size_t channels = 1; channels < 8; channels++) {
920         AvgPoolMicrokernelTester()
921           .pooling_elements(pooling_elements)
922           .pooling_tile(9, 8)
923           .channels(channels)
924           .input_offset(8)
925           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
926       }
927     }
928   }
929 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_multipass_with_zero)930   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_multipass_with_zero) {
931     TEST_REQUIRES_ARM_NEON;
932     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
933       for (size_t channels = 1; channels < 8; channels++) {
934         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
935           AvgPoolMicrokernelTester()
936             .pooling_elements(pooling_elements)
937             .pooling_tile(9, 8)
938             .channels(channels)
939             .input_offset(8)
940             .zero_index(zero_index)
941             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
942         }
943       }
944     }
945   }
946 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_multipass_with_input_scale)947   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_multipass_with_input_scale) {
948     TEST_REQUIRES_ARM_NEON;
949     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
950       for (size_t channels = 1; channels < 8; channels++) {
951         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
952           AvgPoolMicrokernelTester()
953             .pooling_elements(pooling_elements)
954             .pooling_tile(9, 8)
955             .channels(channels)
956             .input_scale(scale)
957             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
958         }
959       }
960     }
961   }
962 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_multipass_with_input_zero_point)963   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_multipass_with_input_zero_point) {
964     TEST_REQUIRES_ARM_NEON;
965     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
966       for (size_t channels = 1; channels < 8; channels++) {
967         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
968           AvgPoolMicrokernelTester()
969             .pooling_elements(pooling_elements)
970             .pooling_tile(9, 8)
971             .channels(channels)
972             .input_zero_point(zero_point)
973             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
974         }
975       }
976     }
977   }
978 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_multipass_with_output_scale)979   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_multipass_with_output_scale) {
980     TEST_REQUIRES_ARM_NEON;
981     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
982       for (size_t channels = 1; channels < 8; channels++) {
983         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
984           AvgPoolMicrokernelTester()
985             .pooling_elements(pooling_elements)
986             .pooling_tile(9, 8)
987             .channels(channels)
988             .output_scale(scale)
989             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
990         }
991       }
992     }
993   }
994 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_multipass_with_output_zero_point)995   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_multipass_with_output_zero_point) {
996     TEST_REQUIRES_ARM_NEON;
997     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
998       for (size_t channels = 1; channels < 8; channels++) {
999         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1000           AvgPoolMicrokernelTester()
1001             .pooling_elements(pooling_elements)
1002             .pooling_tile(9, 8)
1003             .channels(channels)
1004             .output_zero_point(zero_point)
1005             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1006         }
1007       }
1008     }
1009   }
1010 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_multipass_with_qmin)1011   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_multipass_with_qmin) {
1012     TEST_REQUIRES_ARM_NEON;
1013     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1014       for (size_t channels = 1; channels < 8; channels++) {
1015         AvgPoolMicrokernelTester()
1016           .pooling_elements(pooling_elements)
1017           .pooling_tile(9, 8)
1018           .channels(channels)
1019           .qmin(128)
1020           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1021       }
1022     }
1023   }
1024 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_lt_8_multipass_with_qmax)1025   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_lt_8_multipass_with_qmax) {
1026     TEST_REQUIRES_ARM_NEON;
1027     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1028       for (size_t channels = 1; channels < 8; channels++) {
1029         AvgPoolMicrokernelTester()
1030           .pooling_elements(pooling_elements)
1031           .pooling_tile(9, 8)
1032           .channels(channels)
1033           .qmax(128)
1034           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1035       }
1036     }
1037   }
1038 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_multipass)1039   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_multipass) {
1040     TEST_REQUIRES_ARM_NEON;
1041     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1042       for (size_t channels = 9; channels < 16; channels++) {
1043         AvgPoolMicrokernelTester()
1044           .pooling_elements(pooling_elements)
1045           .pooling_tile(9, 8)
1046           .channels(channels)
1047           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1048       }
1049     }
1050   }
1051 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_multipass_with_input_offset)1052   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_multipass_with_input_offset) {
1053     TEST_REQUIRES_ARM_NEON;
1054     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1055       for (size_t channels = 9; channels < 16; channels++) {
1056         AvgPoolMicrokernelTester()
1057           .pooling_elements(pooling_elements)
1058           .pooling_tile(9, 8)
1059           .channels(channels)
1060           .input_offset(17)
1061           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1062       }
1063     }
1064   }
1065 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_multipass_with_zero)1066   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_multipass_with_zero) {
1067     TEST_REQUIRES_ARM_NEON;
1068     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1069       for (size_t channels = 9; channels < 16; channels++) {
1070         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
1071           AvgPoolMicrokernelTester()
1072             .pooling_elements(pooling_elements)
1073             .pooling_tile(9, 8)
1074             .channels(channels)
1075             .input_offset(17)
1076             .zero_index(zero_index)
1077             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1078         }
1079       }
1080     }
1081   }
1082 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_multipass_with_input_scale)1083   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_multipass_with_input_scale) {
1084     TEST_REQUIRES_ARM_NEON;
1085     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1086       for (size_t channels = 9; channels < 16; channels++) {
1087         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1088           AvgPoolMicrokernelTester()
1089             .pooling_elements(pooling_elements)
1090             .pooling_tile(9, 8)
1091             .channels(channels)
1092             .input_scale(scale)
1093             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1094         }
1095       }
1096     }
1097   }
1098 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_multipass_with_input_zero_point)1099   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_multipass_with_input_zero_point) {
1100     TEST_REQUIRES_ARM_NEON;
1101     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1102       for (size_t channels = 9; channels < 16; channels++) {
1103         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1104           AvgPoolMicrokernelTester()
1105             .pooling_elements(pooling_elements)
1106             .pooling_tile(9, 8)
1107             .channels(channels)
1108             .input_zero_point(zero_point)
1109             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1110         }
1111       }
1112     }
1113   }
1114 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_multipass_with_output_scale)1115   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_multipass_with_output_scale) {
1116     TEST_REQUIRES_ARM_NEON;
1117     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1118       for (size_t channels = 9; channels < 16; channels++) {
1119         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1120           AvgPoolMicrokernelTester()
1121             .pooling_elements(pooling_elements)
1122             .pooling_tile(9, 8)
1123             .channels(channels)
1124             .output_scale(scale)
1125             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1126         }
1127       }
1128     }
1129   }
1130 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_multipass_with_output_zero_point)1131   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_multipass_with_output_zero_point) {
1132     TEST_REQUIRES_ARM_NEON;
1133     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1134       for (size_t channels = 9; channels < 16; channels++) {
1135         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1136           AvgPoolMicrokernelTester()
1137             .pooling_elements(pooling_elements)
1138             .pooling_tile(9, 8)
1139             .channels(channels)
1140             .output_zero_point(zero_point)
1141             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1142         }
1143       }
1144     }
1145   }
1146 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_multipass_with_qmin)1147   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_multipass_with_qmin) {
1148     TEST_REQUIRES_ARM_NEON;
1149     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1150       for (size_t channels = 9; channels < 16; channels++) {
1151         AvgPoolMicrokernelTester()
1152           .pooling_elements(pooling_elements)
1153           .pooling_tile(9, 8)
1154           .channels(channels)
1155           .qmin(128)
1156           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1157       }
1158     }
1159   }
1160 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,channels_gt_8_multipass_with_qmax)1161   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, channels_gt_8_multipass_with_qmax) {
1162     TEST_REQUIRES_ARM_NEON;
1163     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
1164       for (size_t channels = 9; channels < 16; channels++) {
1165         AvgPoolMicrokernelTester()
1166           .pooling_elements(pooling_elements)
1167           .pooling_tile(9, 8)
1168           .channels(channels)
1169           .qmax(128)
1170           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1171       }
1172     }
1173   }
1174 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels)1175   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels) {
1176     TEST_REQUIRES_ARM_NEON;
1177     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1178       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1179         for (size_t channels = 1; channels <= 40; channels += 7) {
1180           AvgPoolMicrokernelTester()
1181             .output_pixels(output_pixels)
1182             .pooling_elements(pooling_elements)
1183             .pooling_tile(9, 8)
1184             .channels(channels)
1185             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1186         }
1187       }
1188     }
1189   }
1190 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_input_offset)1191   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_input_offset) {
1192     TEST_REQUIRES_ARM_NEON;
1193     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1194       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1195         for (size_t channels = 1; channels <= 40; channels += 7) {
1196           AvgPoolMicrokernelTester()
1197             .output_pixels(output_pixels)
1198             .pooling_elements(pooling_elements)
1199             .pooling_tile(9, 8)
1200             .channels(channels)
1201             .input_offset(43)
1202             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1203         }
1204       }
1205     }
1206   }
1207 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_zero)1208   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_zero) {
1209     TEST_REQUIRES_ARM_NEON;
1210     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1211       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1212         for (size_t channels = 1; channels <= 40; channels += 7) {
1213           for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
1214             AvgPoolMicrokernelTester()
1215               .output_pixels(output_pixels)
1216               .pooling_elements(pooling_elements)
1217               .pooling_tile(9, 8)
1218               .channels(channels)
1219               .input_offset(43)
1220               .zero_index(zero_index)
1221               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1222           }
1223         }
1224       }
1225     }
1226   }
1227 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_input_scale)1228   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_input_scale) {
1229     TEST_REQUIRES_ARM_NEON;
1230     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1231       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1232         for (size_t channels = 1; channels <= 40; channels += 7) {
1233           for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1234             AvgPoolMicrokernelTester()
1235               .output_pixels(output_pixels)
1236               .pooling_elements(pooling_elements)
1237               .pooling_tile(9, 8)
1238               .channels(channels)
1239               .input_scale(scale)
1240               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1241           }
1242         }
1243       }
1244     }
1245   }
1246 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_input_zero_point)1247   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_input_zero_point) {
1248     TEST_REQUIRES_ARM_NEON;
1249     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1250       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1251         for (size_t channels = 1; channels <= 40; channels += 7) {
1252           for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1253             AvgPoolMicrokernelTester()
1254               .output_pixels(output_pixels)
1255               .pooling_elements(pooling_elements)
1256               .pooling_tile(9, 8)
1257               .channels(channels)
1258               .input_zero_point(zero_point)
1259               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1260           }
1261         }
1262       }
1263     }
1264   }
1265 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_output_scale)1266   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_output_scale) {
1267     TEST_REQUIRES_ARM_NEON;
1268     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1269       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1270         for (size_t channels = 1; channels <= 40; channels += 7) {
1271           for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1272             AvgPoolMicrokernelTester()
1273               .output_pixels(output_pixels)
1274               .pooling_elements(pooling_elements)
1275               .pooling_tile(9, 8)
1276               .channels(channels)
1277               .output_scale(scale)
1278               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1279           }
1280         }
1281       }
1282     }
1283   }
1284 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_output_zero_point)1285   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_output_zero_point) {
1286     TEST_REQUIRES_ARM_NEON;
1287     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1288       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1289         for (size_t channels = 1; channels <= 40; channels += 7) {
1290           for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1291             AvgPoolMicrokernelTester()
1292               .output_pixels(output_pixels)
1293               .pooling_elements(pooling_elements)
1294               .pooling_tile(9, 8)
1295               .channels(channels)
1296               .output_zero_point(zero_point)
1297               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1298           }
1299         }
1300       }
1301     }
1302   }
1303 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_qmin)1304   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_qmin) {
1305     TEST_REQUIRES_ARM_NEON;
1306     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1307       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1308         for (size_t channels = 1; channels <= 40; channels += 7) {
1309           AvgPoolMicrokernelTester()
1310             .output_pixels(output_pixels)
1311             .pooling_elements(pooling_elements)
1312             .pooling_tile(9, 8)
1313             .channels(channels)
1314             .qmin(128)
1315             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1316         }
1317       }
1318     }
1319   }
1320 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_qmax)1321   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_qmax) {
1322     TEST_REQUIRES_ARM_NEON;
1323     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1324       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1325         for (size_t channels = 1; channels <= 40; channels += 7) {
1326           AvgPoolMicrokernelTester()
1327             .output_pixels(output_pixels)
1328             .pooling_elements(pooling_elements)
1329             .pooling_tile(9, 8)
1330             .channels(channels)
1331             .qmax(128)
1332             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1333         }
1334       }
1335     }
1336   }
1337 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_output_stride)1338   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_output_stride) {
1339     TEST_REQUIRES_ARM_NEON;
1340     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1341       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1342         for (size_t channels = 1; channels <= 40; channels += 7) {
1343           AvgPoolMicrokernelTester()
1344             .output_pixels(output_pixels)
1345             .pooling_elements(pooling_elements)
1346             .pooling_tile(9, 8)
1347             .channels(channels)
1348             .output_stride(43)
1349             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1350         }
1351       }
1352     }
1353   }
1354 
TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8,few_output_pixels_with_step)1355   TEST(QU8_AVGPOOL_MINMAX_9P8X__NEON_C8, few_output_pixels_with_step) {
1356     TEST_REQUIRES_ARM_NEON;
1357     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
1358       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
1359         for (size_t channels = 1; channels <= 40; channels += 7) {
1360           for (size_t step = 2; step <= pooling_elements; step++) {
1361             AvgPoolMicrokernelTester()
1362               .output_pixels(output_pixels)
1363               .pooling_elements(pooling_elements)
1364               .pooling_tile(9, 8)
1365               .step(step)
1366               .channels(channels)
1367               .output_stride(43)
1368               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__neon_c8);
1369           }
1370         }
1371       }
1372     }
1373   }
1374 #endif  // XNN_ARCH_ARM || XNN_ARCH_ARM64
1375 
1376 
1377 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_fulltile)1378   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_fulltile) {
1379     TEST_REQUIRES_X86_SSE2;
1380     AvgPoolMicrokernelTester()
1381       .pooling_elements(17)
1382       .pooling_tile(9, 8)
1383       .channels(8)
1384       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1385   }
1386 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_fulltile_with_input_offset)1387   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_fulltile_with_input_offset) {
1388     TEST_REQUIRES_X86_SSE2;
1389     AvgPoolMicrokernelTester()
1390       .pooling_elements(17)
1391       .pooling_tile(9, 8)
1392       .channels(8)
1393       .input_offset(11)
1394       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1395   }
1396 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_fulltile_with_zero)1397   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_fulltile_with_zero) {
1398     TEST_REQUIRES_X86_SSE2;
1399     for (size_t zero_index = 0; zero_index < 17; zero_index++) {
1400       AvgPoolMicrokernelTester()
1401         .pooling_elements(17)
1402         .pooling_tile(9, 8)
1403         .channels(8)
1404         .input_offset(11)
1405         .zero_index(zero_index)
1406         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1407     }
1408   }
1409 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_fulltile_with_input_scale)1410   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_fulltile_with_input_scale) {
1411     TEST_REQUIRES_X86_SSE2;
1412     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1413       AvgPoolMicrokernelTester()
1414         .pooling_elements(17)
1415         .pooling_tile(9, 8)
1416         .channels(8)
1417         .input_scale(scale)
1418         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1419     }
1420   }
1421 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_fulltile_with_input_zero_point)1422   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_fulltile_with_input_zero_point) {
1423     TEST_REQUIRES_X86_SSE2;
1424     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1425       AvgPoolMicrokernelTester()
1426         .pooling_elements(17)
1427         .pooling_tile(9, 8)
1428         .channels(8)
1429         .input_zero_point(zero_point)
1430         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1431     }
1432   }
1433 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_fulltile_with_output_scale)1434   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_fulltile_with_output_scale) {
1435     TEST_REQUIRES_X86_SSE2;
1436     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1437       AvgPoolMicrokernelTester()
1438         .pooling_elements(17)
1439         .pooling_tile(9, 8)
1440         .channels(8)
1441         .output_scale(scale)
1442         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1443     }
1444   }
1445 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_fulltile_with_output_zero_point)1446   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_fulltile_with_output_zero_point) {
1447     TEST_REQUIRES_X86_SSE2;
1448     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1449       AvgPoolMicrokernelTester()
1450         .pooling_elements(17)
1451         .pooling_tile(9, 8)
1452         .channels(8)
1453         .output_zero_point(zero_point)
1454         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1455     }
1456   }
1457 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_fulltile_with_qmin)1458   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_fulltile_with_qmin) {
1459     TEST_REQUIRES_X86_SSE2;
1460     AvgPoolMicrokernelTester()
1461       .pooling_elements(17)
1462       .pooling_tile(9, 8)
1463       .channels(8)
1464       .qmin(128)
1465       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1466   }
1467 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_fulltile_with_qmax)1468   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_fulltile_with_qmax) {
1469     TEST_REQUIRES_X86_SSE2;
1470     AvgPoolMicrokernelTester()
1471       .pooling_elements(17)
1472       .pooling_tile(9, 8)
1473       .channels(8)
1474       .qmax(128)
1475       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1476   }
1477 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_subtile)1478   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_subtile) {
1479     TEST_REQUIRES_X86_SSE2;
1480     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1481       AvgPoolMicrokernelTester()
1482         .pooling_elements(pooling_elements)
1483         .pooling_tile(9, 8)
1484         .channels(8)
1485         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1486     }
1487   }
1488 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_subtile_with_input_offset)1489   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_subtile_with_input_offset) {
1490     TEST_REQUIRES_X86_SSE2;
1491     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1492       AvgPoolMicrokernelTester()
1493         .pooling_elements(pooling_elements)
1494         .pooling_tile(9, 8)
1495         .channels(8)
1496         .input_offset(11)
1497         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1498     }
1499   }
1500 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_twopass_subtile_with_zero)1501   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_twopass_subtile_with_zero) {
1502     TEST_REQUIRES_X86_SSE2;
1503     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1504       for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
1505         AvgPoolMicrokernelTester()
1506           .pooling_elements(pooling_elements)
1507           .pooling_tile(9, 8)
1508           .channels(8)
1509           .input_offset(11)
1510           .zero_index(zero_index)
1511           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1512       }
1513     }
1514   }
1515 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_fulltile)1516   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_fulltile) {
1517     TEST_REQUIRES_X86_SSE2;
1518     for (size_t channels = 16; channels < 64; channels += 8) {
1519       AvgPoolMicrokernelTester()
1520         .pooling_elements(17)
1521         .pooling_tile(9, 8)
1522         .channels(channels)
1523         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1524     }
1525   }
1526 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_fulltile_with_input_offset)1527   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_fulltile_with_input_offset) {
1528     TEST_REQUIRES_X86_SSE2;
1529     for (size_t channels = 16; channels < 64; channels += 8) {
1530       AvgPoolMicrokernelTester()
1531         .pooling_elements(17)
1532         .pooling_tile(9, 8)
1533         .channels(channels)
1534         .input_offset(41)
1535         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1536     }
1537   }
1538 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_fulltile_with_zero)1539   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_fulltile_with_zero) {
1540     TEST_REQUIRES_X86_SSE2;
1541     for (size_t channels = 16; channels < 64; channels += 8) {
1542       for (size_t zero_index = 0; zero_index < 17; zero_index++) {
1543         AvgPoolMicrokernelTester()
1544           .pooling_elements(17)
1545           .pooling_tile(9, 8)
1546           .channels(channels)
1547           .input_offset(41)
1548           .zero_index(zero_index)
1549           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1550       }
1551     }
1552   }
1553 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_fulltile_with_input_scale)1554   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_fulltile_with_input_scale) {
1555     TEST_REQUIRES_X86_SSE2;
1556     for (size_t channels = 16; channels < 64; channels += 8) {
1557       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1558         AvgPoolMicrokernelTester()
1559           .pooling_elements(17)
1560           .pooling_tile(9, 8)
1561           .channels(channels)
1562           .input_scale(scale)
1563           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1564       }
1565     }
1566   }
1567 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_fulltile_with_input_zero_point)1568   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_fulltile_with_input_zero_point) {
1569     TEST_REQUIRES_X86_SSE2;
1570     for (size_t channels = 16; channels < 64; channels += 8) {
1571       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1572         AvgPoolMicrokernelTester()
1573           .pooling_elements(17)
1574           .pooling_tile(9, 8)
1575           .channels(channels)
1576           .input_zero_point(zero_point)
1577           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1578       }
1579     }
1580   }
1581 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_fulltile_with_output_scale)1582   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_fulltile_with_output_scale) {
1583     TEST_REQUIRES_X86_SSE2;
1584     for (size_t channels = 16; channels < 64; channels += 8) {
1585       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1586         AvgPoolMicrokernelTester()
1587           .pooling_elements(17)
1588           .pooling_tile(9, 8)
1589           .channels(channels)
1590           .output_scale(scale)
1591           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1592       }
1593     }
1594   }
1595 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_fulltile_with_output_zero_point)1596   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_fulltile_with_output_zero_point) {
1597     TEST_REQUIRES_X86_SSE2;
1598     for (size_t channels = 16; channels < 64; channels += 8) {
1599       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1600         AvgPoolMicrokernelTester()
1601           .pooling_elements(17)
1602           .pooling_tile(9, 8)
1603           .channels(channels)
1604           .output_zero_point(zero_point)
1605           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1606       }
1607     }
1608   }
1609 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_fulltile_with_qmin)1610   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_fulltile_with_qmin) {
1611     TEST_REQUIRES_X86_SSE2;
1612     for (size_t channels = 16; channels < 64; channels += 8) {
1613       AvgPoolMicrokernelTester()
1614         .pooling_elements(17)
1615         .pooling_tile(9, 8)
1616         .channels(channels)
1617         .qmin(128)
1618         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1619     }
1620   }
1621 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_fulltile_with_qmax)1622   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_fulltile_with_qmax) {
1623     TEST_REQUIRES_X86_SSE2;
1624     for (size_t channels = 16; channels < 64; channels += 8) {
1625       AvgPoolMicrokernelTester()
1626         .pooling_elements(17)
1627         .pooling_tile(9, 8)
1628         .channels(channels)
1629         .qmax(128)
1630         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1631     }
1632   }
1633 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_subtile)1634   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_subtile) {
1635     TEST_REQUIRES_X86_SSE2;
1636     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1637       for (size_t channels = 16; channels < 64; channels += 8) {
1638         AvgPoolMicrokernelTester()
1639           .pooling_elements(pooling_elements)
1640           .pooling_tile(9, 8)
1641           .channels(channels)
1642           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1643       }
1644     }
1645   }
1646 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_subtile_with_input_offset)1647   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_subtile_with_input_offset) {
1648     TEST_REQUIRES_X86_SSE2;
1649     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1650       for (size_t channels = 16; channels < 64; channels += 8) {
1651         AvgPoolMicrokernelTester()
1652           .pooling_elements(pooling_elements)
1653           .pooling_tile(9, 8)
1654           .channels(channels)
1655           .input_offset(67)
1656           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1657       }
1658     }
1659   }
1660 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_twopass_subtile_with_zero)1661   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_twopass_subtile_with_zero) {
1662     TEST_REQUIRES_X86_SSE2;
1663     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1664       for (size_t channels = 16; channels < 64; channels += 8) {
1665         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
1666           AvgPoolMicrokernelTester()
1667             .pooling_elements(pooling_elements)
1668             .pooling_tile(9, 8)
1669             .channels(channels)
1670             .input_offset(67)
1671             .zero_index(zero_index)
1672             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1673         }
1674       }
1675     }
1676   }
1677 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_fulltile)1678   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_fulltile) {
1679     TEST_REQUIRES_X86_SSE2;
1680     for (size_t channels = 1; channels < 8; channels++) {
1681       AvgPoolMicrokernelTester()
1682         .pooling_elements(17)
1683         .pooling_tile(9, 8)
1684         .channels(channels)
1685         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1686     }
1687   }
1688 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_fulltile_with_input_offset)1689   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_fulltile_with_input_offset) {
1690     TEST_REQUIRES_X86_SSE2;
1691     for (size_t channels = 1; channels < 8; channels++) {
1692       AvgPoolMicrokernelTester()
1693         .pooling_elements(17)
1694         .pooling_tile(9, 8)
1695         .channels(channels)
1696         .input_offset(11)
1697         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1698     }
1699   }
1700 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_fulltile_with_zero_index)1701   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_fulltile_with_zero_index) {
1702     TEST_REQUIRES_X86_SSE2;
1703     for (size_t channels = 1; channels < 8; channels++) {
1704       for (size_t zero_index = 0; zero_index < 17; zero_index++) {
1705         AvgPoolMicrokernelTester()
1706           .pooling_elements(17)
1707           .pooling_tile(9, 8)
1708           .channels(channels)
1709           .input_offset(11)
1710           .zero_index(zero_index)
1711           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1712       }
1713     }
1714   }
1715 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_fulltile_with_input_scale)1716   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_fulltile_with_input_scale) {
1717     TEST_REQUIRES_X86_SSE2;
1718     for (size_t channels = 1; channels < 8; channels++) {
1719       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1720         AvgPoolMicrokernelTester()
1721           .pooling_elements(17)
1722           .pooling_tile(9, 8)
1723           .channels(channels)
1724           .input_scale(scale)
1725           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1726       }
1727     }
1728   }
1729 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_fulltile_with_input_zero_point)1730   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_fulltile_with_input_zero_point) {
1731     TEST_REQUIRES_X86_SSE2;
1732     for (size_t channels = 1; channels < 8; channels++) {
1733       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1734         AvgPoolMicrokernelTester()
1735           .pooling_elements(17)
1736           .pooling_tile(9, 8)
1737           .channels(channels)
1738           .input_zero_point(zero_point)
1739           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1740       }
1741     }
1742   }
1743 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_fulltile_with_output_scale)1744   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_fulltile_with_output_scale) {
1745     TEST_REQUIRES_X86_SSE2;
1746     for (size_t channels = 1; channels < 8; channels++) {
1747       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1748         AvgPoolMicrokernelTester()
1749           .pooling_elements(17)
1750           .pooling_tile(9, 8)
1751           .channels(channels)
1752           .output_scale(scale)
1753           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1754       }
1755     }
1756   }
1757 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_fulltile_with_output_zero_point)1758   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_fulltile_with_output_zero_point) {
1759     TEST_REQUIRES_X86_SSE2;
1760     for (size_t channels = 1; channels < 8; channels++) {
1761       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1762         AvgPoolMicrokernelTester()
1763           .pooling_elements(17)
1764           .pooling_tile(9, 8)
1765           .channels(channels)
1766           .output_zero_point(zero_point)
1767           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1768       }
1769     }
1770   }
1771 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_fulltile_with_qmin)1772   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_fulltile_with_qmin) {
1773     TEST_REQUIRES_X86_SSE2;
1774     for (size_t channels = 1; channels < 8; channels++) {
1775       AvgPoolMicrokernelTester()
1776         .pooling_elements(17)
1777         .pooling_tile(9, 8)
1778         .channels(channels)
1779         .qmin(128)
1780         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1781     }
1782   }
1783 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_fulltile_with_qmax)1784   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_fulltile_with_qmax) {
1785     TEST_REQUIRES_X86_SSE2;
1786     for (size_t channels = 1; channels < 8; channels++) {
1787       AvgPoolMicrokernelTester()
1788         .pooling_elements(17)
1789         .pooling_tile(9, 8)
1790         .channels(channels)
1791         .qmax(128)
1792         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1793     }
1794   }
1795 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_subtile)1796   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_subtile) {
1797     TEST_REQUIRES_X86_SSE2;
1798     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1799       for (size_t channels = 1; channels < 8; channels++) {
1800         AvgPoolMicrokernelTester()
1801           .pooling_elements(pooling_elements)
1802           .pooling_tile(9, 8)
1803           .channels(channels)
1804           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1805       }
1806     }
1807   }
1808 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_subtile_with_input_offset)1809   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_subtile_with_input_offset) {
1810     TEST_REQUIRES_X86_SSE2;
1811     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1812       for (size_t channels = 1; channels < 8; channels++) {
1813         AvgPoolMicrokernelTester()
1814           .pooling_elements(pooling_elements)
1815           .pooling_tile(9, 8)
1816           .channels(channels)
1817           .input_offset(11)
1818           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1819       }
1820     }
1821   }
1822 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_twopass_subtile_with_zero)1823   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_twopass_subtile_with_zero) {
1824     TEST_REQUIRES_X86_SSE2;
1825     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1826       for (size_t channels = 1; channels < 8; channels++) {
1827         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
1828           AvgPoolMicrokernelTester()
1829             .pooling_elements(pooling_elements)
1830             .pooling_tile(9, 8)
1831             .channels(channels)
1832             .input_offset(11)
1833             .zero_index(zero_index)
1834             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1835         }
1836       }
1837     }
1838   }
1839 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_fulltile)1840   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_fulltile) {
1841     TEST_REQUIRES_X86_SSE2;
1842     for (size_t channels = 9; channels < 16; channels++) {
1843       AvgPoolMicrokernelTester()
1844         .pooling_elements(17)
1845         .pooling_tile(9, 8)
1846         .channels(channels)
1847         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1848     }
1849   }
1850 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_fulltile_with_input_offset)1851   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_fulltile_with_input_offset) {
1852     TEST_REQUIRES_X86_SSE2;
1853     for (size_t channels = 9; channels < 16; channels++) {
1854       AvgPoolMicrokernelTester()
1855         .pooling_elements(17)
1856         .pooling_tile(9, 8)
1857         .channels(channels)
1858         .input_offset(17)
1859         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1860     }
1861   }
1862 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_fulltile_with_zero)1863   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_fulltile_with_zero) {
1864     TEST_REQUIRES_X86_SSE2;
1865     for (size_t channels = 9; channels < 16; channels++) {
1866       for (size_t zero_index = 0; zero_index < 17; zero_index++) {
1867         AvgPoolMicrokernelTester()
1868           .pooling_elements(17)
1869           .pooling_tile(9, 8)
1870           .channels(channels)
1871           .input_offset(17)
1872           .zero_index(zero_index)
1873           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1874       }
1875     }
1876   }
1877 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_fulltile_with_input_scale)1878   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_fulltile_with_input_scale) {
1879     TEST_REQUIRES_X86_SSE2;
1880     for (size_t channels = 9; channels < 16; channels++) {
1881       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1882         AvgPoolMicrokernelTester()
1883           .pooling_elements(17)
1884           .pooling_tile(9, 8)
1885           .channels(channels)
1886           .input_scale(scale)
1887           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1888       }
1889     }
1890   }
1891 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_fulltile_with_input_zero_point)1892   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_fulltile_with_input_zero_point) {
1893     TEST_REQUIRES_X86_SSE2;
1894     for (size_t channels = 9; channels < 16; channels++) {
1895       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1896         AvgPoolMicrokernelTester()
1897           .pooling_elements(17)
1898           .pooling_tile(9, 8)
1899           .channels(channels)
1900           .input_zero_point(zero_point)
1901           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1902       }
1903     }
1904   }
1905 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_fulltile_with_output_scale)1906   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_fulltile_with_output_scale) {
1907     TEST_REQUIRES_X86_SSE2;
1908     for (size_t channels = 9; channels < 16; channels++) {
1909       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
1910         AvgPoolMicrokernelTester()
1911           .pooling_elements(17)
1912           .pooling_tile(9, 8)
1913           .channels(channels)
1914           .output_scale(scale)
1915           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1916       }
1917     }
1918   }
1919 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_fulltile_with_output_zero_point)1920   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_fulltile_with_output_zero_point) {
1921     TEST_REQUIRES_X86_SSE2;
1922     for (size_t channels = 9; channels < 16; channels++) {
1923       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
1924         AvgPoolMicrokernelTester()
1925           .pooling_elements(17)
1926           .pooling_tile(9, 8)
1927           .channels(channels)
1928           .output_zero_point(zero_point)
1929           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1930       }
1931     }
1932   }
1933 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_fulltile_with_qmin)1934   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_fulltile_with_qmin) {
1935     TEST_REQUIRES_X86_SSE2;
1936     for (size_t channels = 9; channels < 16; channels++) {
1937       AvgPoolMicrokernelTester()
1938         .pooling_elements(17)
1939         .pooling_tile(9, 8)
1940         .channels(channels)
1941         .qmin(128)
1942         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1943     }
1944   }
1945 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_fulltile_with_qmax)1946   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_fulltile_with_qmax) {
1947     TEST_REQUIRES_X86_SSE2;
1948     for (size_t channels = 9; channels < 16; channels++) {
1949       AvgPoolMicrokernelTester()
1950         .pooling_elements(17)
1951         .pooling_tile(9, 8)
1952         .channels(channels)
1953         .qmax(128)
1954         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1955     }
1956   }
1957 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_subtile)1958   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_subtile) {
1959     TEST_REQUIRES_X86_SSE2;
1960     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1961       for (size_t channels = 9; channels < 16; channels++) {
1962         AvgPoolMicrokernelTester()
1963           .pooling_elements(pooling_elements)
1964           .pooling_tile(9, 8)
1965           .channels(channels)
1966           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1967       }
1968     }
1969   }
1970 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_subtile_with_input_offset)1971   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_subtile_with_input_offset) {
1972     TEST_REQUIRES_X86_SSE2;
1973     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1974       for (size_t channels = 9; channels < 16; channels++) {
1975         AvgPoolMicrokernelTester()
1976           .pooling_elements(pooling_elements)
1977           .pooling_tile(9, 8)
1978           .channels(channels)
1979           .input_offset(17)
1980           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1981       }
1982     }
1983   }
1984 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_twopass_subtile_with_zero)1985   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_twopass_subtile_with_zero) {
1986     TEST_REQUIRES_X86_SSE2;
1987     for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
1988       for (size_t channels = 9; channels < 16; channels++) {
1989         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
1990           AvgPoolMicrokernelTester()
1991             .pooling_elements(pooling_elements)
1992             .pooling_tile(9, 8)
1993             .channels(channels)
1994             .input_offset(17)
1995             .zero_index(zero_index)
1996             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
1997         }
1998       }
1999     }
2000   }
2001 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_multipass)2002   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_multipass) {
2003     TEST_REQUIRES_X86_SSE2;
2004     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2005       AvgPoolMicrokernelTester()
2006         .pooling_elements(pooling_elements)
2007         .pooling_tile(9, 8)
2008         .channels(8)
2009         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2010     }
2011   }
2012 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_multipass_with_input_offset)2013   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_multipass_with_input_offset) {
2014     TEST_REQUIRES_X86_SSE2;
2015     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2016       AvgPoolMicrokernelTester()
2017         .pooling_elements(pooling_elements)
2018         .pooling_tile(9, 8)
2019         .channels(8)
2020         .input_offset(11)
2021         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2022     }
2023   }
2024 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_multipass_with_zero)2025   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_multipass_with_zero) {
2026     TEST_REQUIRES_X86_SSE2;
2027     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2028       for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
2029         AvgPoolMicrokernelTester()
2030           .pooling_elements(pooling_elements)
2031           .pooling_tile(9, 8)
2032           .channels(8)
2033           .input_offset(11)
2034           .zero_index(zero_index)
2035           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2036       }
2037     }
2038   }
2039 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_multipass_with_input_scale)2040   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_multipass_with_input_scale) {
2041     TEST_REQUIRES_X86_SSE2;
2042     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2043       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2044         AvgPoolMicrokernelTester()
2045           .pooling_elements(pooling_elements)
2046           .pooling_tile(9, 8)
2047           .channels(8)
2048           .input_scale(scale)
2049           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2050       }
2051     }
2052   }
2053 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_multipass_with_input_zero_point)2054   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_multipass_with_input_zero_point) {
2055     TEST_REQUIRES_X86_SSE2;
2056     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2057       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2058         AvgPoolMicrokernelTester()
2059           .pooling_elements(pooling_elements)
2060           .pooling_tile(9, 8)
2061           .channels(8)
2062           .input_zero_point(zero_point)
2063           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2064       }
2065     }
2066   }
2067 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_multipass_with_output_scale)2068   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_multipass_with_output_scale) {
2069     TEST_REQUIRES_X86_SSE2;
2070     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2071       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2072         AvgPoolMicrokernelTester()
2073           .pooling_elements(pooling_elements)
2074           .pooling_tile(9, 8)
2075           .channels(8)
2076           .output_scale(scale)
2077           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2078       }
2079     }
2080   }
2081 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_multipass_with_output_zero_point)2082   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_multipass_with_output_zero_point) {
2083     TEST_REQUIRES_X86_SSE2;
2084     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2085       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2086         AvgPoolMicrokernelTester()
2087           .pooling_elements(pooling_elements)
2088           .pooling_tile(9, 8)
2089           .channels(8)
2090           .output_zero_point(zero_point)
2091           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2092       }
2093     }
2094   }
2095 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_multipass_with_qmin)2096   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_multipass_with_qmin) {
2097     TEST_REQUIRES_X86_SSE2;
2098     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2099       AvgPoolMicrokernelTester()
2100         .pooling_elements(pooling_elements)
2101         .pooling_tile(9, 8)
2102         .channels(8)
2103         .qmin(128)
2104         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2105     }
2106   }
2107 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_eq_8_multipass_with_qmax)2108   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_eq_8_multipass_with_qmax) {
2109     TEST_REQUIRES_X86_SSE2;
2110     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2111       AvgPoolMicrokernelTester()
2112         .pooling_elements(pooling_elements)
2113         .pooling_tile(9, 8)
2114         .channels(8)
2115         .qmax(128)
2116         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2117     }
2118   }
2119 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_multipass)2120   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_multipass) {
2121     TEST_REQUIRES_X86_SSE2;
2122     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2123       for (size_t channels = 16; channels < 64; channels += 8) {
2124         AvgPoolMicrokernelTester()
2125           .pooling_elements(pooling_elements)
2126           .pooling_tile(9, 8)
2127           .channels(channels)
2128           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2129       }
2130     }
2131   }
2132 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_multipass_with_input_offset)2133   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_multipass_with_input_offset) {
2134     TEST_REQUIRES_X86_SSE2;
2135     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2136       for (size_t channels = 16; channels < 64; channels += 8) {
2137         AvgPoolMicrokernelTester()
2138           .pooling_elements(pooling_elements)
2139           .pooling_tile(9, 8)
2140           .channels(channels)
2141           .input_offset(67)
2142           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2143       }
2144     }
2145   }
2146 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_multipass_with_zero)2147   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_multipass_with_zero) {
2148     TEST_REQUIRES_X86_SSE2;
2149     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2150       for (size_t channels = 16; channels < 64; channels += 8) {
2151         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
2152           AvgPoolMicrokernelTester()
2153             .pooling_elements(pooling_elements)
2154             .pooling_tile(9, 8)
2155             .channels(channels)
2156             .input_offset(67)
2157             .zero_index(zero_index)
2158             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2159         }
2160       }
2161     }
2162   }
2163 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_multipass_with_input_scale)2164   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_multipass_with_input_scale) {
2165     TEST_REQUIRES_X86_SSE2;
2166     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2167       for (size_t channels = 16; channels < 64; channels += 8) {
2168         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2169           AvgPoolMicrokernelTester()
2170             .pooling_elements(pooling_elements)
2171             .pooling_tile(9, 8)
2172             .channels(channels)
2173             .input_scale(scale)
2174             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2175         }
2176       }
2177     }
2178   }
2179 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_multipass_with_input_zero_point)2180   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_multipass_with_input_zero_point) {
2181     TEST_REQUIRES_X86_SSE2;
2182     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2183       for (size_t channels = 16; channels < 64; channels += 8) {
2184         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2185           AvgPoolMicrokernelTester()
2186             .pooling_elements(pooling_elements)
2187             .pooling_tile(9, 8)
2188             .channels(channels)
2189             .input_zero_point(zero_point)
2190             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2191         }
2192       }
2193     }
2194   }
2195 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_multipass_with_output_scale)2196   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_multipass_with_output_scale) {
2197     TEST_REQUIRES_X86_SSE2;
2198     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2199       for (size_t channels = 16; channels < 64; channels += 8) {
2200         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2201           AvgPoolMicrokernelTester()
2202             .pooling_elements(pooling_elements)
2203             .pooling_tile(9, 8)
2204             .channels(channels)
2205             .output_scale(scale)
2206             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2207         }
2208       }
2209     }
2210   }
2211 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_multipass_with_output_zero_point)2212   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_multipass_with_output_zero_point) {
2213     TEST_REQUIRES_X86_SSE2;
2214     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2215       for (size_t channels = 16; channels < 64; channels += 8) {
2216         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2217           AvgPoolMicrokernelTester()
2218             .pooling_elements(pooling_elements)
2219             .pooling_tile(9, 8)
2220             .channels(channels)
2221             .output_zero_point(zero_point)
2222             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2223         }
2224       }
2225     }
2226   }
2227 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_multipass_with_qmin)2228   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_multipass_with_qmin) {
2229     TEST_REQUIRES_X86_SSE2;
2230     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2231       for (size_t channels = 16; channels < 64; channels += 8) {
2232         AvgPoolMicrokernelTester()
2233           .pooling_elements(pooling_elements)
2234           .pooling_tile(9, 8)
2235           .channels(channels)
2236           .qmin(128)
2237           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2238       }
2239     }
2240   }
2241 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_div_8_multipass_with_qmax)2242   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_div_8_multipass_with_qmax) {
2243     TEST_REQUIRES_X86_SSE2;
2244     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2245       for (size_t channels = 16; channels < 64; channels += 8) {
2246         AvgPoolMicrokernelTester()
2247           .pooling_elements(pooling_elements)
2248           .pooling_tile(9, 8)
2249           .channels(channels)
2250           .qmax(128)
2251           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2252       }
2253     }
2254   }
2255 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_multipass)2256   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_multipass) {
2257     TEST_REQUIRES_X86_SSE2;
2258     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2259       for (size_t channels = 1; channels < 8; channels++) {
2260         AvgPoolMicrokernelTester()
2261           .pooling_elements(pooling_elements)
2262           .pooling_tile(9, 8)
2263           .channels(channels)
2264           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2265       }
2266     }
2267   }
2268 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_multipass_with_input_offset)2269   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_multipass_with_input_offset) {
2270     TEST_REQUIRES_X86_SSE2;
2271     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2272       for (size_t channels = 1; channels < 8; channels++) {
2273         AvgPoolMicrokernelTester()
2274           .pooling_elements(pooling_elements)
2275           .pooling_tile(9, 8)
2276           .channels(channels)
2277           .input_offset(8)
2278           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2279       }
2280     }
2281   }
2282 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_multipass_with_zero)2283   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_multipass_with_zero) {
2284     TEST_REQUIRES_X86_SSE2;
2285     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2286       for (size_t channels = 1; channels < 8; channels++) {
2287         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
2288           AvgPoolMicrokernelTester()
2289             .pooling_elements(pooling_elements)
2290             .pooling_tile(9, 8)
2291             .channels(channels)
2292             .input_offset(8)
2293             .zero_index(zero_index)
2294             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2295         }
2296       }
2297     }
2298   }
2299 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_multipass_with_input_scale)2300   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_multipass_with_input_scale) {
2301     TEST_REQUIRES_X86_SSE2;
2302     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2303       for (size_t channels = 1; channels < 8; channels++) {
2304         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2305           AvgPoolMicrokernelTester()
2306             .pooling_elements(pooling_elements)
2307             .pooling_tile(9, 8)
2308             .channels(channels)
2309             .input_scale(scale)
2310             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2311         }
2312       }
2313     }
2314   }
2315 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_multipass_with_input_zero_point)2316   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_multipass_with_input_zero_point) {
2317     TEST_REQUIRES_X86_SSE2;
2318     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2319       for (size_t channels = 1; channels < 8; channels++) {
2320         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2321           AvgPoolMicrokernelTester()
2322             .pooling_elements(pooling_elements)
2323             .pooling_tile(9, 8)
2324             .channels(channels)
2325             .input_zero_point(zero_point)
2326             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2327         }
2328       }
2329     }
2330   }
2331 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_multipass_with_output_scale)2332   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_multipass_with_output_scale) {
2333     TEST_REQUIRES_X86_SSE2;
2334     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2335       for (size_t channels = 1; channels < 8; channels++) {
2336         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2337           AvgPoolMicrokernelTester()
2338             .pooling_elements(pooling_elements)
2339             .pooling_tile(9, 8)
2340             .channels(channels)
2341             .output_scale(scale)
2342             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2343         }
2344       }
2345     }
2346   }
2347 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_multipass_with_output_zero_point)2348   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_multipass_with_output_zero_point) {
2349     TEST_REQUIRES_X86_SSE2;
2350     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2351       for (size_t channels = 1; channels < 8; channels++) {
2352         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2353           AvgPoolMicrokernelTester()
2354             .pooling_elements(pooling_elements)
2355             .pooling_tile(9, 8)
2356             .channels(channels)
2357             .output_zero_point(zero_point)
2358             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2359         }
2360       }
2361     }
2362   }
2363 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_multipass_with_qmin)2364   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_multipass_with_qmin) {
2365     TEST_REQUIRES_X86_SSE2;
2366     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2367       for (size_t channels = 1; channels < 8; channels++) {
2368         AvgPoolMicrokernelTester()
2369           .pooling_elements(pooling_elements)
2370           .pooling_tile(9, 8)
2371           .channels(channels)
2372           .qmin(128)
2373           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2374       }
2375     }
2376   }
2377 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_lt_8_multipass_with_qmax)2378   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_lt_8_multipass_with_qmax) {
2379     TEST_REQUIRES_X86_SSE2;
2380     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2381       for (size_t channels = 1; channels < 8; channels++) {
2382         AvgPoolMicrokernelTester()
2383           .pooling_elements(pooling_elements)
2384           .pooling_tile(9, 8)
2385           .channels(channels)
2386           .qmax(128)
2387           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2388       }
2389     }
2390   }
2391 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_multipass)2392   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_multipass) {
2393     TEST_REQUIRES_X86_SSE2;
2394     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2395       for (size_t channels = 9; channels < 16; channels++) {
2396         AvgPoolMicrokernelTester()
2397           .pooling_elements(pooling_elements)
2398           .pooling_tile(9, 8)
2399           .channels(channels)
2400           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2401       }
2402     }
2403   }
2404 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_multipass_with_input_offset)2405   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_multipass_with_input_offset) {
2406     TEST_REQUIRES_X86_SSE2;
2407     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2408       for (size_t channels = 9; channels < 16; channels++) {
2409         AvgPoolMicrokernelTester()
2410           .pooling_elements(pooling_elements)
2411           .pooling_tile(9, 8)
2412           .channels(channels)
2413           .input_offset(17)
2414           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2415       }
2416     }
2417   }
2418 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_multipass_with_zero)2419   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_multipass_with_zero) {
2420     TEST_REQUIRES_X86_SSE2;
2421     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2422       for (size_t channels = 9; channels < 16; channels++) {
2423         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
2424           AvgPoolMicrokernelTester()
2425             .pooling_elements(pooling_elements)
2426             .pooling_tile(9, 8)
2427             .channels(channels)
2428             .input_offset(17)
2429             .zero_index(zero_index)
2430             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2431         }
2432       }
2433     }
2434   }
2435 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_multipass_with_input_scale)2436   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_multipass_with_input_scale) {
2437     TEST_REQUIRES_X86_SSE2;
2438     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2439       for (size_t channels = 9; channels < 16; channels++) {
2440         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2441           AvgPoolMicrokernelTester()
2442             .pooling_elements(pooling_elements)
2443             .pooling_tile(9, 8)
2444             .channels(channels)
2445             .input_scale(scale)
2446             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2447         }
2448       }
2449     }
2450   }
2451 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_multipass_with_input_zero_point)2452   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_multipass_with_input_zero_point) {
2453     TEST_REQUIRES_X86_SSE2;
2454     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2455       for (size_t channels = 9; channels < 16; channels++) {
2456         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2457           AvgPoolMicrokernelTester()
2458             .pooling_elements(pooling_elements)
2459             .pooling_tile(9, 8)
2460             .channels(channels)
2461             .input_zero_point(zero_point)
2462             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2463         }
2464       }
2465     }
2466   }
2467 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_multipass_with_output_scale)2468   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_multipass_with_output_scale) {
2469     TEST_REQUIRES_X86_SSE2;
2470     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2471       for (size_t channels = 9; channels < 16; channels++) {
2472         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2473           AvgPoolMicrokernelTester()
2474             .pooling_elements(pooling_elements)
2475             .pooling_tile(9, 8)
2476             .channels(channels)
2477             .output_scale(scale)
2478             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2479         }
2480       }
2481     }
2482   }
2483 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_multipass_with_output_zero_point)2484   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_multipass_with_output_zero_point) {
2485     TEST_REQUIRES_X86_SSE2;
2486     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2487       for (size_t channels = 9; channels < 16; channels++) {
2488         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2489           AvgPoolMicrokernelTester()
2490             .pooling_elements(pooling_elements)
2491             .pooling_tile(9, 8)
2492             .channels(channels)
2493             .output_zero_point(zero_point)
2494             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2495         }
2496       }
2497     }
2498   }
2499 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_multipass_with_qmin)2500   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_multipass_with_qmin) {
2501     TEST_REQUIRES_X86_SSE2;
2502     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2503       for (size_t channels = 9; channels < 16; channels++) {
2504         AvgPoolMicrokernelTester()
2505           .pooling_elements(pooling_elements)
2506           .pooling_tile(9, 8)
2507           .channels(channels)
2508           .qmin(128)
2509           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2510       }
2511     }
2512   }
2513 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,channels_gt_8_multipass_with_qmax)2514   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, channels_gt_8_multipass_with_qmax) {
2515     TEST_REQUIRES_X86_SSE2;
2516     for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
2517       for (size_t channels = 9; channels < 16; channels++) {
2518         AvgPoolMicrokernelTester()
2519           .pooling_elements(pooling_elements)
2520           .pooling_tile(9, 8)
2521           .channels(channels)
2522           .qmax(128)
2523           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2524       }
2525     }
2526   }
2527 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels)2528   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels) {
2529     TEST_REQUIRES_X86_SSE2;
2530     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2531       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2532         for (size_t channels = 1; channels <= 40; channels += 7) {
2533           AvgPoolMicrokernelTester()
2534             .output_pixels(output_pixels)
2535             .pooling_elements(pooling_elements)
2536             .pooling_tile(9, 8)
2537             .channels(channels)
2538             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2539         }
2540       }
2541     }
2542   }
2543 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_input_offset)2544   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_input_offset) {
2545     TEST_REQUIRES_X86_SSE2;
2546     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2547       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2548         for (size_t channels = 1; channels <= 40; channels += 7) {
2549           AvgPoolMicrokernelTester()
2550             .output_pixels(output_pixels)
2551             .pooling_elements(pooling_elements)
2552             .pooling_tile(9, 8)
2553             .channels(channels)
2554             .input_offset(43)
2555             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2556         }
2557       }
2558     }
2559   }
2560 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_zero)2561   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_zero) {
2562     TEST_REQUIRES_X86_SSE2;
2563     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2564       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2565         for (size_t channels = 1; channels <= 40; channels += 7) {
2566           for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
2567             AvgPoolMicrokernelTester()
2568               .output_pixels(output_pixels)
2569               .pooling_elements(pooling_elements)
2570               .pooling_tile(9, 8)
2571               .channels(channels)
2572               .input_offset(43)
2573               .zero_index(zero_index)
2574               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2575           }
2576         }
2577       }
2578     }
2579   }
2580 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_input_scale)2581   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_input_scale) {
2582     TEST_REQUIRES_X86_SSE2;
2583     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2584       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2585         for (size_t channels = 1; channels <= 40; channels += 7) {
2586           for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2587             AvgPoolMicrokernelTester()
2588               .output_pixels(output_pixels)
2589               .pooling_elements(pooling_elements)
2590               .pooling_tile(9, 8)
2591               .channels(channels)
2592               .input_scale(scale)
2593               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2594           }
2595         }
2596       }
2597     }
2598   }
2599 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_input_zero_point)2600   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_input_zero_point) {
2601     TEST_REQUIRES_X86_SSE2;
2602     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2603       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2604         for (size_t channels = 1; channels <= 40; channels += 7) {
2605           for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2606             AvgPoolMicrokernelTester()
2607               .output_pixels(output_pixels)
2608               .pooling_elements(pooling_elements)
2609               .pooling_tile(9, 8)
2610               .channels(channels)
2611               .input_zero_point(zero_point)
2612               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2613           }
2614         }
2615       }
2616     }
2617   }
2618 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_output_scale)2619   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_output_scale) {
2620     TEST_REQUIRES_X86_SSE2;
2621     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2622       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2623         for (size_t channels = 1; channels <= 40; channels += 7) {
2624           for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2625             AvgPoolMicrokernelTester()
2626               .output_pixels(output_pixels)
2627               .pooling_elements(pooling_elements)
2628               .pooling_tile(9, 8)
2629               .channels(channels)
2630               .output_scale(scale)
2631               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2632           }
2633         }
2634       }
2635     }
2636   }
2637 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_output_zero_point)2638   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_output_zero_point) {
2639     TEST_REQUIRES_X86_SSE2;
2640     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2641       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2642         for (size_t channels = 1; channels <= 40; channels += 7) {
2643           for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2644             AvgPoolMicrokernelTester()
2645               .output_pixels(output_pixels)
2646               .pooling_elements(pooling_elements)
2647               .pooling_tile(9, 8)
2648               .channels(channels)
2649               .output_zero_point(zero_point)
2650               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2651           }
2652         }
2653       }
2654     }
2655   }
2656 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_qmin)2657   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_qmin) {
2658     TEST_REQUIRES_X86_SSE2;
2659     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2660       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2661         for (size_t channels = 1; channels <= 40; channels += 7) {
2662           AvgPoolMicrokernelTester()
2663             .output_pixels(output_pixels)
2664             .pooling_elements(pooling_elements)
2665             .pooling_tile(9, 8)
2666             .channels(channels)
2667             .qmin(128)
2668             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2669         }
2670       }
2671     }
2672   }
2673 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_qmax)2674   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_qmax) {
2675     TEST_REQUIRES_X86_SSE2;
2676     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2677       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2678         for (size_t channels = 1; channels <= 40; channels += 7) {
2679           AvgPoolMicrokernelTester()
2680             .output_pixels(output_pixels)
2681             .pooling_elements(pooling_elements)
2682             .pooling_tile(9, 8)
2683             .channels(channels)
2684             .qmax(128)
2685             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2686         }
2687       }
2688     }
2689   }
2690 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_output_stride)2691   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_output_stride) {
2692     TEST_REQUIRES_X86_SSE2;
2693     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2694       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2695         for (size_t channels = 1; channels <= 40; channels += 7) {
2696           AvgPoolMicrokernelTester()
2697             .output_pixels(output_pixels)
2698             .pooling_elements(pooling_elements)
2699             .pooling_tile(9, 8)
2700             .channels(channels)
2701             .output_stride(43)
2702             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2703         }
2704       }
2705     }
2706   }
2707 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8,few_output_pixels_with_step)2708   TEST(QU8_AVGPOOL_MINMAX_9P8X__SSE2_C8, few_output_pixels_with_step) {
2709     TEST_REQUIRES_X86_SSE2;
2710     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
2711       for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
2712         for (size_t channels = 1; channels <= 40; channels += 7) {
2713           for (size_t step = 2; step <= pooling_elements; step++) {
2714             AvgPoolMicrokernelTester()
2715               .output_pixels(output_pixels)
2716               .pooling_elements(pooling_elements)
2717               .pooling_tile(9, 8)
2718               .step(step)
2719               .channels(channels)
2720               .output_stride(43)
2721               .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__sse2_c8);
2722           }
2723         }
2724       }
2725     }
2726   }
2727 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
2728 
2729 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_fulltile)2730 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile) {
2731   AvgPoolMicrokernelTester()
2732     .pooling_elements(17)
2733     .pooling_tile(9, 8)
2734     .channels(1)
2735     .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2736 }
2737 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_fulltile_with_input_offset)2738 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_input_offset) {
2739   AvgPoolMicrokernelTester()
2740     .pooling_elements(17)
2741     .pooling_tile(9, 8)
2742     .channels(1)
2743     .input_offset(3)
2744     .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2745 }
2746 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_fulltile_with_zero)2747 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_zero) {
2748   for (size_t zero_index = 0; zero_index < 17; zero_index++) {
2749     AvgPoolMicrokernelTester()
2750       .pooling_elements(17)
2751       .pooling_tile(9, 8)
2752       .channels(1)
2753       .input_offset(3)
2754       .zero_index(zero_index)
2755       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2756   }
2757 }
2758 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_fulltile_with_input_scale)2759 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_input_scale) {
2760   for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2761     AvgPoolMicrokernelTester()
2762       .pooling_elements(17)
2763       .pooling_tile(9, 8)
2764       .channels(1)
2765       .input_scale(scale)
2766       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2767   }
2768 }
2769 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_fulltile_with_input_zero_point)2770 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_input_zero_point) {
2771   for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2772     AvgPoolMicrokernelTester()
2773       .pooling_elements(17)
2774       .pooling_tile(9, 8)
2775       .channels(1)
2776       .input_zero_point(zero_point)
2777       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2778   }
2779 }
2780 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_fulltile_with_output_scale)2781 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_output_scale) {
2782   for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2783     AvgPoolMicrokernelTester()
2784       .pooling_elements(17)
2785       .pooling_tile(9, 8)
2786       .channels(1)
2787       .output_scale(scale)
2788       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2789   }
2790 }
2791 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_fulltile_with_output_zero_point)2792 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_output_zero_point) {
2793   for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2794     AvgPoolMicrokernelTester()
2795       .pooling_elements(17)
2796       .pooling_tile(9, 8)
2797       .channels(1)
2798       .output_zero_point(zero_point)
2799       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2800   }
2801 }
2802 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_fulltile_with_qmin)2803 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_qmin) {
2804   AvgPoolMicrokernelTester()
2805     .pooling_elements(17)
2806     .pooling_tile(9, 8)
2807     .channels(1)
2808     .qmin(128)
2809     .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2810 }
2811 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_fulltile_with_qmax)2812 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_qmax) {
2813   AvgPoolMicrokernelTester()
2814     .pooling_elements(17)
2815     .pooling_tile(9, 8)
2816     .channels(1)
2817     .qmax(128)
2818     .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2819 }
2820 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_subtile)2821 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_subtile) {
2822   for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
2823     AvgPoolMicrokernelTester()
2824       .pooling_elements(pooling_elements)
2825       .pooling_tile(9, 8)
2826       .channels(1)
2827       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2828   }
2829 }
2830 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_subtile_with_input_offset)2831 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_subtile_with_input_offset) {
2832   for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
2833     AvgPoolMicrokernelTester()
2834       .pooling_elements(pooling_elements)
2835       .pooling_tile(9, 8)
2836       .channels(1)
2837       .input_offset(3)
2838       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2839   }
2840 }
2841 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_twopass_subtile_with_zero)2842 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_twopass_subtile_with_zero) {
2843   for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
2844     for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
2845       AvgPoolMicrokernelTester()
2846         .pooling_elements(pooling_elements)
2847         .pooling_tile(9, 8)
2848         .channels(1)
2849         .input_offset(3)
2850         .zero_index(zero_index)
2851         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2852     }
2853   }
2854 }
2855 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_fulltile)2856 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile) {
2857   for (size_t channels = 2; channels < 10; channels++) {
2858     AvgPoolMicrokernelTester()
2859       .pooling_elements(17)
2860       .pooling_tile(9, 8)
2861       .channels(channels)
2862       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2863   }
2864 }
2865 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_fulltile_with_input_offset)2866 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile_with_input_offset) {
2867   for (size_t channels = 2; channels < 10; channels++) {
2868     AvgPoolMicrokernelTester()
2869       .pooling_elements(17)
2870       .pooling_tile(9, 8)
2871       .channels(channels)
2872       .input_offset(3)
2873       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2874   }
2875 }
2876 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_fulltile_with_zero)2877 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile_with_zero) {
2878   for (size_t channels = 2; channels < 10; channels++) {
2879     for (size_t zero_index = 0; zero_index < 17; zero_index++) {
2880       AvgPoolMicrokernelTester()
2881         .pooling_elements(17)
2882         .pooling_tile(9, 8)
2883         .channels(channels)
2884         .input_offset(3)
2885         .zero_index(zero_index)
2886         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2887     }
2888   }
2889 }
2890 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_fulltile_with_input_scale)2891 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile_with_input_scale) {
2892   for (size_t channels = 2; channels < 10; channels++) {
2893     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2894       AvgPoolMicrokernelTester()
2895         .pooling_elements(17)
2896         .pooling_tile(9, 8)
2897         .channels(channels)
2898         .input_scale(scale)
2899         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2900     }
2901   }
2902 }
2903 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_fulltile_with_input_zero_point)2904 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile_with_input_zero_point) {
2905   for (size_t channels = 2; channels < 10; channels++) {
2906     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2907       AvgPoolMicrokernelTester()
2908         .pooling_elements(17)
2909         .pooling_tile(9, 8)
2910         .channels(channels)
2911         .input_zero_point(zero_point)
2912         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2913     }
2914   }
2915 }
2916 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_fulltile_with_output_scale)2917 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile_with_output_scale) {
2918   for (size_t channels = 2; channels < 10; channels++) {
2919     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
2920       AvgPoolMicrokernelTester()
2921         .pooling_elements(17)
2922         .pooling_tile(9, 8)
2923         .channels(channels)
2924         .output_scale(scale)
2925         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2926     }
2927   }
2928 }
2929 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_fulltile_with_output_zero_point)2930 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile_with_output_zero_point) {
2931   for (size_t channels = 2; channels < 10; channels++) {
2932     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
2933       AvgPoolMicrokernelTester()
2934         .pooling_elements(17)
2935         .pooling_tile(9, 8)
2936         .channels(channels)
2937         .output_zero_point(zero_point)
2938         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2939     }
2940   }
2941 }
2942 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_fulltile_with_qmin)2943 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile_with_qmin) {
2944   for (size_t channels = 2; channels < 10; channels++) {
2945     AvgPoolMicrokernelTester()
2946       .pooling_elements(17)
2947       .pooling_tile(9, 8)
2948       .channels(channels)
2949       .qmin(128)
2950       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2951   }
2952 }
2953 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_fulltile_with_qmax)2954 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile_with_qmax) {
2955   for (size_t channels = 2; channels < 10; channels++) {
2956     AvgPoolMicrokernelTester()
2957       .pooling_elements(17)
2958       .pooling_tile(9, 8)
2959       .channels(channels)
2960       .qmax(128)
2961       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2962   }
2963 }
2964 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_subtile)2965 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_subtile) {
2966   for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
2967     for (size_t channels = 2; channels < 10; channels++) {
2968       AvgPoolMicrokernelTester()
2969         .pooling_elements(pooling_elements)
2970         .pooling_tile(9, 8)
2971         .channels(channels)
2972         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2973     }
2974   }
2975 }
2976 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_subtile_with_input_offset)2977 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_subtile_with_input_offset) {
2978   for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
2979     for (size_t channels = 2; channels < 10; channels++) {
2980       AvgPoolMicrokernelTester()
2981         .pooling_elements(pooling_elements)
2982         .pooling_tile(9, 8)
2983         .channels(channels)
2984         .input_offset(3)
2985         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
2986     }
2987   }
2988 }
2989 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_twopass_subtile_with_zero)2990 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_twopass_subtile_with_zero) {
2991   for (size_t pooling_elements = 10; pooling_elements < 17; pooling_elements++) {
2992     for (size_t channels = 2; channels < 10; channels++) {
2993       for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
2994         AvgPoolMicrokernelTester()
2995           .pooling_elements(pooling_elements)
2996           .pooling_tile(9, 8)
2997           .channels(channels)
2998           .input_offset(3)
2999           .zero_index(zero_index)
3000           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3001       }
3002     }
3003   }
3004 }
3005 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_multipass)3006 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_multipass) {
3007   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3008     AvgPoolMicrokernelTester()
3009       .pooling_elements(pooling_elements)
3010       .pooling_tile(9, 8)
3011       .channels(1)
3012       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3013   }
3014 }
3015 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_multipass_with_input_offset)3016 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_multipass_with_input_offset) {
3017   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3018     AvgPoolMicrokernelTester()
3019       .pooling_elements(pooling_elements)
3020       .pooling_tile(9, 8)
3021       .channels(1)
3022       .input_offset(3)
3023       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3024   }
3025 }
3026 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_multipass_with_zero)3027 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_multipass_with_zero) {
3028   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3029     for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
3030       AvgPoolMicrokernelTester()
3031         .pooling_elements(pooling_elements)
3032         .pooling_tile(9, 8)
3033         .channels(1)
3034         .input_offset(3)
3035         .zero_index(zero_index)
3036         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3037     }
3038   }
3039 }
3040 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_multipass_with_input_scale)3041 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_multipass_with_input_scale) {
3042   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3043     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3044       AvgPoolMicrokernelTester()
3045         .pooling_elements(pooling_elements)
3046         .pooling_tile(9, 8)
3047         .channels(1)
3048         .input_scale(scale)
3049         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3050     }
3051   }
3052 }
3053 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_multipass_with_input_zero_point)3054 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_multipass_with_input_zero_point) {
3055   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3056     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3057       AvgPoolMicrokernelTester()
3058         .pooling_elements(pooling_elements)
3059         .pooling_tile(9, 8)
3060         .channels(1)
3061         .input_zero_point(zero_point)
3062         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3063     }
3064   }
3065 }
3066 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_multipass_with_output_scale)3067 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_multipass_with_output_scale) {
3068   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3069     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3070       AvgPoolMicrokernelTester()
3071         .pooling_elements(pooling_elements)
3072         .pooling_tile(9, 8)
3073         .channels(1)
3074         .output_scale(scale)
3075         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3076     }
3077   }
3078 }
3079 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_multipass_with_output_zero_point)3080 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_multipass_with_output_zero_point) {
3081   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3082     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3083       AvgPoolMicrokernelTester()
3084         .pooling_elements(pooling_elements)
3085         .pooling_tile(9, 8)
3086         .channels(1)
3087         .output_zero_point(zero_point)
3088         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3089     }
3090   }
3091 }
3092 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_multipass_with_qmin)3093 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_multipass_with_qmin) {
3094   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3095     AvgPoolMicrokernelTester()
3096       .pooling_elements(pooling_elements)
3097       .pooling_tile(9, 8)
3098       .channels(1)
3099       .qmin(128)
3100       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3101   }
3102 }
3103 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_eq_1_multipass_with_qmax)3104 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_eq_1_multipass_with_qmax) {
3105   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3106     AvgPoolMicrokernelTester()
3107       .pooling_elements(pooling_elements)
3108       .pooling_tile(9, 8)
3109       .channels(1)
3110       .qmax(128)
3111       .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3112   }
3113 }
3114 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_multipass)3115 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_multipass) {
3116   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3117     for (size_t channels = 2; channels < 10; channels++) {
3118       AvgPoolMicrokernelTester()
3119         .pooling_elements(pooling_elements)
3120         .pooling_tile(9, 8)
3121         .channels(channels)
3122         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3123     }
3124   }
3125 }
3126 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_multipass_with_input_offset)3127 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_multipass_with_input_offset) {
3128   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3129     for (size_t channels = 2; channels < 10; channels++) {
3130       AvgPoolMicrokernelTester()
3131         .pooling_elements(pooling_elements)
3132         .pooling_tile(9, 8)
3133         .channels(channels)
3134         .input_offset(3)
3135         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3136     }
3137   }
3138 }
3139 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_multipass_with_zero)3140 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_multipass_with_zero) {
3141   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3142     for (size_t channels = 2; channels < 10; channels++) {
3143       for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
3144         AvgPoolMicrokernelTester()
3145           .pooling_elements(pooling_elements)
3146           .pooling_tile(9, 8)
3147           .channels(channels)
3148           .input_offset(3)
3149           .zero_index(zero_index)
3150           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3151       }
3152     }
3153   }
3154 }
3155 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_multipass_with_input_scale)3156 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_multipass_with_input_scale) {
3157   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3158     for (size_t channels = 2; channels < 10; channels++) {
3159       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3160         AvgPoolMicrokernelTester()
3161           .pooling_elements(pooling_elements)
3162           .pooling_tile(9, 8)
3163           .channels(channels)
3164           .input_scale(scale)
3165           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3166       }
3167     }
3168   }
3169 }
3170 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_multipass_with_input_zero_point)3171 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_multipass_with_input_zero_point) {
3172   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3173     for (size_t channels = 2; channels < 10; channels++) {
3174       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3175         AvgPoolMicrokernelTester()
3176           .pooling_elements(pooling_elements)
3177           .pooling_tile(9, 8)
3178           .channels(channels)
3179           .input_zero_point(zero_point)
3180           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3181       }
3182     }
3183   }
3184 }
3185 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_multipass_with_output_scale)3186 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_multipass_with_output_scale) {
3187   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3188     for (size_t channels = 2; channels < 10; channels++) {
3189       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3190         AvgPoolMicrokernelTester()
3191           .pooling_elements(pooling_elements)
3192           .pooling_tile(9, 8)
3193           .channels(channels)
3194           .output_scale(scale)
3195           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3196       }
3197     }
3198   }
3199 }
3200 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_multipass_with_output_zero_point)3201 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_multipass_with_output_zero_point) {
3202   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3203     for (size_t channels = 2; channels < 10; channels++) {
3204       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3205         AvgPoolMicrokernelTester()
3206           .pooling_elements(pooling_elements)
3207           .pooling_tile(9, 8)
3208           .channels(channels)
3209           .output_zero_point(zero_point)
3210           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3211       }
3212     }
3213   }
3214 }
3215 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_multipass_with_qmin)3216 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_multipass_with_qmin) {
3217   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3218     for (size_t channels = 2; channels < 10; channels++) {
3219       AvgPoolMicrokernelTester()
3220         .pooling_elements(pooling_elements)
3221         .pooling_tile(9, 8)
3222         .channels(channels)
3223         .qmin(128)
3224         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3225     }
3226   }
3227 }
3228 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,channels_gt_1_multipass_with_qmax)3229 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, channels_gt_1_multipass_with_qmax) {
3230   for (size_t pooling_elements = 18; pooling_elements <= 33; pooling_elements += 3) {
3231     for (size_t channels = 2; channels < 10; channels++) {
3232       AvgPoolMicrokernelTester()
3233         .pooling_elements(pooling_elements)
3234         .pooling_tile(9, 8)
3235         .channels(channels)
3236         .qmax(128)
3237         .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3238     }
3239   }
3240 }
3241 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels)3242 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels) {
3243   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3244     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3245       for (size_t channels = 1; channels <= 5; channels += 1) {
3246         AvgPoolMicrokernelTester()
3247           .output_pixels(output_pixels)
3248           .pooling_elements(pooling_elements)
3249           .pooling_tile(9, 8)
3250           .channels(channels)
3251           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3252       }
3253     }
3254   }
3255 }
3256 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_input_offset)3257 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_input_offset) {
3258   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3259     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3260       for (size_t channels = 1; channels <= 5; channels += 1) {
3261         AvgPoolMicrokernelTester()
3262           .output_pixels(output_pixels)
3263           .pooling_elements(pooling_elements)
3264           .pooling_tile(9, 8)
3265           .channels(channels)
3266           .input_offset(7)
3267           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3268       }
3269     }
3270   }
3271 }
3272 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_zero)3273 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_zero) {
3274   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3275     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3276       for (size_t channels = 1; channels <= 5; channels += 1) {
3277         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
3278           AvgPoolMicrokernelTester()
3279             .output_pixels(output_pixels)
3280             .pooling_elements(pooling_elements)
3281             .pooling_tile(9, 8)
3282             .channels(channels)
3283             .input_offset(7)
3284             .zero_index(zero_index)
3285             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3286         }
3287       }
3288     }
3289   }
3290 }
3291 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_input_scale)3292 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_input_scale) {
3293   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3294     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3295       for (size_t channels = 1; channels <= 5; channels += 1) {
3296         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3297           AvgPoolMicrokernelTester()
3298             .output_pixels(output_pixels)
3299             .pooling_elements(pooling_elements)
3300             .pooling_tile(9, 8)
3301             .channels(channels)
3302             .input_scale(scale)
3303             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3304         }
3305       }
3306     }
3307   }
3308 }
3309 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_input_zero_point)3310 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_input_zero_point) {
3311   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3312     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3313       for (size_t channels = 1; channels <= 5; channels += 1) {
3314         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3315           AvgPoolMicrokernelTester()
3316             .output_pixels(output_pixels)
3317             .pooling_elements(pooling_elements)
3318             .pooling_tile(9, 8)
3319             .channels(channels)
3320             .input_zero_point(zero_point)
3321             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3322         }
3323       }
3324     }
3325   }
3326 }
3327 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_output_scale)3328 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_output_scale) {
3329   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3330     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3331       for (size_t channels = 1; channels <= 5; channels += 1) {
3332         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3333           AvgPoolMicrokernelTester()
3334             .output_pixels(output_pixels)
3335             .pooling_elements(pooling_elements)
3336             .pooling_tile(9, 8)
3337             .channels(channels)
3338             .output_scale(scale)
3339             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3340         }
3341       }
3342     }
3343   }
3344 }
3345 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_output_zero_point)3346 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_output_zero_point) {
3347   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3348     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3349       for (size_t channels = 1; channels <= 5; channels += 1) {
3350         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3351           AvgPoolMicrokernelTester()
3352             .output_pixels(output_pixels)
3353             .pooling_elements(pooling_elements)
3354             .pooling_tile(9, 8)
3355             .channels(channels)
3356             .output_zero_point(zero_point)
3357             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3358         }
3359       }
3360     }
3361   }
3362 }
3363 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_qmin)3364 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_qmin) {
3365   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3366     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3367       for (size_t channels = 1; channels <= 5; channels += 1) {
3368         AvgPoolMicrokernelTester()
3369           .output_pixels(output_pixels)
3370           .pooling_elements(pooling_elements)
3371           .pooling_tile(9, 8)
3372           .channels(channels)
3373           .qmin(128)
3374           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3375       }
3376     }
3377   }
3378 }
3379 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_qmax)3380 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_qmax) {
3381   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3382     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3383       for (size_t channels = 1; channels <= 5; channels += 1) {
3384         AvgPoolMicrokernelTester()
3385           .output_pixels(output_pixels)
3386           .pooling_elements(pooling_elements)
3387           .pooling_tile(9, 8)
3388           .channels(channels)
3389           .qmax(128)
3390           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3391       }
3392     }
3393   }
3394 }
3395 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_output_stride)3396 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_output_stride) {
3397   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3398     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3399       for (size_t channels = 1; channels <= 5; channels += 1) {
3400         AvgPoolMicrokernelTester()
3401           .output_pixels(output_pixels)
3402           .pooling_elements(pooling_elements)
3403           .pooling_tile(9, 8)
3404           .channels(channels)
3405           .output_stride(7)
3406           .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3407       }
3408     }
3409   }
3410 }
3411 
TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1,few_output_pixels_with_step)3412 TEST(QU8_AVGPOOL_MINMAX_9P8X__SCALAR_C1, few_output_pixels_with_step) {
3413   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
3414     for (size_t pooling_elements : std::vector<size_t>{{10, 16, 18}}) {
3415       for (size_t channels = 1; channels <= 5; channels += 1) {
3416         for (size_t step = 2; step <= pooling_elements; step++) {
3417           AvgPoolMicrokernelTester()
3418             .output_pixels(output_pixels)
3419             .pooling_elements(pooling_elements)
3420             .pooling_tile(9, 8)
3421             .step(step)
3422             .channels(channels)
3423             .output_stride(7)
3424             .Test(xnn_qu8_avgpool_minmax_ukernel_9p8x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
3425         }
3426       }
3427     }
3428   }
3429 }
3430 
3431 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_fulltile)3432   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_fulltile) {
3433     TEST_REQUIRES_ARM_NEON;
3434     AvgPoolMicrokernelTester()
3435       .pooling_elements(9)
3436       .pooling_tile(9)
3437       .channels(8)
3438       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3439   }
3440 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_fulltile_with_input_offset)3441   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_fulltile_with_input_offset) {
3442     TEST_REQUIRES_ARM_NEON;
3443     AvgPoolMicrokernelTester()
3444       .pooling_elements(9)
3445       .pooling_tile(9)
3446       .channels(8)
3447       .input_offset(11)
3448       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3449   }
3450 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_fulltile_with_zero)3451   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_fulltile_with_zero) {
3452     TEST_REQUIRES_ARM_NEON;
3453     for (size_t zero_index = 0; zero_index < 9; zero_index++) {
3454       AvgPoolMicrokernelTester()
3455         .pooling_elements(9)
3456         .pooling_tile(9)
3457         .channels(8)
3458         .input_offset(11)
3459         .zero_index(zero_index)
3460         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3461     }
3462   }
3463 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_fulltile_with_input_scale)3464   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_fulltile_with_input_scale) {
3465     TEST_REQUIRES_ARM_NEON;
3466     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3467       AvgPoolMicrokernelTester()
3468         .pooling_elements(9)
3469         .pooling_tile(9)
3470         .channels(8)
3471         .input_scale(scale)
3472         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3473     }
3474   }
3475 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_fulltile_with_input_zero_point)3476   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_fulltile_with_input_zero_point) {
3477     TEST_REQUIRES_ARM_NEON;
3478     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3479       AvgPoolMicrokernelTester()
3480         .pooling_elements(9)
3481         .pooling_tile(9)
3482         .channels(8)
3483         .input_zero_point(zero_point)
3484         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3485     }
3486   }
3487 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_fulltile_with_output_scale)3488   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_fulltile_with_output_scale) {
3489     TEST_REQUIRES_ARM_NEON;
3490     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3491       AvgPoolMicrokernelTester()
3492         .pooling_elements(9)
3493         .pooling_tile(9)
3494         .channels(8)
3495         .output_scale(scale)
3496         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3497     }
3498   }
3499 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_fulltile_with_output_zero_point)3500   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_fulltile_with_output_zero_point) {
3501     TEST_REQUIRES_ARM_NEON;
3502     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3503       AvgPoolMicrokernelTester()
3504         .pooling_elements(9)
3505         .pooling_tile(9)
3506         .channels(8)
3507         .output_zero_point(zero_point)
3508         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3509     }
3510   }
3511 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_fulltile_with_qmin)3512   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_fulltile_with_qmin) {
3513     TEST_REQUIRES_ARM_NEON;
3514     AvgPoolMicrokernelTester()
3515       .pooling_elements(9)
3516       .pooling_tile(9)
3517       .channels(8)
3518       .qmin(128)
3519       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3520   }
3521 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_fulltile_with_qmax)3522   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_fulltile_with_qmax) {
3523     TEST_REQUIRES_ARM_NEON;
3524     AvgPoolMicrokernelTester()
3525       .pooling_elements(9)
3526       .pooling_tile(9)
3527       .channels(8)
3528       .qmax(128)
3529       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3530   }
3531 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_subtile)3532   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_subtile) {
3533     TEST_REQUIRES_ARM_NEON;
3534     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
3535       AvgPoolMicrokernelTester()
3536         .pooling_elements(pooling_elements)
3537         .pooling_tile(9)
3538         .channels(8)
3539         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3540     }
3541   }
3542 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_subtile_with_input_offset)3543   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_subtile_with_input_offset) {
3544     TEST_REQUIRES_ARM_NEON;
3545     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
3546       AvgPoolMicrokernelTester()
3547         .pooling_elements(pooling_elements)
3548         .pooling_tile(9)
3549         .channels(8)
3550         .input_offset(11)
3551         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3552     }
3553   }
3554 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_eq_8_unipass_subtile_with_zero)3555   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_eq_8_unipass_subtile_with_zero) {
3556     TEST_REQUIRES_ARM_NEON;
3557     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
3558       for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
3559         AvgPoolMicrokernelTester()
3560           .pooling_elements(pooling_elements)
3561           .pooling_tile(9)
3562           .channels(8)
3563           .input_offset(11)
3564           .zero_index(zero_index)
3565           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3566       }
3567     }
3568   }
3569 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_fulltile)3570   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_fulltile) {
3571     TEST_REQUIRES_ARM_NEON;
3572     for (size_t channels = 16; channels < 64; channels += 8) {
3573       AvgPoolMicrokernelTester()
3574         .pooling_elements(9)
3575         .pooling_tile(9)
3576         .channels(channels)
3577         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3578     }
3579   }
3580 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_fulltile_with_input_offset)3581   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_fulltile_with_input_offset) {
3582     TEST_REQUIRES_ARM_NEON;
3583     for (size_t channels = 16; channels < 64; channels += 8) {
3584       AvgPoolMicrokernelTester()
3585         .pooling_elements(9)
3586         .pooling_tile(9)
3587         .channels(channels)
3588         .input_offset(67)
3589         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3590     }
3591   }
3592 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_fulltile_with_zero)3593   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_fulltile_with_zero) {
3594     TEST_REQUIRES_ARM_NEON;
3595     for (size_t channels = 16; channels < 64; channels += 8) {
3596       for (size_t zero_index = 0; zero_index < 9; zero_index++) {
3597         AvgPoolMicrokernelTester()
3598           .pooling_elements(9)
3599           .pooling_tile(9)
3600           .channels(channels)
3601           .input_offset(67)
3602           .zero_index(zero_index)
3603           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3604       }
3605     }
3606   }
3607 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_fulltile_with_input_scale)3608   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_fulltile_with_input_scale) {
3609     TEST_REQUIRES_ARM_NEON;
3610     for (size_t channels = 16; channels < 64; channels += 8) {
3611       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3612         AvgPoolMicrokernelTester()
3613           .pooling_elements(9)
3614           .pooling_tile(9)
3615           .channels(channels)
3616           .input_scale(scale)
3617           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3618       }
3619     }
3620   }
3621 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_fulltile_with_input_zero_point)3622   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_fulltile_with_input_zero_point) {
3623     TEST_REQUIRES_ARM_NEON;
3624     for (size_t channels = 16; channels < 64; channels += 8) {
3625       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3626         AvgPoolMicrokernelTester()
3627           .pooling_elements(9)
3628           .pooling_tile(9)
3629           .channels(channels)
3630           .input_zero_point(zero_point)
3631           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3632       }
3633     }
3634   }
3635 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_fulltile_with_output_scale)3636   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_fulltile_with_output_scale) {
3637     TEST_REQUIRES_ARM_NEON;
3638     for (size_t channels = 16; channels < 64; channels += 8) {
3639       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3640         AvgPoolMicrokernelTester()
3641           .pooling_elements(9)
3642           .pooling_tile(9)
3643           .channels(channels)
3644           .output_scale(scale)
3645           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3646       }
3647     }
3648   }
3649 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_fulltile_with_output_zero_point)3650   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_fulltile_with_output_zero_point) {
3651     TEST_REQUIRES_ARM_NEON;
3652     for (size_t channels = 16; channels < 64; channels += 8) {
3653       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3654         AvgPoolMicrokernelTester()
3655           .pooling_elements(9)
3656           .pooling_tile(9)
3657           .channels(channels)
3658           .output_zero_point(zero_point)
3659           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3660       }
3661     }
3662   }
3663 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_fulltile_with_qmin)3664   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_fulltile_with_qmin) {
3665     TEST_REQUIRES_ARM_NEON;
3666     for (size_t channels = 16; channels < 64; channels += 8) {
3667       AvgPoolMicrokernelTester()
3668         .pooling_elements(9)
3669         .pooling_tile(9)
3670         .channels(channels)
3671         .qmin(128)
3672         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3673     }
3674   }
3675 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_fulltile_with_qmax)3676   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_fulltile_with_qmax) {
3677     TEST_REQUIRES_ARM_NEON;
3678     for (size_t channels = 16; channels < 64; channels += 8) {
3679       AvgPoolMicrokernelTester()
3680         .pooling_elements(9)
3681         .pooling_tile(9)
3682         .channels(channels)
3683         .qmax(128)
3684         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3685     }
3686   }
3687 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_subtile)3688   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_subtile) {
3689     TEST_REQUIRES_ARM_NEON;
3690     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
3691       for (size_t channels = 16; channels < 64; channels += 8) {
3692         AvgPoolMicrokernelTester()
3693           .pooling_elements(pooling_elements)
3694           .pooling_tile(9)
3695           .channels(channels)
3696           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3697       }
3698     }
3699   }
3700 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_subtile_with_input_offset)3701   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_subtile_with_input_offset) {
3702     TEST_REQUIRES_ARM_NEON;
3703     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
3704       for (size_t channels = 16; channels < 64; channels += 8) {
3705         AvgPoolMicrokernelTester()
3706           .pooling_elements(pooling_elements)
3707           .pooling_tile(9)
3708           .channels(channels)
3709           .input_offset(67)
3710           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3711       }
3712     }
3713   }
3714 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_div_8_unipass_subtile_with_zero)3715   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_div_8_unipass_subtile_with_zero) {
3716     TEST_REQUIRES_ARM_NEON;
3717     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
3718       for (size_t channels = 16; channels < 64; channels += 8) {
3719         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
3720           AvgPoolMicrokernelTester()
3721             .pooling_elements(pooling_elements)
3722             .pooling_tile(9)
3723             .channels(channels)
3724             .input_offset(67)
3725             .zero_index(zero_index)
3726             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3727         }
3728       }
3729     }
3730   }
3731 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_fulltile)3732   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_fulltile) {
3733     TEST_REQUIRES_ARM_NEON;
3734     for (size_t channels = 1; channels < 8; channels++) {
3735       AvgPoolMicrokernelTester()
3736         .pooling_elements(9)
3737         .pooling_tile(9)
3738         .channels(channels)
3739         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3740     }
3741   }
3742 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_fulltile_with_input_offset)3743   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_fulltile_with_input_offset) {
3744     TEST_REQUIRES_ARM_NEON;
3745     for (size_t channels = 1; channels < 8; channels++) {
3746       AvgPoolMicrokernelTester()
3747         .pooling_elements(9)
3748         .pooling_tile(9)
3749         .channels(channels)
3750         .input_offset(11)
3751         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3752     }
3753   }
3754 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_fulltile_with_zero)3755   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_fulltile_with_zero) {
3756     TEST_REQUIRES_ARM_NEON;
3757     for (size_t channels = 1; channels < 8; channels++) {
3758       for (size_t zero_index = 0; zero_index < 9; zero_index++) {
3759         AvgPoolMicrokernelTester()
3760           .pooling_elements(9)
3761           .pooling_tile(9)
3762           .channels(channels)
3763           .input_offset(11)
3764           .zero_index(zero_index)
3765           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3766       }
3767     }
3768   }
3769 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_fulltile_with_input_scale)3770   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_fulltile_with_input_scale) {
3771     TEST_REQUIRES_ARM_NEON;
3772     for (size_t channels = 1; channels < 8; channels++) {
3773       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3774         AvgPoolMicrokernelTester()
3775           .pooling_elements(9)
3776           .pooling_tile(9)
3777           .channels(channels)
3778           .input_scale(scale)
3779           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3780       }
3781     }
3782   }
3783 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_fulltile_with_input_zero_point)3784   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_fulltile_with_input_zero_point) {
3785     TEST_REQUIRES_ARM_NEON;
3786     for (size_t channels = 1; channels < 8; channels++) {
3787       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3788         AvgPoolMicrokernelTester()
3789           .pooling_elements(9)
3790           .pooling_tile(9)
3791           .channels(channels)
3792           .input_zero_point(zero_point)
3793           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3794       }
3795     }
3796   }
3797 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_fulltile_with_output_scale)3798   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_fulltile_with_output_scale) {
3799     TEST_REQUIRES_ARM_NEON;
3800     for (size_t channels = 1; channels < 8; channels++) {
3801       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3802         AvgPoolMicrokernelTester()
3803           .pooling_elements(9)
3804           .pooling_tile(9)
3805           .channels(channels)
3806           .output_scale(scale)
3807           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3808       }
3809     }
3810   }
3811 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_fulltile_with_output_zero_point)3812   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_fulltile_with_output_zero_point) {
3813     TEST_REQUIRES_ARM_NEON;
3814     for (size_t channels = 1; channels < 8; channels++) {
3815       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3816         AvgPoolMicrokernelTester()
3817           .pooling_elements(9)
3818           .pooling_tile(9)
3819           .channels(channels)
3820           .output_zero_point(zero_point)
3821           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3822       }
3823     }
3824   }
3825 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_fulltile_with_qmin)3826   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_fulltile_with_qmin) {
3827     TEST_REQUIRES_ARM_NEON;
3828     for (size_t channels = 1; channels < 8; channels++) {
3829       AvgPoolMicrokernelTester()
3830         .pooling_elements(9)
3831         .pooling_tile(9)
3832         .channels(channels)
3833         .qmin(128)
3834         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3835     }
3836   }
3837 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_fulltile_with_qmax)3838   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_fulltile_with_qmax) {
3839     TEST_REQUIRES_ARM_NEON;
3840     for (size_t channels = 1; channels < 8; channels++) {
3841       AvgPoolMicrokernelTester()
3842         .pooling_elements(9)
3843         .pooling_tile(9)
3844         .channels(channels)
3845         .qmax(128)
3846         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3847     }
3848   }
3849 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_subtile)3850   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_subtile) {
3851     TEST_REQUIRES_ARM_NEON;
3852     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
3853       for (size_t channels = 1; channels < 8; channels++) {
3854         AvgPoolMicrokernelTester()
3855           .pooling_elements(pooling_elements)
3856           .pooling_tile(9)
3857           .channels(channels)
3858           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3859       }
3860     }
3861   }
3862 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_subtile_with_input_offset)3863   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_subtile_with_input_offset) {
3864     TEST_REQUIRES_ARM_NEON;
3865     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
3866       for (size_t channels = 1; channels < 8; channels++) {
3867         AvgPoolMicrokernelTester()
3868           .pooling_elements(pooling_elements)
3869           .pooling_tile(9)
3870           .channels(channels)
3871           .input_offset(11)
3872           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3873       }
3874     }
3875   }
3876 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_lt_8_unipass_subtile_with_zero)3877   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_lt_8_unipass_subtile_with_zero) {
3878     TEST_REQUIRES_ARM_NEON;
3879     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
3880       for (size_t channels = 1; channels < 8; channels++) {
3881         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
3882           AvgPoolMicrokernelTester()
3883             .pooling_elements(pooling_elements)
3884             .pooling_tile(9)
3885             .channels(channels)
3886             .input_offset(11)
3887             .zero_index(zero_index)
3888             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3889         }
3890       }
3891     }
3892   }
3893 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_fulltile)3894   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_fulltile) {
3895     TEST_REQUIRES_ARM_NEON;
3896     for (size_t channels = 9; channels < 16; channels++) {
3897       AvgPoolMicrokernelTester()
3898         .pooling_elements(9)
3899         .pooling_tile(9)
3900         .channels(channels)
3901         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3902     }
3903   }
3904 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_fulltile_with_input_offset)3905   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_fulltile_with_input_offset) {
3906     TEST_REQUIRES_ARM_NEON;
3907     for (size_t channels = 9; channels < 16; channels++) {
3908       AvgPoolMicrokernelTester()
3909         .pooling_elements(9)
3910         .pooling_tile(9)
3911         .channels(channels)
3912         .input_offset(17)
3913         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3914     }
3915   }
3916 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_fulltile_with_zero)3917   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_fulltile_with_zero) {
3918     TEST_REQUIRES_ARM_NEON;
3919     for (size_t channels = 9; channels < 16; channels++) {
3920       for (size_t zero_index = 0; zero_index < 9; zero_index++) {
3921         AvgPoolMicrokernelTester()
3922           .pooling_elements(9)
3923           .pooling_tile(9)
3924           .channels(channels)
3925           .input_offset(17)
3926           .zero_index(zero_index)
3927           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3928       }
3929     }
3930   }
3931 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_fulltile_with_input_scale)3932   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_fulltile_with_input_scale) {
3933     TEST_REQUIRES_ARM_NEON;
3934     for (size_t channels = 9; channels < 16; channels++) {
3935       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3936         AvgPoolMicrokernelTester()
3937           .pooling_elements(9)
3938           .pooling_tile(9)
3939           .channels(channels)
3940           .input_scale(scale)
3941           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3942       }
3943     }
3944   }
3945 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_fulltile_with_input_zero_point)3946   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_fulltile_with_input_zero_point) {
3947     TEST_REQUIRES_ARM_NEON;
3948     for (size_t channels = 9; channels < 16; channels++) {
3949       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3950         AvgPoolMicrokernelTester()
3951           .pooling_elements(9)
3952           .pooling_tile(9)
3953           .channels(channels)
3954           .input_zero_point(zero_point)
3955           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3956       }
3957     }
3958   }
3959 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_fulltile_with_output_scale)3960   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_fulltile_with_output_scale) {
3961     TEST_REQUIRES_ARM_NEON;
3962     for (size_t channels = 9; channels < 16; channels++) {
3963       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
3964         AvgPoolMicrokernelTester()
3965           .pooling_elements(9)
3966           .pooling_tile(9)
3967           .channels(channels)
3968           .output_scale(scale)
3969           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3970       }
3971     }
3972   }
3973 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_fulltile_with_output_zero_point)3974   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_fulltile_with_output_zero_point) {
3975     TEST_REQUIRES_ARM_NEON;
3976     for (size_t channels = 9; channels < 16; channels++) {
3977       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
3978         AvgPoolMicrokernelTester()
3979           .pooling_elements(9)
3980           .pooling_tile(9)
3981           .channels(channels)
3982           .output_zero_point(zero_point)
3983           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3984       }
3985     }
3986   }
3987 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_fulltile_with_qmin)3988   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_fulltile_with_qmin) {
3989     TEST_REQUIRES_ARM_NEON;
3990     for (size_t channels = 9; channels < 16; channels++) {
3991       AvgPoolMicrokernelTester()
3992         .pooling_elements(9)
3993         .pooling_tile(9)
3994         .channels(channels)
3995         .qmin(128)
3996         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
3997     }
3998   }
3999 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_fulltile_with_qmax)4000   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_fulltile_with_qmax) {
4001     TEST_REQUIRES_ARM_NEON;
4002     for (size_t channels = 9; channels < 16; channels++) {
4003       AvgPoolMicrokernelTester()
4004         .pooling_elements(9)
4005         .pooling_tile(9)
4006         .channels(channels)
4007         .qmax(128)
4008         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4009     }
4010   }
4011 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_subtile)4012   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_subtile) {
4013     TEST_REQUIRES_ARM_NEON;
4014     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4015       for (size_t channels = 9; channels < 16; channels++) {
4016         AvgPoolMicrokernelTester()
4017           .pooling_elements(pooling_elements)
4018           .pooling_tile(9)
4019           .channels(channels)
4020           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4021       }
4022     }
4023   }
4024 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_subtile_with_input_offset)4025   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_subtile_with_input_offset) {
4026     TEST_REQUIRES_ARM_NEON;
4027     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4028       for (size_t channels = 9; channels < 16; channels++) {
4029         AvgPoolMicrokernelTester()
4030           .pooling_elements(pooling_elements)
4031           .pooling_tile(9)
4032           .channels(channels)
4033           .input_offset(17)
4034           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4035       }
4036     }
4037   }
4038 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,channels_gt_8_unipass_subtile_with_zero)4039   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, channels_gt_8_unipass_subtile_with_zero) {
4040     TEST_REQUIRES_ARM_NEON;
4041     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4042       for (size_t channels = 9; channels < 16; channels++) {
4043         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
4044           AvgPoolMicrokernelTester()
4045             .pooling_elements(pooling_elements)
4046             .pooling_tile(9)
4047             .channels(channels)
4048             .input_offset(17)
4049             .zero_index(zero_index)
4050             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4051         }
4052       }
4053     }
4054   }
4055 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels)4056   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels) {
4057     TEST_REQUIRES_ARM_NEON;
4058     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4059       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4060         for (size_t channels = 1; channels <= 40; channels += 7) {
4061           AvgPoolMicrokernelTester()
4062             .output_pixels(output_pixels)
4063             .pooling_elements(pooling_elements)
4064             .pooling_tile(9, 0)
4065             .channels(channels)
4066             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4067         }
4068       }
4069     }
4070   }
4071 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_input_offset)4072   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_input_offset) {
4073     TEST_REQUIRES_ARM_NEON;
4074     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4075       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4076         for (size_t channels = 1; channels <= 40; channels += 7) {
4077           AvgPoolMicrokernelTester()
4078             .output_pixels(output_pixels)
4079             .pooling_elements(pooling_elements)
4080             .pooling_tile(9, 0)
4081             .channels(channels)
4082             .input_offset(43)
4083             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4084         }
4085       }
4086     }
4087   }
4088 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_zero)4089   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_zero) {
4090     TEST_REQUIRES_ARM_NEON;
4091     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4092       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4093         for (size_t channels = 1; channels <= 40; channels += 7) {
4094           for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
4095             AvgPoolMicrokernelTester()
4096               .output_pixels(output_pixels)
4097               .pooling_elements(pooling_elements)
4098               .pooling_tile(9, 0)
4099               .channels(channels)
4100               .input_offset(43)
4101               .zero_index(zero_index)
4102               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4103           }
4104         }
4105       }
4106     }
4107   }
4108 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_input_scale)4109   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_input_scale) {
4110     TEST_REQUIRES_ARM_NEON;
4111     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4112       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4113         for (size_t channels = 1; channels <= 40; channels += 7) {
4114           for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4115             AvgPoolMicrokernelTester()
4116               .output_pixels(output_pixels)
4117               .pooling_elements(pooling_elements)
4118               .pooling_tile(9)
4119               .channels(channels)
4120               .input_scale(scale)
4121               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4122           }
4123         }
4124       }
4125     }
4126   }
4127 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_input_zero_point)4128   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_input_zero_point) {
4129     TEST_REQUIRES_ARM_NEON;
4130     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4131       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4132         for (size_t channels = 1; channels <= 40; channels += 7) {
4133           for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4134             AvgPoolMicrokernelTester()
4135               .output_pixels(output_pixels)
4136               .pooling_elements(pooling_elements)
4137               .pooling_tile(9)
4138               .channels(channels)
4139               .input_zero_point(zero_point)
4140               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4141           }
4142         }
4143       }
4144     }
4145   }
4146 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_output_scale)4147   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_output_scale) {
4148     TEST_REQUIRES_ARM_NEON;
4149     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4150       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4151         for (size_t channels = 1; channels <= 40; channels += 7) {
4152           for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4153             AvgPoolMicrokernelTester()
4154               .output_pixels(output_pixels)
4155               .pooling_elements(pooling_elements)
4156               .pooling_tile(9)
4157               .channels(channels)
4158               .output_scale(scale)
4159               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4160           }
4161         }
4162       }
4163     }
4164   }
4165 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_output_zero_point)4166   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_output_zero_point) {
4167     TEST_REQUIRES_ARM_NEON;
4168     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4169       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4170         for (size_t channels = 1; channels <= 40; channels += 7) {
4171           for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4172             AvgPoolMicrokernelTester()
4173               .output_pixels(output_pixels)
4174               .pooling_elements(pooling_elements)
4175               .pooling_tile(9)
4176               .channels(channels)
4177               .output_zero_point(zero_point)
4178               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4179           }
4180         }
4181       }
4182     }
4183   }
4184 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_qmin)4185   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_qmin) {
4186     TEST_REQUIRES_ARM_NEON;
4187     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4188       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4189         for (size_t channels = 1; channels <= 40; channels += 7) {
4190           AvgPoolMicrokernelTester()
4191             .output_pixels(output_pixels)
4192             .pooling_elements(pooling_elements)
4193             .pooling_tile(9, 0)
4194             .channels(channels)
4195             .qmin(128)
4196             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4197         }
4198       }
4199     }
4200   }
4201 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_qmax)4202   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_qmax) {
4203     TEST_REQUIRES_ARM_NEON;
4204     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4205       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4206         for (size_t channels = 1; channels <= 40; channels += 7) {
4207           AvgPoolMicrokernelTester()
4208             .output_pixels(output_pixels)
4209             .pooling_elements(pooling_elements)
4210             .pooling_tile(9, 0)
4211             .channels(channels)
4212             .qmax(128)
4213             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4214         }
4215       }
4216     }
4217   }
4218 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_output_stride)4219   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_output_stride) {
4220     TEST_REQUIRES_ARM_NEON;
4221     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4222       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4223         for (size_t channels = 1; channels <= 40; channels += 7) {
4224           AvgPoolMicrokernelTester()
4225             .output_pixels(output_pixels)
4226             .pooling_elements(pooling_elements)
4227             .pooling_tile(9, 0)
4228             .channels(channels)
4229             .output_stride(43)
4230             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4231         }
4232       }
4233     }
4234   }
4235 
TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8,few_output_pixels_with_step)4236   TEST(QU8_AVGPOOL_MINMAX_9X__NEON_C8, few_output_pixels_with_step) {
4237     TEST_REQUIRES_ARM_NEON;
4238     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4239       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4240         for (size_t channels = 1; channels <= 40; channels += 7) {
4241           for (size_t step = 2; step <= pooling_elements; step++) {
4242             AvgPoolMicrokernelTester()
4243               .output_pixels(output_pixels)
4244               .pooling_elements(pooling_elements)
4245               .pooling_tile(9, 0)
4246               .step(step)
4247               .channels(channels)
4248               .output_stride(43)
4249               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__neon_c8);
4250           }
4251         }
4252       }
4253     }
4254   }
4255 #endif  // XNN_ARCH_ARM || XNN_ARCH_ARM64
4256 
4257 
4258 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_fulltile)4259   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_fulltile) {
4260     TEST_REQUIRES_X86_SSE2;
4261     AvgPoolMicrokernelTester()
4262       .pooling_elements(9)
4263       .pooling_tile(9)
4264       .channels(8)
4265       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4266   }
4267 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_fulltile_with_input_offset)4268   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_fulltile_with_input_offset) {
4269     TEST_REQUIRES_X86_SSE2;
4270     AvgPoolMicrokernelTester()
4271       .pooling_elements(9)
4272       .pooling_tile(9)
4273       .channels(8)
4274       .input_offset(11)
4275       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4276   }
4277 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_fulltile_with_zero)4278   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_fulltile_with_zero) {
4279     TEST_REQUIRES_X86_SSE2;
4280     for (size_t zero_index = 0; zero_index < 9; zero_index++) {
4281       AvgPoolMicrokernelTester()
4282         .pooling_elements(9)
4283         .pooling_tile(9)
4284         .channels(8)
4285         .input_offset(11)
4286         .zero_index(zero_index)
4287         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4288     }
4289   }
4290 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_fulltile_with_input_scale)4291   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_fulltile_with_input_scale) {
4292     TEST_REQUIRES_X86_SSE2;
4293     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4294       AvgPoolMicrokernelTester()
4295         .pooling_elements(9)
4296         .pooling_tile(9)
4297         .channels(8)
4298         .input_scale(scale)
4299         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4300     }
4301   }
4302 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_fulltile_with_input_zero_point)4303   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_fulltile_with_input_zero_point) {
4304     TEST_REQUIRES_X86_SSE2;
4305     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4306       AvgPoolMicrokernelTester()
4307         .pooling_elements(9)
4308         .pooling_tile(9)
4309         .channels(8)
4310         .input_zero_point(zero_point)
4311         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4312     }
4313   }
4314 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_fulltile_with_output_scale)4315   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_fulltile_with_output_scale) {
4316     TEST_REQUIRES_X86_SSE2;
4317     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4318       AvgPoolMicrokernelTester()
4319         .pooling_elements(9)
4320         .pooling_tile(9)
4321         .channels(8)
4322         .output_scale(scale)
4323         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4324     }
4325   }
4326 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_fulltile_with_output_zero_point)4327   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_fulltile_with_output_zero_point) {
4328     TEST_REQUIRES_X86_SSE2;
4329     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4330       AvgPoolMicrokernelTester()
4331         .pooling_elements(9)
4332         .pooling_tile(9)
4333         .channels(8)
4334         .output_zero_point(zero_point)
4335         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4336     }
4337   }
4338 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_fulltile_with_qmin)4339   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_fulltile_with_qmin) {
4340     TEST_REQUIRES_X86_SSE2;
4341     AvgPoolMicrokernelTester()
4342       .pooling_elements(9)
4343       .pooling_tile(9)
4344       .channels(8)
4345       .qmin(128)
4346       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4347   }
4348 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_fulltile_with_qmax)4349   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_fulltile_with_qmax) {
4350     TEST_REQUIRES_X86_SSE2;
4351     AvgPoolMicrokernelTester()
4352       .pooling_elements(9)
4353       .pooling_tile(9)
4354       .channels(8)
4355       .qmax(128)
4356       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4357   }
4358 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_subtile)4359   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_subtile) {
4360     TEST_REQUIRES_X86_SSE2;
4361     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4362       AvgPoolMicrokernelTester()
4363         .pooling_elements(pooling_elements)
4364         .pooling_tile(9)
4365         .channels(8)
4366         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4367     }
4368   }
4369 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_subtile_with_input_offset)4370   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_subtile_with_input_offset) {
4371     TEST_REQUIRES_X86_SSE2;
4372     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4373       AvgPoolMicrokernelTester()
4374         .pooling_elements(pooling_elements)
4375         .pooling_tile(9)
4376         .channels(8)
4377         .input_offset(11)
4378         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4379     }
4380   }
4381 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_eq_8_unipass_subtile_with_zero)4382   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_eq_8_unipass_subtile_with_zero) {
4383     TEST_REQUIRES_X86_SSE2;
4384     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4385       for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
4386         AvgPoolMicrokernelTester()
4387           .pooling_elements(pooling_elements)
4388           .pooling_tile(9)
4389           .channels(8)
4390           .input_offset(11)
4391           .zero_index(zero_index)
4392           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4393       }
4394     }
4395   }
4396 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_fulltile)4397   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_fulltile) {
4398     TEST_REQUIRES_X86_SSE2;
4399     for (size_t channels = 16; channels < 64; channels += 8) {
4400       AvgPoolMicrokernelTester()
4401         .pooling_elements(9)
4402         .pooling_tile(9)
4403         .channels(channels)
4404         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4405     }
4406   }
4407 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_fulltile_with_input_offset)4408   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_fulltile_with_input_offset) {
4409     TEST_REQUIRES_X86_SSE2;
4410     for (size_t channels = 16; channels < 64; channels += 8) {
4411       AvgPoolMicrokernelTester()
4412         .pooling_elements(9)
4413         .pooling_tile(9)
4414         .channels(channels)
4415         .input_offset(67)
4416         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4417     }
4418   }
4419 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_fulltile_with_zero)4420   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_fulltile_with_zero) {
4421     TEST_REQUIRES_X86_SSE2;
4422     for (size_t channels = 16; channels < 64; channels += 8) {
4423       for (size_t zero_index = 0; zero_index < 9; zero_index++) {
4424         AvgPoolMicrokernelTester()
4425           .pooling_elements(9)
4426           .pooling_tile(9)
4427           .channels(channels)
4428           .input_offset(67)
4429           .zero_index(zero_index)
4430           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4431       }
4432     }
4433   }
4434 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_fulltile_with_input_scale)4435   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_fulltile_with_input_scale) {
4436     TEST_REQUIRES_X86_SSE2;
4437     for (size_t channels = 16; channels < 64; channels += 8) {
4438       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4439         AvgPoolMicrokernelTester()
4440           .pooling_elements(9)
4441           .pooling_tile(9)
4442           .channels(channels)
4443           .input_scale(scale)
4444           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4445       }
4446     }
4447   }
4448 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_fulltile_with_input_zero_point)4449   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_fulltile_with_input_zero_point) {
4450     TEST_REQUIRES_X86_SSE2;
4451     for (size_t channels = 16; channels < 64; channels += 8) {
4452       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4453         AvgPoolMicrokernelTester()
4454           .pooling_elements(9)
4455           .pooling_tile(9)
4456           .channels(channels)
4457           .input_zero_point(zero_point)
4458           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4459       }
4460     }
4461   }
4462 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_fulltile_with_output_scale)4463   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_fulltile_with_output_scale) {
4464     TEST_REQUIRES_X86_SSE2;
4465     for (size_t channels = 16; channels < 64; channels += 8) {
4466       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4467         AvgPoolMicrokernelTester()
4468           .pooling_elements(9)
4469           .pooling_tile(9)
4470           .channels(channels)
4471           .output_scale(scale)
4472           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4473       }
4474     }
4475   }
4476 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_fulltile_with_output_zero_point)4477   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_fulltile_with_output_zero_point) {
4478     TEST_REQUIRES_X86_SSE2;
4479     for (size_t channels = 16; channels < 64; channels += 8) {
4480       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4481         AvgPoolMicrokernelTester()
4482           .pooling_elements(9)
4483           .pooling_tile(9)
4484           .channels(channels)
4485           .output_zero_point(zero_point)
4486           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4487       }
4488     }
4489   }
4490 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_fulltile_with_qmin)4491   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_fulltile_with_qmin) {
4492     TEST_REQUIRES_X86_SSE2;
4493     for (size_t channels = 16; channels < 64; channels += 8) {
4494       AvgPoolMicrokernelTester()
4495         .pooling_elements(9)
4496         .pooling_tile(9)
4497         .channels(channels)
4498         .qmin(128)
4499         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4500     }
4501   }
4502 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_fulltile_with_qmax)4503   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_fulltile_with_qmax) {
4504     TEST_REQUIRES_X86_SSE2;
4505     for (size_t channels = 16; channels < 64; channels += 8) {
4506       AvgPoolMicrokernelTester()
4507         .pooling_elements(9)
4508         .pooling_tile(9)
4509         .channels(channels)
4510         .qmax(128)
4511         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4512     }
4513   }
4514 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_subtile)4515   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_subtile) {
4516     TEST_REQUIRES_X86_SSE2;
4517     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4518       for (size_t channels = 16; channels < 64; channels += 8) {
4519         AvgPoolMicrokernelTester()
4520           .pooling_elements(pooling_elements)
4521           .pooling_tile(9)
4522           .channels(channels)
4523           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4524       }
4525     }
4526   }
4527 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_subtile_with_input_offset)4528   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_subtile_with_input_offset) {
4529     TEST_REQUIRES_X86_SSE2;
4530     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4531       for (size_t channels = 16; channels < 64; channels += 8) {
4532         AvgPoolMicrokernelTester()
4533           .pooling_elements(pooling_elements)
4534           .pooling_tile(9)
4535           .channels(channels)
4536           .input_offset(67)
4537           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4538       }
4539     }
4540   }
4541 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_div_8_unipass_subtile_with_zero)4542   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_div_8_unipass_subtile_with_zero) {
4543     TEST_REQUIRES_X86_SSE2;
4544     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4545       for (size_t channels = 16; channels < 64; channels += 8) {
4546         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
4547           AvgPoolMicrokernelTester()
4548             .pooling_elements(pooling_elements)
4549             .pooling_tile(9)
4550             .channels(channels)
4551             .input_offset(67)
4552             .zero_index(zero_index)
4553             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4554         }
4555       }
4556     }
4557   }
4558 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_fulltile)4559   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_fulltile) {
4560     TEST_REQUIRES_X86_SSE2;
4561     for (size_t channels = 1; channels < 8; channels++) {
4562       AvgPoolMicrokernelTester()
4563         .pooling_elements(9)
4564         .pooling_tile(9)
4565         .channels(channels)
4566         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4567     }
4568   }
4569 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_fulltile_with_input_offset)4570   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_fulltile_with_input_offset) {
4571     TEST_REQUIRES_X86_SSE2;
4572     for (size_t channels = 1; channels < 8; channels++) {
4573       AvgPoolMicrokernelTester()
4574         .pooling_elements(9)
4575         .pooling_tile(9)
4576         .channels(channels)
4577         .input_offset(11)
4578         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4579     }
4580   }
4581 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_fulltile_with_zero)4582   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_fulltile_with_zero) {
4583     TEST_REQUIRES_X86_SSE2;
4584     for (size_t channels = 1; channels < 8; channels++) {
4585       for (size_t zero_index = 0; zero_index < 9; zero_index++) {
4586         AvgPoolMicrokernelTester()
4587           .pooling_elements(9)
4588           .pooling_tile(9)
4589           .channels(channels)
4590           .input_offset(11)
4591           .zero_index(zero_index)
4592           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4593       }
4594     }
4595   }
4596 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_fulltile_with_input_scale)4597   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_fulltile_with_input_scale) {
4598     TEST_REQUIRES_X86_SSE2;
4599     for (size_t channels = 1; channels < 8; channels++) {
4600       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4601         AvgPoolMicrokernelTester()
4602           .pooling_elements(9)
4603           .pooling_tile(9)
4604           .channels(channels)
4605           .input_scale(scale)
4606           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4607       }
4608     }
4609   }
4610 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_fulltile_with_input_zero_point)4611   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_fulltile_with_input_zero_point) {
4612     TEST_REQUIRES_X86_SSE2;
4613     for (size_t channels = 1; channels < 8; channels++) {
4614       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4615         AvgPoolMicrokernelTester()
4616           .pooling_elements(9)
4617           .pooling_tile(9)
4618           .channels(channels)
4619           .input_zero_point(zero_point)
4620           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4621       }
4622     }
4623   }
4624 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_fulltile_with_output_scale)4625   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_fulltile_with_output_scale) {
4626     TEST_REQUIRES_X86_SSE2;
4627     for (size_t channels = 1; channels < 8; channels++) {
4628       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4629         AvgPoolMicrokernelTester()
4630           .pooling_elements(9)
4631           .pooling_tile(9)
4632           .channels(channels)
4633           .output_scale(scale)
4634           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4635       }
4636     }
4637   }
4638 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_fulltile_with_output_zero_point)4639   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_fulltile_with_output_zero_point) {
4640     TEST_REQUIRES_X86_SSE2;
4641     for (size_t channels = 1; channels < 8; channels++) {
4642       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4643         AvgPoolMicrokernelTester()
4644           .pooling_elements(9)
4645           .pooling_tile(9)
4646           .channels(channels)
4647           .output_zero_point(zero_point)
4648           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4649       }
4650     }
4651   }
4652 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_fulltile_with_qmin)4653   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_fulltile_with_qmin) {
4654     TEST_REQUIRES_X86_SSE2;
4655     for (size_t channels = 1; channels < 8; channels++) {
4656       AvgPoolMicrokernelTester()
4657         .pooling_elements(9)
4658         .pooling_tile(9)
4659         .channels(channels)
4660         .qmin(128)
4661         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4662     }
4663   }
4664 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_fulltile_with_qmax)4665   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_fulltile_with_qmax) {
4666     TEST_REQUIRES_X86_SSE2;
4667     for (size_t channels = 1; channels < 8; channels++) {
4668       AvgPoolMicrokernelTester()
4669         .pooling_elements(9)
4670         .pooling_tile(9)
4671         .channels(channels)
4672         .qmax(128)
4673         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4674     }
4675   }
4676 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_subtile)4677   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_subtile) {
4678     TEST_REQUIRES_X86_SSE2;
4679     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4680       for (size_t channels = 1; channels < 8; channels++) {
4681         AvgPoolMicrokernelTester()
4682           .pooling_elements(pooling_elements)
4683           .pooling_tile(9)
4684           .channels(channels)
4685           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4686       }
4687     }
4688   }
4689 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_subtile_with_input_offset)4690   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_subtile_with_input_offset) {
4691     TEST_REQUIRES_X86_SSE2;
4692     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4693       for (size_t channels = 1; channels < 8; channels++) {
4694         AvgPoolMicrokernelTester()
4695           .pooling_elements(pooling_elements)
4696           .pooling_tile(9)
4697           .channels(channels)
4698           .input_offset(11)
4699           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4700       }
4701     }
4702   }
4703 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_lt_8_unipass_subtile_with_zero)4704   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_lt_8_unipass_subtile_with_zero) {
4705     TEST_REQUIRES_X86_SSE2;
4706     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4707       for (size_t channels = 1; channels < 8; channels++) {
4708         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
4709           AvgPoolMicrokernelTester()
4710             .pooling_elements(pooling_elements)
4711             .pooling_tile(9)
4712             .channels(channels)
4713             .input_offset(11)
4714             .zero_index(zero_index)
4715             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4716         }
4717       }
4718     }
4719   }
4720 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_fulltile)4721   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_fulltile) {
4722     TEST_REQUIRES_X86_SSE2;
4723     for (size_t channels = 9; channels < 16; channels++) {
4724       AvgPoolMicrokernelTester()
4725         .pooling_elements(9)
4726         .pooling_tile(9)
4727         .channels(channels)
4728         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4729     }
4730   }
4731 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_fulltile_with_input_offset)4732   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_fulltile_with_input_offset) {
4733     TEST_REQUIRES_X86_SSE2;
4734     for (size_t channels = 9; channels < 16; channels++) {
4735       AvgPoolMicrokernelTester()
4736         .pooling_elements(9)
4737         .pooling_tile(9)
4738         .channels(channels)
4739         .input_offset(17)
4740         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4741     }
4742   }
4743 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_fulltile_with_zero)4744   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_fulltile_with_zero) {
4745     TEST_REQUIRES_X86_SSE2;
4746     for (size_t channels = 9; channels < 16; channels++) {
4747       for (size_t zero_index = 0; zero_index < 9; zero_index++) {
4748         AvgPoolMicrokernelTester()
4749           .pooling_elements(9)
4750           .pooling_tile(9)
4751           .channels(channels)
4752           .input_offset(17)
4753           .zero_index(zero_index)
4754           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4755       }
4756     }
4757   }
4758 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_fulltile_with_input_scale)4759   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_fulltile_with_input_scale) {
4760     TEST_REQUIRES_X86_SSE2;
4761     for (size_t channels = 9; channels < 16; channels++) {
4762       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4763         AvgPoolMicrokernelTester()
4764           .pooling_elements(9)
4765           .pooling_tile(9)
4766           .channels(channels)
4767           .input_scale(scale)
4768           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4769       }
4770     }
4771   }
4772 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_fulltile_with_input_zero_point)4773   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_fulltile_with_input_zero_point) {
4774     TEST_REQUIRES_X86_SSE2;
4775     for (size_t channels = 9; channels < 16; channels++) {
4776       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4777         AvgPoolMicrokernelTester()
4778           .pooling_elements(9)
4779           .pooling_tile(9)
4780           .channels(channels)
4781           .input_zero_point(zero_point)
4782           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4783       }
4784     }
4785   }
4786 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_fulltile_with_output_scale)4787   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_fulltile_with_output_scale) {
4788     TEST_REQUIRES_X86_SSE2;
4789     for (size_t channels = 9; channels < 16; channels++) {
4790       for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4791         AvgPoolMicrokernelTester()
4792           .pooling_elements(9)
4793           .pooling_tile(9)
4794           .channels(channels)
4795           .output_scale(scale)
4796           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4797       }
4798     }
4799   }
4800 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_fulltile_with_output_zero_point)4801   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_fulltile_with_output_zero_point) {
4802     TEST_REQUIRES_X86_SSE2;
4803     for (size_t channels = 9; channels < 16; channels++) {
4804       for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4805         AvgPoolMicrokernelTester()
4806           .pooling_elements(9)
4807           .pooling_tile(9)
4808           .channels(channels)
4809           .output_zero_point(zero_point)
4810           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4811       }
4812     }
4813   }
4814 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_fulltile_with_qmin)4815   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_fulltile_with_qmin) {
4816     TEST_REQUIRES_X86_SSE2;
4817     for (size_t channels = 9; channels < 16; channels++) {
4818       AvgPoolMicrokernelTester()
4819         .pooling_elements(9)
4820         .pooling_tile(9)
4821         .channels(channels)
4822         .qmin(128)
4823         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4824     }
4825   }
4826 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_fulltile_with_qmax)4827   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_fulltile_with_qmax) {
4828     TEST_REQUIRES_X86_SSE2;
4829     for (size_t channels = 9; channels < 16; channels++) {
4830       AvgPoolMicrokernelTester()
4831         .pooling_elements(9)
4832         .pooling_tile(9)
4833         .channels(channels)
4834         .qmax(128)
4835         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4836     }
4837   }
4838 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_subtile)4839   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_subtile) {
4840     TEST_REQUIRES_X86_SSE2;
4841     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4842       for (size_t channels = 9; channels < 16; channels++) {
4843         AvgPoolMicrokernelTester()
4844           .pooling_elements(pooling_elements)
4845           .pooling_tile(9)
4846           .channels(channels)
4847           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4848       }
4849     }
4850   }
4851 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_subtile_with_input_offset)4852   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_subtile_with_input_offset) {
4853     TEST_REQUIRES_X86_SSE2;
4854     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4855       for (size_t channels = 9; channels < 16; channels++) {
4856         AvgPoolMicrokernelTester()
4857           .pooling_elements(pooling_elements)
4858           .pooling_tile(9)
4859           .channels(channels)
4860           .input_offset(17)
4861           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4862       }
4863     }
4864   }
4865 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,channels_gt_8_unipass_subtile_with_zero)4866   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, channels_gt_8_unipass_subtile_with_zero) {
4867     TEST_REQUIRES_X86_SSE2;
4868     for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
4869       for (size_t channels = 9; channels < 16; channels++) {
4870         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
4871           AvgPoolMicrokernelTester()
4872             .pooling_elements(pooling_elements)
4873             .pooling_tile(9)
4874             .channels(channels)
4875             .input_offset(17)
4876             .zero_index(zero_index)
4877             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4878         }
4879       }
4880     }
4881   }
4882 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels)4883   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels) {
4884     TEST_REQUIRES_X86_SSE2;
4885     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4886       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4887         for (size_t channels = 1; channels <= 40; channels += 7) {
4888           AvgPoolMicrokernelTester()
4889             .output_pixels(output_pixels)
4890             .pooling_elements(pooling_elements)
4891             .pooling_tile(9, 0)
4892             .channels(channels)
4893             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4894         }
4895       }
4896     }
4897   }
4898 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_input_offset)4899   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_input_offset) {
4900     TEST_REQUIRES_X86_SSE2;
4901     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4902       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4903         for (size_t channels = 1; channels <= 40; channels += 7) {
4904           AvgPoolMicrokernelTester()
4905             .output_pixels(output_pixels)
4906             .pooling_elements(pooling_elements)
4907             .pooling_tile(9, 0)
4908             .channels(channels)
4909             .input_offset(43)
4910             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4911         }
4912       }
4913     }
4914   }
4915 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_zero)4916   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_zero) {
4917     TEST_REQUIRES_X86_SSE2;
4918     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4919       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4920         for (size_t channels = 1; channels <= 40; channels += 7) {
4921           for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
4922             AvgPoolMicrokernelTester()
4923               .output_pixels(output_pixels)
4924               .pooling_elements(pooling_elements)
4925               .pooling_tile(9, 0)
4926               .channels(channels)
4927               .input_offset(43)
4928               .zero_index(zero_index)
4929               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4930           }
4931         }
4932       }
4933     }
4934   }
4935 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_input_scale)4936   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_input_scale) {
4937     TEST_REQUIRES_X86_SSE2;
4938     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4939       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4940         for (size_t channels = 1; channels <= 40; channels += 7) {
4941           for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4942             AvgPoolMicrokernelTester()
4943               .output_pixels(output_pixels)
4944               .pooling_elements(pooling_elements)
4945               .pooling_tile(9)
4946               .channels(channels)
4947               .input_scale(scale)
4948               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4949           }
4950         }
4951       }
4952     }
4953   }
4954 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_input_zero_point)4955   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_input_zero_point) {
4956     TEST_REQUIRES_X86_SSE2;
4957     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4958       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4959         for (size_t channels = 1; channels <= 40; channels += 7) {
4960           for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4961             AvgPoolMicrokernelTester()
4962               .output_pixels(output_pixels)
4963               .pooling_elements(pooling_elements)
4964               .pooling_tile(9)
4965               .channels(channels)
4966               .input_zero_point(zero_point)
4967               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4968           }
4969         }
4970       }
4971     }
4972   }
4973 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_output_scale)4974   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_output_scale) {
4975     TEST_REQUIRES_X86_SSE2;
4976     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4977       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4978         for (size_t channels = 1; channels <= 40; channels += 7) {
4979           for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
4980             AvgPoolMicrokernelTester()
4981               .output_pixels(output_pixels)
4982               .pooling_elements(pooling_elements)
4983               .pooling_tile(9)
4984               .channels(channels)
4985               .output_scale(scale)
4986               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
4987           }
4988         }
4989       }
4990     }
4991   }
4992 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_output_zero_point)4993   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_output_zero_point) {
4994     TEST_REQUIRES_X86_SSE2;
4995     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
4996       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
4997         for (size_t channels = 1; channels <= 40; channels += 7) {
4998           for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
4999             AvgPoolMicrokernelTester()
5000               .output_pixels(output_pixels)
5001               .pooling_elements(pooling_elements)
5002               .pooling_tile(9)
5003               .channels(channels)
5004               .output_zero_point(zero_point)
5005               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
5006           }
5007         }
5008       }
5009     }
5010   }
5011 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_qmin)5012   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_qmin) {
5013     TEST_REQUIRES_X86_SSE2;
5014     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5015       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5016         for (size_t channels = 1; channels <= 40; channels += 7) {
5017           AvgPoolMicrokernelTester()
5018             .output_pixels(output_pixels)
5019             .pooling_elements(pooling_elements)
5020             .pooling_tile(9, 0)
5021             .channels(channels)
5022             .qmin(128)
5023             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
5024         }
5025       }
5026     }
5027   }
5028 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_qmax)5029   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_qmax) {
5030     TEST_REQUIRES_X86_SSE2;
5031     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5032       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5033         for (size_t channels = 1; channels <= 40; channels += 7) {
5034           AvgPoolMicrokernelTester()
5035             .output_pixels(output_pixels)
5036             .pooling_elements(pooling_elements)
5037             .pooling_tile(9, 0)
5038             .channels(channels)
5039             .qmax(128)
5040             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
5041         }
5042       }
5043     }
5044   }
5045 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_output_stride)5046   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_output_stride) {
5047     TEST_REQUIRES_X86_SSE2;
5048     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5049       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5050         for (size_t channels = 1; channels <= 40; channels += 7) {
5051           AvgPoolMicrokernelTester()
5052             .output_pixels(output_pixels)
5053             .pooling_elements(pooling_elements)
5054             .pooling_tile(9, 0)
5055             .channels(channels)
5056             .output_stride(43)
5057             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
5058         }
5059       }
5060     }
5061   }
5062 
TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8,few_output_pixels_with_step)5063   TEST(QU8_AVGPOOL_MINMAX_9X__SSE2_C8, few_output_pixels_with_step) {
5064     TEST_REQUIRES_X86_SSE2;
5065     for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5066       for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5067         for (size_t channels = 1; channels <= 40; channels += 7) {
5068           for (size_t step = 2; step <= pooling_elements; step++) {
5069             AvgPoolMicrokernelTester()
5070               .output_pixels(output_pixels)
5071               .pooling_elements(pooling_elements)
5072               .pooling_tile(9, 0)
5073               .step(step)
5074               .channels(channels)
5075               .output_stride(43)
5076               .Test(xnn_qu8_avgpool_minmax_ukernel_9x__sse2_c8);
5077           }
5078         }
5079       }
5080     }
5081   }
5082 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
5083 
5084 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_fulltile)5085 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_fulltile) {
5086   AvgPoolMicrokernelTester()
5087     .pooling_elements(9)
5088     .pooling_tile(9)
5089     .channels(1)
5090     .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5091 }
5092 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_fulltile_with_input_offset)5093 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_input_offset) {
5094   AvgPoolMicrokernelTester()
5095     .pooling_elements(9)
5096     .pooling_tile(9)
5097     .channels(1)
5098     .input_offset(3)
5099     .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5100 }
5101 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_fulltile_with_zero)5102 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_zero) {
5103   for (size_t zero_index = 0; zero_index < 9; zero_index++) {
5104     AvgPoolMicrokernelTester()
5105       .pooling_elements(9)
5106       .pooling_tile(9)
5107       .channels(1)
5108       .input_offset(3)
5109       .zero_index(zero_index)
5110       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5111   }
5112 }
5113 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_fulltile_with_input_scale)5114 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_input_scale) {
5115   for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
5116     AvgPoolMicrokernelTester()
5117       .pooling_elements(9)
5118       .pooling_tile(9)
5119       .channels(1)
5120       .input_scale(scale)
5121       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5122   }
5123 }
5124 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_fulltile_with_input_zero_point)5125 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_input_zero_point) {
5126   for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
5127     AvgPoolMicrokernelTester()
5128       .pooling_elements(9)
5129       .pooling_tile(9)
5130       .channels(1)
5131       .input_zero_point(zero_point)
5132       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5133   }
5134 }
5135 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_fulltile_with_output_scale)5136 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_output_scale) {
5137   for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
5138     AvgPoolMicrokernelTester()
5139       .pooling_elements(9)
5140       .pooling_tile(9)
5141       .channels(1)
5142       .output_scale(scale)
5143       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5144   }
5145 }
5146 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_fulltile_with_output_zero_point)5147 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_output_zero_point) {
5148   for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
5149     AvgPoolMicrokernelTester()
5150       .pooling_elements(9)
5151       .pooling_tile(9)
5152       .channels(1)
5153       .output_zero_point(zero_point)
5154       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5155   }
5156 }
5157 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_fulltile_with_qmin)5158 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_qmin) {
5159   AvgPoolMicrokernelTester()
5160     .pooling_elements(9)
5161     .pooling_tile(9)
5162     .channels(1)
5163     .qmin(128)
5164     .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5165 }
5166 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_fulltile_with_qmax)5167 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_qmax) {
5168   AvgPoolMicrokernelTester()
5169     .pooling_elements(9)
5170     .pooling_tile(9)
5171     .channels(1)
5172     .qmax(128)
5173     .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5174 }
5175 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_subtile)5176 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_subtile) {
5177   for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
5178     AvgPoolMicrokernelTester()
5179       .pooling_elements(pooling_elements)
5180       .pooling_tile(9)
5181       .channels(1)
5182       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5183   }
5184 }
5185 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_subtile_with_input_offset)5186 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_subtile_with_input_offset) {
5187   for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
5188     AvgPoolMicrokernelTester()
5189       .pooling_elements(pooling_elements)
5190       .pooling_tile(9)
5191       .channels(1)
5192       .input_offset(3)
5193       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5194   }
5195 }
5196 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_eq_1_unipass_subtile_with_zero)5197 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_eq_1_unipass_subtile_with_zero) {
5198   for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
5199     for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
5200       AvgPoolMicrokernelTester()
5201         .pooling_elements(pooling_elements)
5202         .pooling_tile(9)
5203         .channels(1)
5204         .input_offset(3)
5205         .zero_index(zero_index)
5206         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5207     }
5208   }
5209 }
5210 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_fulltile)5211 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_fulltile) {
5212   for (size_t channels = 2; channels < 10; channels++) {
5213     AvgPoolMicrokernelTester()
5214       .pooling_elements(9)
5215       .pooling_tile(9)
5216       .channels(channels)
5217       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5218   }
5219 }
5220 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_fulltile_with_input_offset)5221 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_input_offset) {
5222   for (size_t channels = 2; channels < 10; channels++) {
5223     AvgPoolMicrokernelTester()
5224       .pooling_elements(9)
5225       .pooling_tile(9)
5226       .channels(channels)
5227       .input_offset(3)
5228       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5229   }
5230 }
5231 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_fulltile_with_zero)5232 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_zero) {
5233   for (size_t channels = 2; channels < 10; channels++) {
5234     for (size_t zero_index = 0; zero_index < 9; zero_index++) {
5235       AvgPoolMicrokernelTester()
5236         .pooling_elements(9)
5237         .pooling_tile(9)
5238         .channels(channels)
5239         .input_offset(3)
5240         .zero_index(zero_index)
5241         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5242     }
5243   }
5244 }
5245 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_fulltile_with_input_scale)5246 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_input_scale) {
5247   for (size_t channels = 2; channels < 10; channels++) {
5248     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
5249       AvgPoolMicrokernelTester()
5250         .pooling_elements(9)
5251         .pooling_tile(9)
5252         .channels(channels)
5253         .input_scale(scale)
5254         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5255     }
5256   }
5257 }
5258 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_fulltile_with_input_zero_point)5259 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_input_zero_point) {
5260   for (size_t channels = 2; channels < 10; channels++) {
5261     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
5262       AvgPoolMicrokernelTester()
5263         .pooling_elements(9)
5264         .pooling_tile(9)
5265         .channels(channels)
5266         .input_zero_point(zero_point)
5267         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5268     }
5269   }
5270 }
5271 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_fulltile_with_output_scale)5272 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_output_scale) {
5273   for (size_t channels = 2; channels < 10; channels++) {
5274     for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
5275       AvgPoolMicrokernelTester()
5276         .pooling_elements(9)
5277         .pooling_tile(9)
5278         .channels(channels)
5279         .output_scale(scale)
5280         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5281     }
5282   }
5283 }
5284 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_fulltile_with_output_zero_point)5285 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_output_zero_point) {
5286   for (size_t channels = 2; channels < 10; channels++) {
5287     for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
5288       AvgPoolMicrokernelTester()
5289         .pooling_elements(9)
5290         .pooling_tile(9)
5291         .channels(channels)
5292         .output_zero_point(zero_point)
5293         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5294     }
5295   }
5296 }
5297 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_fulltile_with_qmin)5298 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_qmin) {
5299   for (size_t channels = 2; channels < 10; channels++) {
5300     AvgPoolMicrokernelTester()
5301       .pooling_elements(9)
5302       .pooling_tile(9)
5303       .channels(channels)
5304       .qmin(128)
5305       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5306   }
5307 }
5308 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_fulltile_with_qmax)5309 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_qmax) {
5310   for (size_t channels = 2; channels < 10; channels++) {
5311     AvgPoolMicrokernelTester()
5312       .pooling_elements(9)
5313       .pooling_tile(9)
5314       .channels(channels)
5315       .qmax(128)
5316       .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5317   }
5318 }
5319 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_subtile)5320 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_subtile) {
5321   for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
5322     for (size_t channels = 2; channels < 10; channels++) {
5323       AvgPoolMicrokernelTester()
5324         .pooling_elements(pooling_elements)
5325         .pooling_tile(9)
5326         .channels(channels)
5327         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5328     }
5329   }
5330 }
5331 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_subtile_with_input_offset)5332 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_subtile_with_input_offset) {
5333   for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
5334     for (size_t channels = 2; channels < 10; channels++) {
5335       AvgPoolMicrokernelTester()
5336         .pooling_elements(pooling_elements)
5337         .pooling_tile(9)
5338         .channels(channels)
5339         .input_offset(3)
5340         .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5341     }
5342   }
5343 }
5344 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,channels_gt_1_unipass_subtile_with_zero)5345 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, channels_gt_1_unipass_subtile_with_zero) {
5346   for (size_t pooling_elements = 2; pooling_elements < 9; pooling_elements++) {
5347     for (size_t channels = 2; channels < 10; channels++) {
5348       for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
5349         AvgPoolMicrokernelTester()
5350           .pooling_elements(pooling_elements)
5351           .pooling_tile(9)
5352           .channels(channels)
5353           .input_offset(3)
5354           .zero_index(zero_index)
5355           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5356       }
5357     }
5358   }
5359 }
5360 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels)5361 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels) {
5362   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5363     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5364       for (size_t channels = 1; channels <= 5; channels += 1) {
5365         AvgPoolMicrokernelTester()
5366           .output_pixels(output_pixels)
5367           .pooling_elements(pooling_elements)
5368           .pooling_tile(9, 0)
5369           .channels(channels)
5370           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5371       }
5372     }
5373   }
5374 }
5375 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_input_offset)5376 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_input_offset) {
5377   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5378     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5379       for (size_t channels = 1; channels <= 5; channels += 1) {
5380         AvgPoolMicrokernelTester()
5381           .output_pixels(output_pixels)
5382           .pooling_elements(pooling_elements)
5383           .pooling_tile(9, 0)
5384           .channels(channels)
5385           .input_offset(7)
5386           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5387       }
5388     }
5389   }
5390 }
5391 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_zero)5392 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_zero) {
5393   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5394     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5395       for (size_t channels = 1; channels <= 5; channels += 1) {
5396         for (size_t zero_index = 0; zero_index < pooling_elements; zero_index++) {
5397           AvgPoolMicrokernelTester()
5398             .output_pixels(output_pixels)
5399             .pooling_elements(pooling_elements)
5400             .pooling_tile(9, 0)
5401             .channels(channels)
5402             .input_offset(7)
5403             .zero_index(zero_index)
5404             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5405         }
5406       }
5407     }
5408   }
5409 }
5410 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_input_scale)5411 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_input_scale) {
5412   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5413     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5414       for (size_t channels = 1; channels <= 5; channels += 1) {
5415         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
5416           AvgPoolMicrokernelTester()
5417             .output_pixels(output_pixels)
5418             .pooling_elements(pooling_elements)
5419             .pooling_tile(9)
5420             .channels(channels)
5421             .input_scale(scale)
5422             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5423         }
5424       }
5425     }
5426   }
5427 }
5428 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_input_zero_point)5429 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_input_zero_point) {
5430   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5431     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5432       for (size_t channels = 1; channels <= 5; channels += 1) {
5433         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
5434           AvgPoolMicrokernelTester()
5435             .output_pixels(output_pixels)
5436             .pooling_elements(pooling_elements)
5437             .pooling_tile(9)
5438             .channels(channels)
5439             .input_zero_point(zero_point)
5440             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5441         }
5442       }
5443     }
5444   }
5445 }
5446 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_output_scale)5447 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_output_scale) {
5448   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5449     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5450       for (size_t channels = 1; channels <= 5; channels += 1) {
5451         for (float scale = 0.01f; scale < 100.0f; scale *= 3.14159265f) {
5452           AvgPoolMicrokernelTester()
5453             .output_pixels(output_pixels)
5454             .pooling_elements(pooling_elements)
5455             .pooling_tile(9)
5456             .channels(channels)
5457             .output_scale(scale)
5458             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5459         }
5460       }
5461     }
5462   }
5463 }
5464 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_output_zero_point)5465 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_output_zero_point) {
5466   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5467     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5468       for (size_t channels = 1; channels <= 5; channels += 1) {
5469         for (int32_t zero_point = 0; zero_point <= 255; zero_point += 51) {
5470           AvgPoolMicrokernelTester()
5471             .output_pixels(output_pixels)
5472             .pooling_elements(pooling_elements)
5473             .pooling_tile(9)
5474             .channels(channels)
5475             .output_zero_point(zero_point)
5476             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5477         }
5478       }
5479     }
5480   }
5481 }
5482 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_qmin)5483 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_qmin) {
5484   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5485     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5486       for (size_t channels = 1; channels <= 5; channels += 1) {
5487         AvgPoolMicrokernelTester()
5488           .output_pixels(output_pixels)
5489           .pooling_elements(pooling_elements)
5490           .pooling_tile(9, 0)
5491           .channels(channels)
5492           .qmin(128)
5493           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5494       }
5495     }
5496   }
5497 }
5498 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_qmax)5499 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_qmax) {
5500   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5501     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5502       for (size_t channels = 1; channels <= 5; channels += 1) {
5503         AvgPoolMicrokernelTester()
5504           .output_pixels(output_pixels)
5505           .pooling_elements(pooling_elements)
5506           .pooling_tile(9, 0)
5507           .channels(channels)
5508           .qmax(128)
5509           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5510       }
5511     }
5512   }
5513 }
5514 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_output_stride)5515 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_output_stride) {
5516   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5517     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5518       for (size_t channels = 1; channels <= 5; channels += 1) {
5519         AvgPoolMicrokernelTester()
5520           .output_pixels(output_pixels)
5521           .pooling_elements(pooling_elements)
5522           .pooling_tile(9, 0)
5523           .channels(channels)
5524           .output_stride(7)
5525           .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5526       }
5527     }
5528   }
5529 }
5530 
TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1,few_output_pixels_with_step)5531 TEST(QU8_AVGPOOL_MINMAX_9X__SCALAR_C1, few_output_pixels_with_step) {
5532   for (size_t output_pixels = 2; output_pixels <= 5; output_pixels++) {
5533     for (size_t pooling_elements : std::vector<size_t>{{2, 8, 9}}) {
5534       for (size_t channels = 1; channels <= 5; channels += 1) {
5535         for (size_t step = 2; step <= pooling_elements; step++) {
5536           AvgPoolMicrokernelTester()
5537             .output_pixels(output_pixels)
5538             .pooling_elements(pooling_elements)
5539             .pooling_tile(9, 0)
5540             .step(step)
5541             .channels(channels)
5542             .output_stride(7)
5543             .Test(xnn_qu8_avgpool_minmax_ukernel_9x__scalar_c1, AvgPoolMicrokernelTester::Variant::Scalar);
5544         }
5545       }
5546     }
5547   }
5548 }