xref: /aosp_15_r20/external/XNNPACK/test/qu8-vlrelu.cc (revision 4bdc94577ba0e567308109d787f7fec7b531ce36)
1 // Copyright 2022 Google LLC
2 //
3 // This source code is licensed under the BSD-style license found in the
4 // LICENSE file in the root directory of this source tree.
5 //
6 // Auto-generated file. Do not edit!
7 //   Specification: test/qu8-vlrelu.yaml
8 //   Generator: tools/generate-vlrelu-test.py
9 
10 
11 #include <gtest/gtest.h>
12 
13 #include <xnnpack/common.h>
14 #include <xnnpack/isa-checks.h>
15 
16 #include <xnnpack/vlrelu.h>
17 #include "vlrelu-microkernel-tester.h"
18 
19 
20 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(QU8_VLRELU__NEON_X8,batch_eq_8)21   TEST(QU8_VLRELU__NEON_X8, batch_eq_8) {
22     TEST_REQUIRES_ARM_NEON;
23     VLReLUMicrokernelTester()
24       .batch_size(8)
25       .input_zero_point(150)
26       .output_zero_point(100)
27       .Test(xnn_qu8_vlrelu_ukernel__neon_x8, xnn_init_qu8_lrelu_neon_params);
28   }
29 
TEST(QU8_VLRELU__NEON_X8,batch_div_8)30   TEST(QU8_VLRELU__NEON_X8, batch_div_8) {
31     TEST_REQUIRES_ARM_NEON;
32     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
33       VLReLUMicrokernelTester()
34         .batch_size(batch_size)
35         .input_zero_point(150)
36         .output_zero_point(100)
37         .Test(xnn_qu8_vlrelu_ukernel__neon_x8, xnn_init_qu8_lrelu_neon_params);
38     }
39   }
40 
TEST(QU8_VLRELU__NEON_X8,batch_lt_8)41   TEST(QU8_VLRELU__NEON_X8, batch_lt_8) {
42     TEST_REQUIRES_ARM_NEON;
43     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
44       VLReLUMicrokernelTester()
45         .batch_size(batch_size)
46         .input_zero_point(150)
47         .output_zero_point(100)
48         .Test(xnn_qu8_vlrelu_ukernel__neon_x8, xnn_init_qu8_lrelu_neon_params);
49     }
50   }
51 
TEST(QU8_VLRELU__NEON_X8,batch_gt_8)52   TEST(QU8_VLRELU__NEON_X8, batch_gt_8) {
53     TEST_REQUIRES_ARM_NEON;
54     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
55       VLReLUMicrokernelTester()
56         .batch_size(batch_size)
57         .input_zero_point(150)
58         .output_zero_point(100)
59         .Test(xnn_qu8_vlrelu_ukernel__neon_x8, xnn_init_qu8_lrelu_neon_params);
60     }
61   }
62 
TEST(QU8_VLRELU__NEON_X8,positive_scale)63   TEST(QU8_VLRELU__NEON_X8, positive_scale) {
64     TEST_REQUIRES_ARM_NEON;
65     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
66       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
67         VLReLUMicrokernelTester()
68           .batch_size(batch_size)
69           .positive_scale(positive_scale)
70           .input_zero_point(150)
71           .output_zero_point(100)
72           .Test(xnn_qu8_vlrelu_ukernel__neon_x8, xnn_init_qu8_lrelu_neon_params);
73         }
74     }
75   }
76 
TEST(QU8_VLRELU__NEON_X8,negative_scale)77   TEST(QU8_VLRELU__NEON_X8, negative_scale) {
78     TEST_REQUIRES_ARM_NEON;
79     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
80       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
81         VLReLUMicrokernelTester()
82           .batch_size(batch_size)
83           .negative_scale(negative_scale)
84           .input_zero_point(150)
85           .output_zero_point(100)
86           .Test(xnn_qu8_vlrelu_ukernel__neon_x8, xnn_init_qu8_lrelu_neon_params);
87         }
88     }
89   }
90 
TEST(QU8_VLRELU__NEON_X8,input_zero_point)91   TEST(QU8_VLRELU__NEON_X8, input_zero_point) {
92     TEST_REQUIRES_ARM_NEON;
93     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
94       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
95         VLReLUMicrokernelTester()
96           .batch_size(batch_size)
97           .input_zero_point(input_zero_point)
98           .output_zero_point(100)
99           .Test(xnn_qu8_vlrelu_ukernel__neon_x8, xnn_init_qu8_lrelu_neon_params);
100       }
101     }
102   }
103 
TEST(QU8_VLRELU__NEON_X8,output_zero_point)104   TEST(QU8_VLRELU__NEON_X8, output_zero_point) {
105     TEST_REQUIRES_ARM_NEON;
106     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
107       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
108         VLReLUMicrokernelTester()
109           .batch_size(batch_size)
110           .input_zero_point(150)
111           .output_zero_point(output_zero_point)
112           .Test(xnn_qu8_vlrelu_ukernel__neon_x8, xnn_init_qu8_lrelu_neon_params);
113       }
114     }
115   }
116 #endif  // XNN_ARCH_ARM || XNN_ARCH_ARM64
117 
118 
119 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(QU8_VLRELU__NEON_X16,batch_eq_16)120   TEST(QU8_VLRELU__NEON_X16, batch_eq_16) {
121     TEST_REQUIRES_ARM_NEON;
122     VLReLUMicrokernelTester()
123       .batch_size(16)
124       .input_zero_point(150)
125       .output_zero_point(100)
126       .Test(xnn_qu8_vlrelu_ukernel__neon_x16, xnn_init_qu8_lrelu_neon_params);
127   }
128 
TEST(QU8_VLRELU__NEON_X16,batch_div_16)129   TEST(QU8_VLRELU__NEON_X16, batch_div_16) {
130     TEST_REQUIRES_ARM_NEON;
131     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
132       VLReLUMicrokernelTester()
133         .batch_size(batch_size)
134         .input_zero_point(150)
135         .output_zero_point(100)
136         .Test(xnn_qu8_vlrelu_ukernel__neon_x16, xnn_init_qu8_lrelu_neon_params);
137     }
138   }
139 
TEST(QU8_VLRELU__NEON_X16,batch_lt_16)140   TEST(QU8_VLRELU__NEON_X16, batch_lt_16) {
141     TEST_REQUIRES_ARM_NEON;
142     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
143       VLReLUMicrokernelTester()
144         .batch_size(batch_size)
145         .input_zero_point(150)
146         .output_zero_point(100)
147         .Test(xnn_qu8_vlrelu_ukernel__neon_x16, xnn_init_qu8_lrelu_neon_params);
148     }
149   }
150 
TEST(QU8_VLRELU__NEON_X16,batch_gt_16)151   TEST(QU8_VLRELU__NEON_X16, batch_gt_16) {
152     TEST_REQUIRES_ARM_NEON;
153     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
154       VLReLUMicrokernelTester()
155         .batch_size(batch_size)
156         .input_zero_point(150)
157         .output_zero_point(100)
158         .Test(xnn_qu8_vlrelu_ukernel__neon_x16, xnn_init_qu8_lrelu_neon_params);
159     }
160   }
161 
TEST(QU8_VLRELU__NEON_X16,positive_scale)162   TEST(QU8_VLRELU__NEON_X16, positive_scale) {
163     TEST_REQUIRES_ARM_NEON;
164     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
165       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
166         VLReLUMicrokernelTester()
167           .batch_size(batch_size)
168           .positive_scale(positive_scale)
169           .input_zero_point(150)
170           .output_zero_point(100)
171           .Test(xnn_qu8_vlrelu_ukernel__neon_x16, xnn_init_qu8_lrelu_neon_params);
172         }
173     }
174   }
175 
TEST(QU8_VLRELU__NEON_X16,negative_scale)176   TEST(QU8_VLRELU__NEON_X16, negative_scale) {
177     TEST_REQUIRES_ARM_NEON;
178     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
179       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
180         VLReLUMicrokernelTester()
181           .batch_size(batch_size)
182           .negative_scale(negative_scale)
183           .input_zero_point(150)
184           .output_zero_point(100)
185           .Test(xnn_qu8_vlrelu_ukernel__neon_x16, xnn_init_qu8_lrelu_neon_params);
186         }
187     }
188   }
189 
TEST(QU8_VLRELU__NEON_X16,input_zero_point)190   TEST(QU8_VLRELU__NEON_X16, input_zero_point) {
191     TEST_REQUIRES_ARM_NEON;
192     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
193       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
194         VLReLUMicrokernelTester()
195           .batch_size(batch_size)
196           .input_zero_point(input_zero_point)
197           .output_zero_point(100)
198           .Test(xnn_qu8_vlrelu_ukernel__neon_x16, xnn_init_qu8_lrelu_neon_params);
199       }
200     }
201   }
202 
TEST(QU8_VLRELU__NEON_X16,output_zero_point)203   TEST(QU8_VLRELU__NEON_X16, output_zero_point) {
204     TEST_REQUIRES_ARM_NEON;
205     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
206       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
207         VLReLUMicrokernelTester()
208           .batch_size(batch_size)
209           .input_zero_point(150)
210           .output_zero_point(output_zero_point)
211           .Test(xnn_qu8_vlrelu_ukernel__neon_x16, xnn_init_qu8_lrelu_neon_params);
212       }
213     }
214   }
215 #endif  // XNN_ARCH_ARM || XNN_ARCH_ARM64
216 
217 
218 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(QU8_VLRELU__NEON_X32,batch_eq_32)219   TEST(QU8_VLRELU__NEON_X32, batch_eq_32) {
220     TEST_REQUIRES_ARM_NEON;
221     VLReLUMicrokernelTester()
222       .batch_size(32)
223       .input_zero_point(150)
224       .output_zero_point(100)
225       .Test(xnn_qu8_vlrelu_ukernel__neon_x32, xnn_init_qu8_lrelu_neon_params);
226   }
227 
TEST(QU8_VLRELU__NEON_X32,batch_div_32)228   TEST(QU8_VLRELU__NEON_X32, batch_div_32) {
229     TEST_REQUIRES_ARM_NEON;
230     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
231       VLReLUMicrokernelTester()
232         .batch_size(batch_size)
233         .input_zero_point(150)
234         .output_zero_point(100)
235         .Test(xnn_qu8_vlrelu_ukernel__neon_x32, xnn_init_qu8_lrelu_neon_params);
236     }
237   }
238 
TEST(QU8_VLRELU__NEON_X32,batch_lt_32)239   TEST(QU8_VLRELU__NEON_X32, batch_lt_32) {
240     TEST_REQUIRES_ARM_NEON;
241     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
242       VLReLUMicrokernelTester()
243         .batch_size(batch_size)
244         .input_zero_point(150)
245         .output_zero_point(100)
246         .Test(xnn_qu8_vlrelu_ukernel__neon_x32, xnn_init_qu8_lrelu_neon_params);
247     }
248   }
249 
TEST(QU8_VLRELU__NEON_X32,batch_gt_32)250   TEST(QU8_VLRELU__NEON_X32, batch_gt_32) {
251     TEST_REQUIRES_ARM_NEON;
252     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
253       VLReLUMicrokernelTester()
254         .batch_size(batch_size)
255         .input_zero_point(150)
256         .output_zero_point(100)
257         .Test(xnn_qu8_vlrelu_ukernel__neon_x32, xnn_init_qu8_lrelu_neon_params);
258     }
259   }
260 
TEST(QU8_VLRELU__NEON_X32,positive_scale)261   TEST(QU8_VLRELU__NEON_X32, positive_scale) {
262     TEST_REQUIRES_ARM_NEON;
263     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
264       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
265         VLReLUMicrokernelTester()
266           .batch_size(batch_size)
267           .positive_scale(positive_scale)
268           .input_zero_point(150)
269           .output_zero_point(100)
270           .Test(xnn_qu8_vlrelu_ukernel__neon_x32, xnn_init_qu8_lrelu_neon_params);
271         }
272     }
273   }
274 
TEST(QU8_VLRELU__NEON_X32,negative_scale)275   TEST(QU8_VLRELU__NEON_X32, negative_scale) {
276     TEST_REQUIRES_ARM_NEON;
277     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
278       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
279         VLReLUMicrokernelTester()
280           .batch_size(batch_size)
281           .negative_scale(negative_scale)
282           .input_zero_point(150)
283           .output_zero_point(100)
284           .Test(xnn_qu8_vlrelu_ukernel__neon_x32, xnn_init_qu8_lrelu_neon_params);
285         }
286     }
287   }
288 
TEST(QU8_VLRELU__NEON_X32,input_zero_point)289   TEST(QU8_VLRELU__NEON_X32, input_zero_point) {
290     TEST_REQUIRES_ARM_NEON;
291     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
292       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
293         VLReLUMicrokernelTester()
294           .batch_size(batch_size)
295           .input_zero_point(input_zero_point)
296           .output_zero_point(100)
297           .Test(xnn_qu8_vlrelu_ukernel__neon_x32, xnn_init_qu8_lrelu_neon_params);
298       }
299     }
300   }
301 
TEST(QU8_VLRELU__NEON_X32,output_zero_point)302   TEST(QU8_VLRELU__NEON_X32, output_zero_point) {
303     TEST_REQUIRES_ARM_NEON;
304     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
305       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
306         VLReLUMicrokernelTester()
307           .batch_size(batch_size)
308           .input_zero_point(150)
309           .output_zero_point(output_zero_point)
310           .Test(xnn_qu8_vlrelu_ukernel__neon_x32, xnn_init_qu8_lrelu_neon_params);
311       }
312     }
313   }
314 #endif  // XNN_ARCH_ARM || XNN_ARCH_ARM64
315 
316 
317 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__SSE2_X16,batch_eq_16)318   TEST(QU8_VLRELU__SSE2_X16, batch_eq_16) {
319     TEST_REQUIRES_X86_SSE2;
320     VLReLUMicrokernelTester()
321       .batch_size(16)
322       .input_zero_point(150)
323       .output_zero_point(100)
324       .Test(xnn_qu8_vlrelu_ukernel__sse2_x16, xnn_init_qu8_lrelu_sse2_params);
325   }
326 
TEST(QU8_VLRELU__SSE2_X16,batch_div_16)327   TEST(QU8_VLRELU__SSE2_X16, batch_div_16) {
328     TEST_REQUIRES_X86_SSE2;
329     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
330       VLReLUMicrokernelTester()
331         .batch_size(batch_size)
332         .input_zero_point(150)
333         .output_zero_point(100)
334         .Test(xnn_qu8_vlrelu_ukernel__sse2_x16, xnn_init_qu8_lrelu_sse2_params);
335     }
336   }
337 
TEST(QU8_VLRELU__SSE2_X16,batch_lt_16)338   TEST(QU8_VLRELU__SSE2_X16, batch_lt_16) {
339     TEST_REQUIRES_X86_SSE2;
340     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
341       VLReLUMicrokernelTester()
342         .batch_size(batch_size)
343         .input_zero_point(150)
344         .output_zero_point(100)
345         .Test(xnn_qu8_vlrelu_ukernel__sse2_x16, xnn_init_qu8_lrelu_sse2_params);
346     }
347   }
348 
TEST(QU8_VLRELU__SSE2_X16,batch_gt_16)349   TEST(QU8_VLRELU__SSE2_X16, batch_gt_16) {
350     TEST_REQUIRES_X86_SSE2;
351     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
352       VLReLUMicrokernelTester()
353         .batch_size(batch_size)
354         .input_zero_point(150)
355         .output_zero_point(100)
356         .Test(xnn_qu8_vlrelu_ukernel__sse2_x16, xnn_init_qu8_lrelu_sse2_params);
357     }
358   }
359 
TEST(QU8_VLRELU__SSE2_X16,positive_scale)360   TEST(QU8_VLRELU__SSE2_X16, positive_scale) {
361     TEST_REQUIRES_X86_SSE2;
362     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
363       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
364         VLReLUMicrokernelTester()
365           .batch_size(batch_size)
366           .positive_scale(positive_scale)
367           .input_zero_point(150)
368           .output_zero_point(100)
369           .Test(xnn_qu8_vlrelu_ukernel__sse2_x16, xnn_init_qu8_lrelu_sse2_params);
370         }
371     }
372   }
373 
TEST(QU8_VLRELU__SSE2_X16,negative_scale)374   TEST(QU8_VLRELU__SSE2_X16, negative_scale) {
375     TEST_REQUIRES_X86_SSE2;
376     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
377       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
378         VLReLUMicrokernelTester()
379           .batch_size(batch_size)
380           .negative_scale(negative_scale)
381           .input_zero_point(150)
382           .output_zero_point(100)
383           .Test(xnn_qu8_vlrelu_ukernel__sse2_x16, xnn_init_qu8_lrelu_sse2_params);
384         }
385     }
386   }
387 
TEST(QU8_VLRELU__SSE2_X16,input_zero_point)388   TEST(QU8_VLRELU__SSE2_X16, input_zero_point) {
389     TEST_REQUIRES_X86_SSE2;
390     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
391       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
392         VLReLUMicrokernelTester()
393           .batch_size(batch_size)
394           .input_zero_point(input_zero_point)
395           .output_zero_point(100)
396           .Test(xnn_qu8_vlrelu_ukernel__sse2_x16, xnn_init_qu8_lrelu_sse2_params);
397       }
398     }
399   }
400 
TEST(QU8_VLRELU__SSE2_X16,output_zero_point)401   TEST(QU8_VLRELU__SSE2_X16, output_zero_point) {
402     TEST_REQUIRES_X86_SSE2;
403     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
404       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
405         VLReLUMicrokernelTester()
406           .batch_size(batch_size)
407           .input_zero_point(150)
408           .output_zero_point(output_zero_point)
409           .Test(xnn_qu8_vlrelu_ukernel__sse2_x16, xnn_init_qu8_lrelu_sse2_params);
410       }
411     }
412   }
413 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
414 
415 
416 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__SSE2_X32,batch_eq_32)417   TEST(QU8_VLRELU__SSE2_X32, batch_eq_32) {
418     TEST_REQUIRES_X86_SSE2;
419     VLReLUMicrokernelTester()
420       .batch_size(32)
421       .input_zero_point(150)
422       .output_zero_point(100)
423       .Test(xnn_qu8_vlrelu_ukernel__sse2_x32, xnn_init_qu8_lrelu_sse2_params);
424   }
425 
TEST(QU8_VLRELU__SSE2_X32,batch_div_32)426   TEST(QU8_VLRELU__SSE2_X32, batch_div_32) {
427     TEST_REQUIRES_X86_SSE2;
428     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
429       VLReLUMicrokernelTester()
430         .batch_size(batch_size)
431         .input_zero_point(150)
432         .output_zero_point(100)
433         .Test(xnn_qu8_vlrelu_ukernel__sse2_x32, xnn_init_qu8_lrelu_sse2_params);
434     }
435   }
436 
TEST(QU8_VLRELU__SSE2_X32,batch_lt_32)437   TEST(QU8_VLRELU__SSE2_X32, batch_lt_32) {
438     TEST_REQUIRES_X86_SSE2;
439     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
440       VLReLUMicrokernelTester()
441         .batch_size(batch_size)
442         .input_zero_point(150)
443         .output_zero_point(100)
444         .Test(xnn_qu8_vlrelu_ukernel__sse2_x32, xnn_init_qu8_lrelu_sse2_params);
445     }
446   }
447 
TEST(QU8_VLRELU__SSE2_X32,batch_gt_32)448   TEST(QU8_VLRELU__SSE2_X32, batch_gt_32) {
449     TEST_REQUIRES_X86_SSE2;
450     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
451       VLReLUMicrokernelTester()
452         .batch_size(batch_size)
453         .input_zero_point(150)
454         .output_zero_point(100)
455         .Test(xnn_qu8_vlrelu_ukernel__sse2_x32, xnn_init_qu8_lrelu_sse2_params);
456     }
457   }
458 
TEST(QU8_VLRELU__SSE2_X32,positive_scale)459   TEST(QU8_VLRELU__SSE2_X32, positive_scale) {
460     TEST_REQUIRES_X86_SSE2;
461     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
462       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
463         VLReLUMicrokernelTester()
464           .batch_size(batch_size)
465           .positive_scale(positive_scale)
466           .input_zero_point(150)
467           .output_zero_point(100)
468           .Test(xnn_qu8_vlrelu_ukernel__sse2_x32, xnn_init_qu8_lrelu_sse2_params);
469         }
470     }
471   }
472 
TEST(QU8_VLRELU__SSE2_X32,negative_scale)473   TEST(QU8_VLRELU__SSE2_X32, negative_scale) {
474     TEST_REQUIRES_X86_SSE2;
475     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
476       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
477         VLReLUMicrokernelTester()
478           .batch_size(batch_size)
479           .negative_scale(negative_scale)
480           .input_zero_point(150)
481           .output_zero_point(100)
482           .Test(xnn_qu8_vlrelu_ukernel__sse2_x32, xnn_init_qu8_lrelu_sse2_params);
483         }
484     }
485   }
486 
TEST(QU8_VLRELU__SSE2_X32,input_zero_point)487   TEST(QU8_VLRELU__SSE2_X32, input_zero_point) {
488     TEST_REQUIRES_X86_SSE2;
489     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
490       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
491         VLReLUMicrokernelTester()
492           .batch_size(batch_size)
493           .input_zero_point(input_zero_point)
494           .output_zero_point(100)
495           .Test(xnn_qu8_vlrelu_ukernel__sse2_x32, xnn_init_qu8_lrelu_sse2_params);
496       }
497     }
498   }
499 
TEST(QU8_VLRELU__SSE2_X32,output_zero_point)500   TEST(QU8_VLRELU__SSE2_X32, output_zero_point) {
501     TEST_REQUIRES_X86_SSE2;
502     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
503       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
504         VLReLUMicrokernelTester()
505           .batch_size(batch_size)
506           .input_zero_point(150)
507           .output_zero_point(output_zero_point)
508           .Test(xnn_qu8_vlrelu_ukernel__sse2_x32, xnn_init_qu8_lrelu_sse2_params);
509       }
510     }
511   }
512 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
513 
514 
515 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__SSSE3_X16,batch_eq_16)516   TEST(QU8_VLRELU__SSSE3_X16, batch_eq_16) {
517     TEST_REQUIRES_X86_SSSE3;
518     VLReLUMicrokernelTester()
519       .batch_size(16)
520       .input_zero_point(150)
521       .output_zero_point(100)
522       .Test(xnn_qu8_vlrelu_ukernel__ssse3_x16, xnn_init_qu8_lrelu_sse2_params);
523   }
524 
TEST(QU8_VLRELU__SSSE3_X16,batch_div_16)525   TEST(QU8_VLRELU__SSSE3_X16, batch_div_16) {
526     TEST_REQUIRES_X86_SSSE3;
527     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
528       VLReLUMicrokernelTester()
529         .batch_size(batch_size)
530         .input_zero_point(150)
531         .output_zero_point(100)
532         .Test(xnn_qu8_vlrelu_ukernel__ssse3_x16, xnn_init_qu8_lrelu_sse2_params);
533     }
534   }
535 
TEST(QU8_VLRELU__SSSE3_X16,batch_lt_16)536   TEST(QU8_VLRELU__SSSE3_X16, batch_lt_16) {
537     TEST_REQUIRES_X86_SSSE3;
538     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
539       VLReLUMicrokernelTester()
540         .batch_size(batch_size)
541         .input_zero_point(150)
542         .output_zero_point(100)
543         .Test(xnn_qu8_vlrelu_ukernel__ssse3_x16, xnn_init_qu8_lrelu_sse2_params);
544     }
545   }
546 
TEST(QU8_VLRELU__SSSE3_X16,batch_gt_16)547   TEST(QU8_VLRELU__SSSE3_X16, batch_gt_16) {
548     TEST_REQUIRES_X86_SSSE3;
549     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
550       VLReLUMicrokernelTester()
551         .batch_size(batch_size)
552         .input_zero_point(150)
553         .output_zero_point(100)
554         .Test(xnn_qu8_vlrelu_ukernel__ssse3_x16, xnn_init_qu8_lrelu_sse2_params);
555     }
556   }
557 
TEST(QU8_VLRELU__SSSE3_X16,positive_scale)558   TEST(QU8_VLRELU__SSSE3_X16, positive_scale) {
559     TEST_REQUIRES_X86_SSSE3;
560     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
561       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
562         VLReLUMicrokernelTester()
563           .batch_size(batch_size)
564           .positive_scale(positive_scale)
565           .input_zero_point(150)
566           .output_zero_point(100)
567           .Test(xnn_qu8_vlrelu_ukernel__ssse3_x16, xnn_init_qu8_lrelu_sse2_params);
568         }
569     }
570   }
571 
TEST(QU8_VLRELU__SSSE3_X16,negative_scale)572   TEST(QU8_VLRELU__SSSE3_X16, negative_scale) {
573     TEST_REQUIRES_X86_SSSE3;
574     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
575       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
576         VLReLUMicrokernelTester()
577           .batch_size(batch_size)
578           .negative_scale(negative_scale)
579           .input_zero_point(150)
580           .output_zero_point(100)
581           .Test(xnn_qu8_vlrelu_ukernel__ssse3_x16, xnn_init_qu8_lrelu_sse2_params);
582         }
583     }
584   }
585 
TEST(QU8_VLRELU__SSSE3_X16,input_zero_point)586   TEST(QU8_VLRELU__SSSE3_X16, input_zero_point) {
587     TEST_REQUIRES_X86_SSSE3;
588     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
589       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
590         VLReLUMicrokernelTester()
591           .batch_size(batch_size)
592           .input_zero_point(input_zero_point)
593           .output_zero_point(100)
594           .Test(xnn_qu8_vlrelu_ukernel__ssse3_x16, xnn_init_qu8_lrelu_sse2_params);
595       }
596     }
597   }
598 
TEST(QU8_VLRELU__SSSE3_X16,output_zero_point)599   TEST(QU8_VLRELU__SSSE3_X16, output_zero_point) {
600     TEST_REQUIRES_X86_SSSE3;
601     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
602       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
603         VLReLUMicrokernelTester()
604           .batch_size(batch_size)
605           .input_zero_point(150)
606           .output_zero_point(output_zero_point)
607           .Test(xnn_qu8_vlrelu_ukernel__ssse3_x16, xnn_init_qu8_lrelu_sse2_params);
608       }
609     }
610   }
611 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
612 
613 
614 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__SSSE3_X32,batch_eq_32)615   TEST(QU8_VLRELU__SSSE3_X32, batch_eq_32) {
616     TEST_REQUIRES_X86_SSSE3;
617     VLReLUMicrokernelTester()
618       .batch_size(32)
619       .input_zero_point(150)
620       .output_zero_point(100)
621       .Test(xnn_qu8_vlrelu_ukernel__ssse3_x32, xnn_init_qu8_lrelu_sse2_params);
622   }
623 
TEST(QU8_VLRELU__SSSE3_X32,batch_div_32)624   TEST(QU8_VLRELU__SSSE3_X32, batch_div_32) {
625     TEST_REQUIRES_X86_SSSE3;
626     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
627       VLReLUMicrokernelTester()
628         .batch_size(batch_size)
629         .input_zero_point(150)
630         .output_zero_point(100)
631         .Test(xnn_qu8_vlrelu_ukernel__ssse3_x32, xnn_init_qu8_lrelu_sse2_params);
632     }
633   }
634 
TEST(QU8_VLRELU__SSSE3_X32,batch_lt_32)635   TEST(QU8_VLRELU__SSSE3_X32, batch_lt_32) {
636     TEST_REQUIRES_X86_SSSE3;
637     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
638       VLReLUMicrokernelTester()
639         .batch_size(batch_size)
640         .input_zero_point(150)
641         .output_zero_point(100)
642         .Test(xnn_qu8_vlrelu_ukernel__ssse3_x32, xnn_init_qu8_lrelu_sse2_params);
643     }
644   }
645 
TEST(QU8_VLRELU__SSSE3_X32,batch_gt_32)646   TEST(QU8_VLRELU__SSSE3_X32, batch_gt_32) {
647     TEST_REQUIRES_X86_SSSE3;
648     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
649       VLReLUMicrokernelTester()
650         .batch_size(batch_size)
651         .input_zero_point(150)
652         .output_zero_point(100)
653         .Test(xnn_qu8_vlrelu_ukernel__ssse3_x32, xnn_init_qu8_lrelu_sse2_params);
654     }
655   }
656 
TEST(QU8_VLRELU__SSSE3_X32,positive_scale)657   TEST(QU8_VLRELU__SSSE3_X32, positive_scale) {
658     TEST_REQUIRES_X86_SSSE3;
659     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
660       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
661         VLReLUMicrokernelTester()
662           .batch_size(batch_size)
663           .positive_scale(positive_scale)
664           .input_zero_point(150)
665           .output_zero_point(100)
666           .Test(xnn_qu8_vlrelu_ukernel__ssse3_x32, xnn_init_qu8_lrelu_sse2_params);
667         }
668     }
669   }
670 
TEST(QU8_VLRELU__SSSE3_X32,negative_scale)671   TEST(QU8_VLRELU__SSSE3_X32, negative_scale) {
672     TEST_REQUIRES_X86_SSSE3;
673     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
674       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
675         VLReLUMicrokernelTester()
676           .batch_size(batch_size)
677           .negative_scale(negative_scale)
678           .input_zero_point(150)
679           .output_zero_point(100)
680           .Test(xnn_qu8_vlrelu_ukernel__ssse3_x32, xnn_init_qu8_lrelu_sse2_params);
681         }
682     }
683   }
684 
TEST(QU8_VLRELU__SSSE3_X32,input_zero_point)685   TEST(QU8_VLRELU__SSSE3_X32, input_zero_point) {
686     TEST_REQUIRES_X86_SSSE3;
687     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
688       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
689         VLReLUMicrokernelTester()
690           .batch_size(batch_size)
691           .input_zero_point(input_zero_point)
692           .output_zero_point(100)
693           .Test(xnn_qu8_vlrelu_ukernel__ssse3_x32, xnn_init_qu8_lrelu_sse2_params);
694       }
695     }
696   }
697 
TEST(QU8_VLRELU__SSSE3_X32,output_zero_point)698   TEST(QU8_VLRELU__SSSE3_X32, output_zero_point) {
699     TEST_REQUIRES_X86_SSSE3;
700     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
701       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
702         VLReLUMicrokernelTester()
703           .batch_size(batch_size)
704           .input_zero_point(150)
705           .output_zero_point(output_zero_point)
706           .Test(xnn_qu8_vlrelu_ukernel__ssse3_x32, xnn_init_qu8_lrelu_sse2_params);
707       }
708     }
709   }
710 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
711 
712 
713 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__SSE41_X8,batch_eq_8)714   TEST(QU8_VLRELU__SSE41_X8, batch_eq_8) {
715     TEST_REQUIRES_X86_SSE41;
716     VLReLUMicrokernelTester()
717       .batch_size(8)
718       .input_zero_point(150)
719       .output_zero_point(100)
720       .Test(xnn_qu8_vlrelu_ukernel__sse41_x8, xnn_init_qu8_lrelu_sse2_params);
721   }
722 
TEST(QU8_VLRELU__SSE41_X8,batch_div_8)723   TEST(QU8_VLRELU__SSE41_X8, batch_div_8) {
724     TEST_REQUIRES_X86_SSE41;
725     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
726       VLReLUMicrokernelTester()
727         .batch_size(batch_size)
728         .input_zero_point(150)
729         .output_zero_point(100)
730         .Test(xnn_qu8_vlrelu_ukernel__sse41_x8, xnn_init_qu8_lrelu_sse2_params);
731     }
732   }
733 
TEST(QU8_VLRELU__SSE41_X8,batch_lt_8)734   TEST(QU8_VLRELU__SSE41_X8, batch_lt_8) {
735     TEST_REQUIRES_X86_SSE41;
736     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
737       VLReLUMicrokernelTester()
738         .batch_size(batch_size)
739         .input_zero_point(150)
740         .output_zero_point(100)
741         .Test(xnn_qu8_vlrelu_ukernel__sse41_x8, xnn_init_qu8_lrelu_sse2_params);
742     }
743   }
744 
TEST(QU8_VLRELU__SSE41_X8,batch_gt_8)745   TEST(QU8_VLRELU__SSE41_X8, batch_gt_8) {
746     TEST_REQUIRES_X86_SSE41;
747     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
748       VLReLUMicrokernelTester()
749         .batch_size(batch_size)
750         .input_zero_point(150)
751         .output_zero_point(100)
752         .Test(xnn_qu8_vlrelu_ukernel__sse41_x8, xnn_init_qu8_lrelu_sse2_params);
753     }
754   }
755 
TEST(QU8_VLRELU__SSE41_X8,positive_scale)756   TEST(QU8_VLRELU__SSE41_X8, positive_scale) {
757     TEST_REQUIRES_X86_SSE41;
758     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
759       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
760         VLReLUMicrokernelTester()
761           .batch_size(batch_size)
762           .positive_scale(positive_scale)
763           .input_zero_point(150)
764           .output_zero_point(100)
765           .Test(xnn_qu8_vlrelu_ukernel__sse41_x8, xnn_init_qu8_lrelu_sse2_params);
766         }
767     }
768   }
769 
TEST(QU8_VLRELU__SSE41_X8,negative_scale)770   TEST(QU8_VLRELU__SSE41_X8, negative_scale) {
771     TEST_REQUIRES_X86_SSE41;
772     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
773       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
774         VLReLUMicrokernelTester()
775           .batch_size(batch_size)
776           .negative_scale(negative_scale)
777           .input_zero_point(150)
778           .output_zero_point(100)
779           .Test(xnn_qu8_vlrelu_ukernel__sse41_x8, xnn_init_qu8_lrelu_sse2_params);
780         }
781     }
782   }
783 
TEST(QU8_VLRELU__SSE41_X8,input_zero_point)784   TEST(QU8_VLRELU__SSE41_X8, input_zero_point) {
785     TEST_REQUIRES_X86_SSE41;
786     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
787       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
788         VLReLUMicrokernelTester()
789           .batch_size(batch_size)
790           .input_zero_point(input_zero_point)
791           .output_zero_point(100)
792           .Test(xnn_qu8_vlrelu_ukernel__sse41_x8, xnn_init_qu8_lrelu_sse2_params);
793       }
794     }
795   }
796 
TEST(QU8_VLRELU__SSE41_X8,output_zero_point)797   TEST(QU8_VLRELU__SSE41_X8, output_zero_point) {
798     TEST_REQUIRES_X86_SSE41;
799     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
800       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
801         VLReLUMicrokernelTester()
802           .batch_size(batch_size)
803           .input_zero_point(150)
804           .output_zero_point(output_zero_point)
805           .Test(xnn_qu8_vlrelu_ukernel__sse41_x8, xnn_init_qu8_lrelu_sse2_params);
806       }
807     }
808   }
809 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
810 
811 
812 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__SSE41_X16,batch_eq_16)813   TEST(QU8_VLRELU__SSE41_X16, batch_eq_16) {
814     TEST_REQUIRES_X86_SSE41;
815     VLReLUMicrokernelTester()
816       .batch_size(16)
817       .input_zero_point(150)
818       .output_zero_point(100)
819       .Test(xnn_qu8_vlrelu_ukernel__sse41_x16, xnn_init_qu8_lrelu_sse2_params);
820   }
821 
TEST(QU8_VLRELU__SSE41_X16,batch_div_16)822   TEST(QU8_VLRELU__SSE41_X16, batch_div_16) {
823     TEST_REQUIRES_X86_SSE41;
824     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
825       VLReLUMicrokernelTester()
826         .batch_size(batch_size)
827         .input_zero_point(150)
828         .output_zero_point(100)
829         .Test(xnn_qu8_vlrelu_ukernel__sse41_x16, xnn_init_qu8_lrelu_sse2_params);
830     }
831   }
832 
TEST(QU8_VLRELU__SSE41_X16,batch_lt_16)833   TEST(QU8_VLRELU__SSE41_X16, batch_lt_16) {
834     TEST_REQUIRES_X86_SSE41;
835     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
836       VLReLUMicrokernelTester()
837         .batch_size(batch_size)
838         .input_zero_point(150)
839         .output_zero_point(100)
840         .Test(xnn_qu8_vlrelu_ukernel__sse41_x16, xnn_init_qu8_lrelu_sse2_params);
841     }
842   }
843 
TEST(QU8_VLRELU__SSE41_X16,batch_gt_16)844   TEST(QU8_VLRELU__SSE41_X16, batch_gt_16) {
845     TEST_REQUIRES_X86_SSE41;
846     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
847       VLReLUMicrokernelTester()
848         .batch_size(batch_size)
849         .input_zero_point(150)
850         .output_zero_point(100)
851         .Test(xnn_qu8_vlrelu_ukernel__sse41_x16, xnn_init_qu8_lrelu_sse2_params);
852     }
853   }
854 
TEST(QU8_VLRELU__SSE41_X16,positive_scale)855   TEST(QU8_VLRELU__SSE41_X16, positive_scale) {
856     TEST_REQUIRES_X86_SSE41;
857     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
858       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
859         VLReLUMicrokernelTester()
860           .batch_size(batch_size)
861           .positive_scale(positive_scale)
862           .input_zero_point(150)
863           .output_zero_point(100)
864           .Test(xnn_qu8_vlrelu_ukernel__sse41_x16, xnn_init_qu8_lrelu_sse2_params);
865         }
866     }
867   }
868 
TEST(QU8_VLRELU__SSE41_X16,negative_scale)869   TEST(QU8_VLRELU__SSE41_X16, negative_scale) {
870     TEST_REQUIRES_X86_SSE41;
871     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
872       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
873         VLReLUMicrokernelTester()
874           .batch_size(batch_size)
875           .negative_scale(negative_scale)
876           .input_zero_point(150)
877           .output_zero_point(100)
878           .Test(xnn_qu8_vlrelu_ukernel__sse41_x16, xnn_init_qu8_lrelu_sse2_params);
879         }
880     }
881   }
882 
TEST(QU8_VLRELU__SSE41_X16,input_zero_point)883   TEST(QU8_VLRELU__SSE41_X16, input_zero_point) {
884     TEST_REQUIRES_X86_SSE41;
885     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
886       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
887         VLReLUMicrokernelTester()
888           .batch_size(batch_size)
889           .input_zero_point(input_zero_point)
890           .output_zero_point(100)
891           .Test(xnn_qu8_vlrelu_ukernel__sse41_x16, xnn_init_qu8_lrelu_sse2_params);
892       }
893     }
894   }
895 
TEST(QU8_VLRELU__SSE41_X16,output_zero_point)896   TEST(QU8_VLRELU__SSE41_X16, output_zero_point) {
897     TEST_REQUIRES_X86_SSE41;
898     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
899       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
900         VLReLUMicrokernelTester()
901           .batch_size(batch_size)
902           .input_zero_point(150)
903           .output_zero_point(output_zero_point)
904           .Test(xnn_qu8_vlrelu_ukernel__sse41_x16, xnn_init_qu8_lrelu_sse2_params);
905       }
906     }
907   }
908 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
909 
910 
911 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__SSE41_X32,batch_eq_32)912   TEST(QU8_VLRELU__SSE41_X32, batch_eq_32) {
913     TEST_REQUIRES_X86_SSE41;
914     VLReLUMicrokernelTester()
915       .batch_size(32)
916       .input_zero_point(150)
917       .output_zero_point(100)
918       .Test(xnn_qu8_vlrelu_ukernel__sse41_x32, xnn_init_qu8_lrelu_sse2_params);
919   }
920 
TEST(QU8_VLRELU__SSE41_X32,batch_div_32)921   TEST(QU8_VLRELU__SSE41_X32, batch_div_32) {
922     TEST_REQUIRES_X86_SSE41;
923     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
924       VLReLUMicrokernelTester()
925         .batch_size(batch_size)
926         .input_zero_point(150)
927         .output_zero_point(100)
928         .Test(xnn_qu8_vlrelu_ukernel__sse41_x32, xnn_init_qu8_lrelu_sse2_params);
929     }
930   }
931 
TEST(QU8_VLRELU__SSE41_X32,batch_lt_32)932   TEST(QU8_VLRELU__SSE41_X32, batch_lt_32) {
933     TEST_REQUIRES_X86_SSE41;
934     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
935       VLReLUMicrokernelTester()
936         .batch_size(batch_size)
937         .input_zero_point(150)
938         .output_zero_point(100)
939         .Test(xnn_qu8_vlrelu_ukernel__sse41_x32, xnn_init_qu8_lrelu_sse2_params);
940     }
941   }
942 
TEST(QU8_VLRELU__SSE41_X32,batch_gt_32)943   TEST(QU8_VLRELU__SSE41_X32, batch_gt_32) {
944     TEST_REQUIRES_X86_SSE41;
945     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
946       VLReLUMicrokernelTester()
947         .batch_size(batch_size)
948         .input_zero_point(150)
949         .output_zero_point(100)
950         .Test(xnn_qu8_vlrelu_ukernel__sse41_x32, xnn_init_qu8_lrelu_sse2_params);
951     }
952   }
953 
TEST(QU8_VLRELU__SSE41_X32,positive_scale)954   TEST(QU8_VLRELU__SSE41_X32, positive_scale) {
955     TEST_REQUIRES_X86_SSE41;
956     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
957       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
958         VLReLUMicrokernelTester()
959           .batch_size(batch_size)
960           .positive_scale(positive_scale)
961           .input_zero_point(150)
962           .output_zero_point(100)
963           .Test(xnn_qu8_vlrelu_ukernel__sse41_x32, xnn_init_qu8_lrelu_sse2_params);
964         }
965     }
966   }
967 
TEST(QU8_VLRELU__SSE41_X32,negative_scale)968   TEST(QU8_VLRELU__SSE41_X32, negative_scale) {
969     TEST_REQUIRES_X86_SSE41;
970     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
971       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
972         VLReLUMicrokernelTester()
973           .batch_size(batch_size)
974           .negative_scale(negative_scale)
975           .input_zero_point(150)
976           .output_zero_point(100)
977           .Test(xnn_qu8_vlrelu_ukernel__sse41_x32, xnn_init_qu8_lrelu_sse2_params);
978         }
979     }
980   }
981 
TEST(QU8_VLRELU__SSE41_X32,input_zero_point)982   TEST(QU8_VLRELU__SSE41_X32, input_zero_point) {
983     TEST_REQUIRES_X86_SSE41;
984     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
985       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
986         VLReLUMicrokernelTester()
987           .batch_size(batch_size)
988           .input_zero_point(input_zero_point)
989           .output_zero_point(100)
990           .Test(xnn_qu8_vlrelu_ukernel__sse41_x32, xnn_init_qu8_lrelu_sse2_params);
991       }
992     }
993   }
994 
TEST(QU8_VLRELU__SSE41_X32,output_zero_point)995   TEST(QU8_VLRELU__SSE41_X32, output_zero_point) {
996     TEST_REQUIRES_X86_SSE41;
997     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
998       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
999         VLReLUMicrokernelTester()
1000           .batch_size(batch_size)
1001           .input_zero_point(150)
1002           .output_zero_point(output_zero_point)
1003           .Test(xnn_qu8_vlrelu_ukernel__sse41_x32, xnn_init_qu8_lrelu_sse2_params);
1004       }
1005     }
1006   }
1007 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
1008 
1009 
1010 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__AVX_X8,batch_eq_8)1011   TEST(QU8_VLRELU__AVX_X8, batch_eq_8) {
1012     TEST_REQUIRES_X86_AVX;
1013     VLReLUMicrokernelTester()
1014       .batch_size(8)
1015       .input_zero_point(150)
1016       .output_zero_point(100)
1017       .Test(xnn_qu8_vlrelu_ukernel__avx_x8, xnn_init_qu8_lrelu_avx_params);
1018   }
1019 
TEST(QU8_VLRELU__AVX_X8,batch_div_8)1020   TEST(QU8_VLRELU__AVX_X8, batch_div_8) {
1021     TEST_REQUIRES_X86_AVX;
1022     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
1023       VLReLUMicrokernelTester()
1024         .batch_size(batch_size)
1025         .input_zero_point(150)
1026         .output_zero_point(100)
1027         .Test(xnn_qu8_vlrelu_ukernel__avx_x8, xnn_init_qu8_lrelu_avx_params);
1028     }
1029   }
1030 
TEST(QU8_VLRELU__AVX_X8,batch_lt_8)1031   TEST(QU8_VLRELU__AVX_X8, batch_lt_8) {
1032     TEST_REQUIRES_X86_AVX;
1033     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
1034       VLReLUMicrokernelTester()
1035         .batch_size(batch_size)
1036         .input_zero_point(150)
1037         .output_zero_point(100)
1038         .Test(xnn_qu8_vlrelu_ukernel__avx_x8, xnn_init_qu8_lrelu_avx_params);
1039     }
1040   }
1041 
TEST(QU8_VLRELU__AVX_X8,batch_gt_8)1042   TEST(QU8_VLRELU__AVX_X8, batch_gt_8) {
1043     TEST_REQUIRES_X86_AVX;
1044     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
1045       VLReLUMicrokernelTester()
1046         .batch_size(batch_size)
1047         .input_zero_point(150)
1048         .output_zero_point(100)
1049         .Test(xnn_qu8_vlrelu_ukernel__avx_x8, xnn_init_qu8_lrelu_avx_params);
1050     }
1051   }
1052 
TEST(QU8_VLRELU__AVX_X8,positive_scale)1053   TEST(QU8_VLRELU__AVX_X8, positive_scale) {
1054     TEST_REQUIRES_X86_AVX;
1055     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
1056       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1057         VLReLUMicrokernelTester()
1058           .batch_size(batch_size)
1059           .positive_scale(positive_scale)
1060           .input_zero_point(150)
1061           .output_zero_point(100)
1062           .Test(xnn_qu8_vlrelu_ukernel__avx_x8, xnn_init_qu8_lrelu_avx_params);
1063         }
1064     }
1065   }
1066 
TEST(QU8_VLRELU__AVX_X8,negative_scale)1067   TEST(QU8_VLRELU__AVX_X8, negative_scale) {
1068     TEST_REQUIRES_X86_AVX;
1069     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
1070       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1071         VLReLUMicrokernelTester()
1072           .batch_size(batch_size)
1073           .negative_scale(negative_scale)
1074           .input_zero_point(150)
1075           .output_zero_point(100)
1076           .Test(xnn_qu8_vlrelu_ukernel__avx_x8, xnn_init_qu8_lrelu_avx_params);
1077         }
1078     }
1079   }
1080 
TEST(QU8_VLRELU__AVX_X8,input_zero_point)1081   TEST(QU8_VLRELU__AVX_X8, input_zero_point) {
1082     TEST_REQUIRES_X86_AVX;
1083     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1084       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
1085         VLReLUMicrokernelTester()
1086           .batch_size(batch_size)
1087           .input_zero_point(input_zero_point)
1088           .output_zero_point(100)
1089           .Test(xnn_qu8_vlrelu_ukernel__avx_x8, xnn_init_qu8_lrelu_avx_params);
1090       }
1091     }
1092   }
1093 
TEST(QU8_VLRELU__AVX_X8,output_zero_point)1094   TEST(QU8_VLRELU__AVX_X8, output_zero_point) {
1095     TEST_REQUIRES_X86_AVX;
1096     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1097       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
1098         VLReLUMicrokernelTester()
1099           .batch_size(batch_size)
1100           .input_zero_point(150)
1101           .output_zero_point(output_zero_point)
1102           .Test(xnn_qu8_vlrelu_ukernel__avx_x8, xnn_init_qu8_lrelu_avx_params);
1103       }
1104     }
1105   }
1106 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
1107 
1108 
1109 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__AVX_X16,batch_eq_16)1110   TEST(QU8_VLRELU__AVX_X16, batch_eq_16) {
1111     TEST_REQUIRES_X86_AVX;
1112     VLReLUMicrokernelTester()
1113       .batch_size(16)
1114       .input_zero_point(150)
1115       .output_zero_point(100)
1116       .Test(xnn_qu8_vlrelu_ukernel__avx_x16, xnn_init_qu8_lrelu_avx_params);
1117   }
1118 
TEST(QU8_VLRELU__AVX_X16,batch_div_16)1119   TEST(QU8_VLRELU__AVX_X16, batch_div_16) {
1120     TEST_REQUIRES_X86_AVX;
1121     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
1122       VLReLUMicrokernelTester()
1123         .batch_size(batch_size)
1124         .input_zero_point(150)
1125         .output_zero_point(100)
1126         .Test(xnn_qu8_vlrelu_ukernel__avx_x16, xnn_init_qu8_lrelu_avx_params);
1127     }
1128   }
1129 
TEST(QU8_VLRELU__AVX_X16,batch_lt_16)1130   TEST(QU8_VLRELU__AVX_X16, batch_lt_16) {
1131     TEST_REQUIRES_X86_AVX;
1132     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
1133       VLReLUMicrokernelTester()
1134         .batch_size(batch_size)
1135         .input_zero_point(150)
1136         .output_zero_point(100)
1137         .Test(xnn_qu8_vlrelu_ukernel__avx_x16, xnn_init_qu8_lrelu_avx_params);
1138     }
1139   }
1140 
TEST(QU8_VLRELU__AVX_X16,batch_gt_16)1141   TEST(QU8_VLRELU__AVX_X16, batch_gt_16) {
1142     TEST_REQUIRES_X86_AVX;
1143     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
1144       VLReLUMicrokernelTester()
1145         .batch_size(batch_size)
1146         .input_zero_point(150)
1147         .output_zero_point(100)
1148         .Test(xnn_qu8_vlrelu_ukernel__avx_x16, xnn_init_qu8_lrelu_avx_params);
1149     }
1150   }
1151 
TEST(QU8_VLRELU__AVX_X16,positive_scale)1152   TEST(QU8_VLRELU__AVX_X16, positive_scale) {
1153     TEST_REQUIRES_X86_AVX;
1154     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1155       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1156         VLReLUMicrokernelTester()
1157           .batch_size(batch_size)
1158           .positive_scale(positive_scale)
1159           .input_zero_point(150)
1160           .output_zero_point(100)
1161           .Test(xnn_qu8_vlrelu_ukernel__avx_x16, xnn_init_qu8_lrelu_avx_params);
1162         }
1163     }
1164   }
1165 
TEST(QU8_VLRELU__AVX_X16,negative_scale)1166   TEST(QU8_VLRELU__AVX_X16, negative_scale) {
1167     TEST_REQUIRES_X86_AVX;
1168     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1169       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1170         VLReLUMicrokernelTester()
1171           .batch_size(batch_size)
1172           .negative_scale(negative_scale)
1173           .input_zero_point(150)
1174           .output_zero_point(100)
1175           .Test(xnn_qu8_vlrelu_ukernel__avx_x16, xnn_init_qu8_lrelu_avx_params);
1176         }
1177     }
1178   }
1179 
TEST(QU8_VLRELU__AVX_X16,input_zero_point)1180   TEST(QU8_VLRELU__AVX_X16, input_zero_point) {
1181     TEST_REQUIRES_X86_AVX;
1182     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1183       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1184         VLReLUMicrokernelTester()
1185           .batch_size(batch_size)
1186           .input_zero_point(input_zero_point)
1187           .output_zero_point(100)
1188           .Test(xnn_qu8_vlrelu_ukernel__avx_x16, xnn_init_qu8_lrelu_avx_params);
1189       }
1190     }
1191   }
1192 
TEST(QU8_VLRELU__AVX_X16,output_zero_point)1193   TEST(QU8_VLRELU__AVX_X16, output_zero_point) {
1194     TEST_REQUIRES_X86_AVX;
1195     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1196       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1197         VLReLUMicrokernelTester()
1198           .batch_size(batch_size)
1199           .input_zero_point(150)
1200           .output_zero_point(output_zero_point)
1201           .Test(xnn_qu8_vlrelu_ukernel__avx_x16, xnn_init_qu8_lrelu_avx_params);
1202       }
1203     }
1204   }
1205 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
1206 
1207 
1208 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__AVX_X32,batch_eq_32)1209   TEST(QU8_VLRELU__AVX_X32, batch_eq_32) {
1210     TEST_REQUIRES_X86_AVX;
1211     VLReLUMicrokernelTester()
1212       .batch_size(32)
1213       .input_zero_point(150)
1214       .output_zero_point(100)
1215       .Test(xnn_qu8_vlrelu_ukernel__avx_x32, xnn_init_qu8_lrelu_avx_params);
1216   }
1217 
TEST(QU8_VLRELU__AVX_X32,batch_div_32)1218   TEST(QU8_VLRELU__AVX_X32, batch_div_32) {
1219     TEST_REQUIRES_X86_AVX;
1220     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
1221       VLReLUMicrokernelTester()
1222         .batch_size(batch_size)
1223         .input_zero_point(150)
1224         .output_zero_point(100)
1225         .Test(xnn_qu8_vlrelu_ukernel__avx_x32, xnn_init_qu8_lrelu_avx_params);
1226     }
1227   }
1228 
TEST(QU8_VLRELU__AVX_X32,batch_lt_32)1229   TEST(QU8_VLRELU__AVX_X32, batch_lt_32) {
1230     TEST_REQUIRES_X86_AVX;
1231     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
1232       VLReLUMicrokernelTester()
1233         .batch_size(batch_size)
1234         .input_zero_point(150)
1235         .output_zero_point(100)
1236         .Test(xnn_qu8_vlrelu_ukernel__avx_x32, xnn_init_qu8_lrelu_avx_params);
1237     }
1238   }
1239 
TEST(QU8_VLRELU__AVX_X32,batch_gt_32)1240   TEST(QU8_VLRELU__AVX_X32, batch_gt_32) {
1241     TEST_REQUIRES_X86_AVX;
1242     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
1243       VLReLUMicrokernelTester()
1244         .batch_size(batch_size)
1245         .input_zero_point(150)
1246         .output_zero_point(100)
1247         .Test(xnn_qu8_vlrelu_ukernel__avx_x32, xnn_init_qu8_lrelu_avx_params);
1248     }
1249   }
1250 
TEST(QU8_VLRELU__AVX_X32,positive_scale)1251   TEST(QU8_VLRELU__AVX_X32, positive_scale) {
1252     TEST_REQUIRES_X86_AVX;
1253     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1254       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1255         VLReLUMicrokernelTester()
1256           .batch_size(batch_size)
1257           .positive_scale(positive_scale)
1258           .input_zero_point(150)
1259           .output_zero_point(100)
1260           .Test(xnn_qu8_vlrelu_ukernel__avx_x32, xnn_init_qu8_lrelu_avx_params);
1261         }
1262     }
1263   }
1264 
TEST(QU8_VLRELU__AVX_X32,negative_scale)1265   TEST(QU8_VLRELU__AVX_X32, negative_scale) {
1266     TEST_REQUIRES_X86_AVX;
1267     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1268       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1269         VLReLUMicrokernelTester()
1270           .batch_size(batch_size)
1271           .negative_scale(negative_scale)
1272           .input_zero_point(150)
1273           .output_zero_point(100)
1274           .Test(xnn_qu8_vlrelu_ukernel__avx_x32, xnn_init_qu8_lrelu_avx_params);
1275         }
1276     }
1277   }
1278 
TEST(QU8_VLRELU__AVX_X32,input_zero_point)1279   TEST(QU8_VLRELU__AVX_X32, input_zero_point) {
1280     TEST_REQUIRES_X86_AVX;
1281     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1282       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1283         VLReLUMicrokernelTester()
1284           .batch_size(batch_size)
1285           .input_zero_point(input_zero_point)
1286           .output_zero_point(100)
1287           .Test(xnn_qu8_vlrelu_ukernel__avx_x32, xnn_init_qu8_lrelu_avx_params);
1288       }
1289     }
1290   }
1291 
TEST(QU8_VLRELU__AVX_X32,output_zero_point)1292   TEST(QU8_VLRELU__AVX_X32, output_zero_point) {
1293     TEST_REQUIRES_X86_AVX;
1294     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1295       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1296         VLReLUMicrokernelTester()
1297           .batch_size(batch_size)
1298           .input_zero_point(150)
1299           .output_zero_point(output_zero_point)
1300           .Test(xnn_qu8_vlrelu_ukernel__avx_x32, xnn_init_qu8_lrelu_avx_params);
1301       }
1302     }
1303   }
1304 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
1305 
1306 
1307 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__AVX2_X16,batch_eq_16)1308   TEST(QU8_VLRELU__AVX2_X16, batch_eq_16) {
1309     TEST_REQUIRES_X86_AVX2;
1310     VLReLUMicrokernelTester()
1311       .batch_size(16)
1312       .input_zero_point(150)
1313       .output_zero_point(100)
1314       .Test(xnn_qu8_vlrelu_ukernel__avx2_x16, xnn_init_qu8_lrelu_avx2_params);
1315   }
1316 
TEST(QU8_VLRELU__AVX2_X16,batch_div_16)1317   TEST(QU8_VLRELU__AVX2_X16, batch_div_16) {
1318     TEST_REQUIRES_X86_AVX2;
1319     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
1320       VLReLUMicrokernelTester()
1321         .batch_size(batch_size)
1322         .input_zero_point(150)
1323         .output_zero_point(100)
1324         .Test(xnn_qu8_vlrelu_ukernel__avx2_x16, xnn_init_qu8_lrelu_avx2_params);
1325     }
1326   }
1327 
TEST(QU8_VLRELU__AVX2_X16,batch_lt_16)1328   TEST(QU8_VLRELU__AVX2_X16, batch_lt_16) {
1329     TEST_REQUIRES_X86_AVX2;
1330     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
1331       VLReLUMicrokernelTester()
1332         .batch_size(batch_size)
1333         .input_zero_point(150)
1334         .output_zero_point(100)
1335         .Test(xnn_qu8_vlrelu_ukernel__avx2_x16, xnn_init_qu8_lrelu_avx2_params);
1336     }
1337   }
1338 
TEST(QU8_VLRELU__AVX2_X16,batch_gt_16)1339   TEST(QU8_VLRELU__AVX2_X16, batch_gt_16) {
1340     TEST_REQUIRES_X86_AVX2;
1341     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
1342       VLReLUMicrokernelTester()
1343         .batch_size(batch_size)
1344         .input_zero_point(150)
1345         .output_zero_point(100)
1346         .Test(xnn_qu8_vlrelu_ukernel__avx2_x16, xnn_init_qu8_lrelu_avx2_params);
1347     }
1348   }
1349 
TEST(QU8_VLRELU__AVX2_X16,positive_scale)1350   TEST(QU8_VLRELU__AVX2_X16, positive_scale) {
1351     TEST_REQUIRES_X86_AVX2;
1352     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1353       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1354         VLReLUMicrokernelTester()
1355           .batch_size(batch_size)
1356           .positive_scale(positive_scale)
1357           .input_zero_point(150)
1358           .output_zero_point(100)
1359           .Test(xnn_qu8_vlrelu_ukernel__avx2_x16, xnn_init_qu8_lrelu_avx2_params);
1360         }
1361     }
1362   }
1363 
TEST(QU8_VLRELU__AVX2_X16,negative_scale)1364   TEST(QU8_VLRELU__AVX2_X16, negative_scale) {
1365     TEST_REQUIRES_X86_AVX2;
1366     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1367       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1368         VLReLUMicrokernelTester()
1369           .batch_size(batch_size)
1370           .negative_scale(negative_scale)
1371           .input_zero_point(150)
1372           .output_zero_point(100)
1373           .Test(xnn_qu8_vlrelu_ukernel__avx2_x16, xnn_init_qu8_lrelu_avx2_params);
1374         }
1375     }
1376   }
1377 
TEST(QU8_VLRELU__AVX2_X16,input_zero_point)1378   TEST(QU8_VLRELU__AVX2_X16, input_zero_point) {
1379     TEST_REQUIRES_X86_AVX2;
1380     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1381       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1382         VLReLUMicrokernelTester()
1383           .batch_size(batch_size)
1384           .input_zero_point(input_zero_point)
1385           .output_zero_point(100)
1386           .Test(xnn_qu8_vlrelu_ukernel__avx2_x16, xnn_init_qu8_lrelu_avx2_params);
1387       }
1388     }
1389   }
1390 
TEST(QU8_VLRELU__AVX2_X16,output_zero_point)1391   TEST(QU8_VLRELU__AVX2_X16, output_zero_point) {
1392     TEST_REQUIRES_X86_AVX2;
1393     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1394       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1395         VLReLUMicrokernelTester()
1396           .batch_size(batch_size)
1397           .input_zero_point(150)
1398           .output_zero_point(output_zero_point)
1399           .Test(xnn_qu8_vlrelu_ukernel__avx2_x16, xnn_init_qu8_lrelu_avx2_params);
1400       }
1401     }
1402   }
1403 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
1404 
1405 
1406 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__AVX2_X32,batch_eq_32)1407   TEST(QU8_VLRELU__AVX2_X32, batch_eq_32) {
1408     TEST_REQUIRES_X86_AVX2;
1409     VLReLUMicrokernelTester()
1410       .batch_size(32)
1411       .input_zero_point(150)
1412       .output_zero_point(100)
1413       .Test(xnn_qu8_vlrelu_ukernel__avx2_x32, xnn_init_qu8_lrelu_avx2_params);
1414   }
1415 
TEST(QU8_VLRELU__AVX2_X32,batch_div_32)1416   TEST(QU8_VLRELU__AVX2_X32, batch_div_32) {
1417     TEST_REQUIRES_X86_AVX2;
1418     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
1419       VLReLUMicrokernelTester()
1420         .batch_size(batch_size)
1421         .input_zero_point(150)
1422         .output_zero_point(100)
1423         .Test(xnn_qu8_vlrelu_ukernel__avx2_x32, xnn_init_qu8_lrelu_avx2_params);
1424     }
1425   }
1426 
TEST(QU8_VLRELU__AVX2_X32,batch_lt_32)1427   TEST(QU8_VLRELU__AVX2_X32, batch_lt_32) {
1428     TEST_REQUIRES_X86_AVX2;
1429     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
1430       VLReLUMicrokernelTester()
1431         .batch_size(batch_size)
1432         .input_zero_point(150)
1433         .output_zero_point(100)
1434         .Test(xnn_qu8_vlrelu_ukernel__avx2_x32, xnn_init_qu8_lrelu_avx2_params);
1435     }
1436   }
1437 
TEST(QU8_VLRELU__AVX2_X32,batch_gt_32)1438   TEST(QU8_VLRELU__AVX2_X32, batch_gt_32) {
1439     TEST_REQUIRES_X86_AVX2;
1440     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
1441       VLReLUMicrokernelTester()
1442         .batch_size(batch_size)
1443         .input_zero_point(150)
1444         .output_zero_point(100)
1445         .Test(xnn_qu8_vlrelu_ukernel__avx2_x32, xnn_init_qu8_lrelu_avx2_params);
1446     }
1447   }
1448 
TEST(QU8_VLRELU__AVX2_X32,positive_scale)1449   TEST(QU8_VLRELU__AVX2_X32, positive_scale) {
1450     TEST_REQUIRES_X86_AVX2;
1451     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1452       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1453         VLReLUMicrokernelTester()
1454           .batch_size(batch_size)
1455           .positive_scale(positive_scale)
1456           .input_zero_point(150)
1457           .output_zero_point(100)
1458           .Test(xnn_qu8_vlrelu_ukernel__avx2_x32, xnn_init_qu8_lrelu_avx2_params);
1459         }
1460     }
1461   }
1462 
TEST(QU8_VLRELU__AVX2_X32,negative_scale)1463   TEST(QU8_VLRELU__AVX2_X32, negative_scale) {
1464     TEST_REQUIRES_X86_AVX2;
1465     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1466       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1467         VLReLUMicrokernelTester()
1468           .batch_size(batch_size)
1469           .negative_scale(negative_scale)
1470           .input_zero_point(150)
1471           .output_zero_point(100)
1472           .Test(xnn_qu8_vlrelu_ukernel__avx2_x32, xnn_init_qu8_lrelu_avx2_params);
1473         }
1474     }
1475   }
1476 
TEST(QU8_VLRELU__AVX2_X32,input_zero_point)1477   TEST(QU8_VLRELU__AVX2_X32, input_zero_point) {
1478     TEST_REQUIRES_X86_AVX2;
1479     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1480       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1481         VLReLUMicrokernelTester()
1482           .batch_size(batch_size)
1483           .input_zero_point(input_zero_point)
1484           .output_zero_point(100)
1485           .Test(xnn_qu8_vlrelu_ukernel__avx2_x32, xnn_init_qu8_lrelu_avx2_params);
1486       }
1487     }
1488   }
1489 
TEST(QU8_VLRELU__AVX2_X32,output_zero_point)1490   TEST(QU8_VLRELU__AVX2_X32, output_zero_point) {
1491     TEST_REQUIRES_X86_AVX2;
1492     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1493       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1494         VLReLUMicrokernelTester()
1495           .batch_size(batch_size)
1496           .input_zero_point(150)
1497           .output_zero_point(output_zero_point)
1498           .Test(xnn_qu8_vlrelu_ukernel__avx2_x32, xnn_init_qu8_lrelu_avx2_params);
1499       }
1500     }
1501   }
1502 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
1503 
1504 
1505 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(QU8_VLRELU__AVX2_X64,batch_eq_64)1506   TEST(QU8_VLRELU__AVX2_X64, batch_eq_64) {
1507     TEST_REQUIRES_X86_AVX2;
1508     VLReLUMicrokernelTester()
1509       .batch_size(64)
1510       .input_zero_point(150)
1511       .output_zero_point(100)
1512       .Test(xnn_qu8_vlrelu_ukernel__avx2_x64, xnn_init_qu8_lrelu_avx2_params);
1513   }
1514 
TEST(QU8_VLRELU__AVX2_X64,batch_div_64)1515   TEST(QU8_VLRELU__AVX2_X64, batch_div_64) {
1516     TEST_REQUIRES_X86_AVX2;
1517     for (size_t batch_size = 128; batch_size < 640; batch_size += 64) {
1518       VLReLUMicrokernelTester()
1519         .batch_size(batch_size)
1520         .input_zero_point(150)
1521         .output_zero_point(100)
1522         .Test(xnn_qu8_vlrelu_ukernel__avx2_x64, xnn_init_qu8_lrelu_avx2_params);
1523     }
1524   }
1525 
TEST(QU8_VLRELU__AVX2_X64,batch_lt_64)1526   TEST(QU8_VLRELU__AVX2_X64, batch_lt_64) {
1527     TEST_REQUIRES_X86_AVX2;
1528     for (size_t batch_size = 1; batch_size < 64; batch_size++) {
1529       VLReLUMicrokernelTester()
1530         .batch_size(batch_size)
1531         .input_zero_point(150)
1532         .output_zero_point(100)
1533         .Test(xnn_qu8_vlrelu_ukernel__avx2_x64, xnn_init_qu8_lrelu_avx2_params);
1534     }
1535   }
1536 
TEST(QU8_VLRELU__AVX2_X64,batch_gt_64)1537   TEST(QU8_VLRELU__AVX2_X64, batch_gt_64) {
1538     TEST_REQUIRES_X86_AVX2;
1539     for (size_t batch_size = 65; batch_size < 128; batch_size++) {
1540       VLReLUMicrokernelTester()
1541         .batch_size(batch_size)
1542         .input_zero_point(150)
1543         .output_zero_point(100)
1544         .Test(xnn_qu8_vlrelu_ukernel__avx2_x64, xnn_init_qu8_lrelu_avx2_params);
1545     }
1546   }
1547 
TEST(QU8_VLRELU__AVX2_X64,positive_scale)1548   TEST(QU8_VLRELU__AVX2_X64, positive_scale) {
1549     TEST_REQUIRES_X86_AVX2;
1550     for (size_t batch_size = 1; batch_size <= 320; batch_size += 63) {
1551       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1552         VLReLUMicrokernelTester()
1553           .batch_size(batch_size)
1554           .positive_scale(positive_scale)
1555           .input_zero_point(150)
1556           .output_zero_point(100)
1557           .Test(xnn_qu8_vlrelu_ukernel__avx2_x64, xnn_init_qu8_lrelu_avx2_params);
1558         }
1559     }
1560   }
1561 
TEST(QU8_VLRELU__AVX2_X64,negative_scale)1562   TEST(QU8_VLRELU__AVX2_X64, negative_scale) {
1563     TEST_REQUIRES_X86_AVX2;
1564     for (size_t batch_size = 1; batch_size <= 320; batch_size += 63) {
1565       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1566         VLReLUMicrokernelTester()
1567           .batch_size(batch_size)
1568           .negative_scale(negative_scale)
1569           .input_zero_point(150)
1570           .output_zero_point(100)
1571           .Test(xnn_qu8_vlrelu_ukernel__avx2_x64, xnn_init_qu8_lrelu_avx2_params);
1572         }
1573     }
1574   }
1575 
TEST(QU8_VLRELU__AVX2_X64,input_zero_point)1576   TEST(QU8_VLRELU__AVX2_X64, input_zero_point) {
1577     TEST_REQUIRES_X86_AVX2;
1578     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1579       for (size_t batch_size = 1; batch_size <= 320; batch_size += 63) {
1580         VLReLUMicrokernelTester()
1581           .batch_size(batch_size)
1582           .input_zero_point(input_zero_point)
1583           .output_zero_point(100)
1584           .Test(xnn_qu8_vlrelu_ukernel__avx2_x64, xnn_init_qu8_lrelu_avx2_params);
1585       }
1586     }
1587   }
1588 
TEST(QU8_VLRELU__AVX2_X64,output_zero_point)1589   TEST(QU8_VLRELU__AVX2_X64, output_zero_point) {
1590     TEST_REQUIRES_X86_AVX2;
1591     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1592       for (size_t batch_size = 1; batch_size <= 320; batch_size += 63) {
1593         VLReLUMicrokernelTester()
1594           .batch_size(batch_size)
1595           .input_zero_point(150)
1596           .output_zero_point(output_zero_point)
1597           .Test(xnn_qu8_vlrelu_ukernel__avx2_x64, xnn_init_qu8_lrelu_avx2_params);
1598       }
1599     }
1600   }
1601 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
1602 
1603 
1604 #if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMSIMD_ARM_X16,batch_eq_16)1605   TEST(QU8_VLRELU__WASMSIMD_ARM_X16, batch_eq_16) {
1606     VLReLUMicrokernelTester()
1607       .batch_size(16)
1608       .input_zero_point(150)
1609       .output_zero_point(100)
1610       .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1611   }
1612 
TEST(QU8_VLRELU__WASMSIMD_ARM_X16,batch_div_16)1613   TEST(QU8_VLRELU__WASMSIMD_ARM_X16, batch_div_16) {
1614     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
1615       VLReLUMicrokernelTester()
1616         .batch_size(batch_size)
1617         .input_zero_point(150)
1618         .output_zero_point(100)
1619         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1620     }
1621   }
1622 
TEST(QU8_VLRELU__WASMSIMD_ARM_X16,batch_lt_16)1623   TEST(QU8_VLRELU__WASMSIMD_ARM_X16, batch_lt_16) {
1624     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
1625       VLReLUMicrokernelTester()
1626         .batch_size(batch_size)
1627         .input_zero_point(150)
1628         .output_zero_point(100)
1629         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1630     }
1631   }
1632 
TEST(QU8_VLRELU__WASMSIMD_ARM_X16,batch_gt_16)1633   TEST(QU8_VLRELU__WASMSIMD_ARM_X16, batch_gt_16) {
1634     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
1635       VLReLUMicrokernelTester()
1636         .batch_size(batch_size)
1637         .input_zero_point(150)
1638         .output_zero_point(100)
1639         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1640     }
1641   }
1642 
TEST(QU8_VLRELU__WASMSIMD_ARM_X16,positive_scale)1643   TEST(QU8_VLRELU__WASMSIMD_ARM_X16, positive_scale) {
1644     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1645       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1646         VLReLUMicrokernelTester()
1647           .batch_size(batch_size)
1648           .positive_scale(positive_scale)
1649           .input_zero_point(150)
1650           .output_zero_point(100)
1651           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1652         }
1653     }
1654   }
1655 
TEST(QU8_VLRELU__WASMSIMD_ARM_X16,negative_scale)1656   TEST(QU8_VLRELU__WASMSIMD_ARM_X16, negative_scale) {
1657     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1658       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1659         VLReLUMicrokernelTester()
1660           .batch_size(batch_size)
1661           .negative_scale(negative_scale)
1662           .input_zero_point(150)
1663           .output_zero_point(100)
1664           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1665         }
1666     }
1667   }
1668 
TEST(QU8_VLRELU__WASMSIMD_ARM_X16,input_zero_point)1669   TEST(QU8_VLRELU__WASMSIMD_ARM_X16, input_zero_point) {
1670     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1671       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1672         VLReLUMicrokernelTester()
1673           .batch_size(batch_size)
1674           .input_zero_point(input_zero_point)
1675           .output_zero_point(100)
1676           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1677       }
1678     }
1679   }
1680 
TEST(QU8_VLRELU__WASMSIMD_ARM_X16,output_zero_point)1681   TEST(QU8_VLRELU__WASMSIMD_ARM_X16, output_zero_point) {
1682     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1683       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1684         VLReLUMicrokernelTester()
1685           .batch_size(batch_size)
1686           .input_zero_point(150)
1687           .output_zero_point(output_zero_point)
1688           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1689       }
1690     }
1691   }
1692 #endif  // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
1693 
1694 
1695 #if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMSIMD_ARM_X32,batch_eq_32)1696   TEST(QU8_VLRELU__WASMSIMD_ARM_X32, batch_eq_32) {
1697     VLReLUMicrokernelTester()
1698       .batch_size(32)
1699       .input_zero_point(150)
1700       .output_zero_point(100)
1701       .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1702   }
1703 
TEST(QU8_VLRELU__WASMSIMD_ARM_X32,batch_div_32)1704   TEST(QU8_VLRELU__WASMSIMD_ARM_X32, batch_div_32) {
1705     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
1706       VLReLUMicrokernelTester()
1707         .batch_size(batch_size)
1708         .input_zero_point(150)
1709         .output_zero_point(100)
1710         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1711     }
1712   }
1713 
TEST(QU8_VLRELU__WASMSIMD_ARM_X32,batch_lt_32)1714   TEST(QU8_VLRELU__WASMSIMD_ARM_X32, batch_lt_32) {
1715     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
1716       VLReLUMicrokernelTester()
1717         .batch_size(batch_size)
1718         .input_zero_point(150)
1719         .output_zero_point(100)
1720         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1721     }
1722   }
1723 
TEST(QU8_VLRELU__WASMSIMD_ARM_X32,batch_gt_32)1724   TEST(QU8_VLRELU__WASMSIMD_ARM_X32, batch_gt_32) {
1725     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
1726       VLReLUMicrokernelTester()
1727         .batch_size(batch_size)
1728         .input_zero_point(150)
1729         .output_zero_point(100)
1730         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1731     }
1732   }
1733 
TEST(QU8_VLRELU__WASMSIMD_ARM_X32,positive_scale)1734   TEST(QU8_VLRELU__WASMSIMD_ARM_X32, positive_scale) {
1735     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1736       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1737         VLReLUMicrokernelTester()
1738           .batch_size(batch_size)
1739           .positive_scale(positive_scale)
1740           .input_zero_point(150)
1741           .output_zero_point(100)
1742           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1743         }
1744     }
1745   }
1746 
TEST(QU8_VLRELU__WASMSIMD_ARM_X32,negative_scale)1747   TEST(QU8_VLRELU__WASMSIMD_ARM_X32, negative_scale) {
1748     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1749       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1750         VLReLUMicrokernelTester()
1751           .batch_size(batch_size)
1752           .negative_scale(negative_scale)
1753           .input_zero_point(150)
1754           .output_zero_point(100)
1755           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1756         }
1757     }
1758   }
1759 
TEST(QU8_VLRELU__WASMSIMD_ARM_X32,input_zero_point)1760   TEST(QU8_VLRELU__WASMSIMD_ARM_X32, input_zero_point) {
1761     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1762       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1763         VLReLUMicrokernelTester()
1764           .batch_size(batch_size)
1765           .input_zero_point(input_zero_point)
1766           .output_zero_point(100)
1767           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1768       }
1769     }
1770   }
1771 
TEST(QU8_VLRELU__WASMSIMD_ARM_X32,output_zero_point)1772   TEST(QU8_VLRELU__WASMSIMD_ARM_X32, output_zero_point) {
1773     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1774       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
1775         VLReLUMicrokernelTester()
1776           .batch_size(batch_size)
1777           .input_zero_point(150)
1778           .output_zero_point(output_zero_point)
1779           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
1780       }
1781     }
1782   }
1783 #endif  // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
1784 
1785 
1786 #if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMSIMD_X86_X8,batch_eq_8)1787   TEST(QU8_VLRELU__WASMSIMD_X86_X8, batch_eq_8) {
1788     VLReLUMicrokernelTester()
1789       .batch_size(8)
1790       .input_zero_point(150)
1791       .output_zero_point(100)
1792       .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1793   }
1794 
TEST(QU8_VLRELU__WASMSIMD_X86_X8,batch_div_8)1795   TEST(QU8_VLRELU__WASMSIMD_X86_X8, batch_div_8) {
1796     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
1797       VLReLUMicrokernelTester()
1798         .batch_size(batch_size)
1799         .input_zero_point(150)
1800         .output_zero_point(100)
1801         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1802     }
1803   }
1804 
TEST(QU8_VLRELU__WASMSIMD_X86_X8,batch_lt_8)1805   TEST(QU8_VLRELU__WASMSIMD_X86_X8, batch_lt_8) {
1806     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
1807       VLReLUMicrokernelTester()
1808         .batch_size(batch_size)
1809         .input_zero_point(150)
1810         .output_zero_point(100)
1811         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1812     }
1813   }
1814 
TEST(QU8_VLRELU__WASMSIMD_X86_X8,batch_gt_8)1815   TEST(QU8_VLRELU__WASMSIMD_X86_X8, batch_gt_8) {
1816     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
1817       VLReLUMicrokernelTester()
1818         .batch_size(batch_size)
1819         .input_zero_point(150)
1820         .output_zero_point(100)
1821         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1822     }
1823   }
1824 
TEST(QU8_VLRELU__WASMSIMD_X86_X8,positive_scale)1825   TEST(QU8_VLRELU__WASMSIMD_X86_X8, positive_scale) {
1826     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
1827       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1828         VLReLUMicrokernelTester()
1829           .batch_size(batch_size)
1830           .positive_scale(positive_scale)
1831           .input_zero_point(150)
1832           .output_zero_point(100)
1833           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1834         }
1835     }
1836   }
1837 
TEST(QU8_VLRELU__WASMSIMD_X86_X8,negative_scale)1838   TEST(QU8_VLRELU__WASMSIMD_X86_X8, negative_scale) {
1839     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
1840       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1841         VLReLUMicrokernelTester()
1842           .batch_size(batch_size)
1843           .negative_scale(negative_scale)
1844           .input_zero_point(150)
1845           .output_zero_point(100)
1846           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1847         }
1848     }
1849   }
1850 
TEST(QU8_VLRELU__WASMSIMD_X86_X8,input_zero_point)1851   TEST(QU8_VLRELU__WASMSIMD_X86_X8, input_zero_point) {
1852     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1853       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
1854         VLReLUMicrokernelTester()
1855           .batch_size(batch_size)
1856           .input_zero_point(input_zero_point)
1857           .output_zero_point(100)
1858           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1859       }
1860     }
1861   }
1862 
TEST(QU8_VLRELU__WASMSIMD_X86_X8,output_zero_point)1863   TEST(QU8_VLRELU__WASMSIMD_X86_X8, output_zero_point) {
1864     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1865       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
1866         VLReLUMicrokernelTester()
1867           .batch_size(batch_size)
1868           .input_zero_point(150)
1869           .output_zero_point(output_zero_point)
1870           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1871       }
1872     }
1873   }
1874 #endif  // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
1875 
1876 
1877 #if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMSIMD_X86_X16,batch_eq_16)1878   TEST(QU8_VLRELU__WASMSIMD_X86_X16, batch_eq_16) {
1879     VLReLUMicrokernelTester()
1880       .batch_size(16)
1881       .input_zero_point(150)
1882       .output_zero_point(100)
1883       .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1884   }
1885 
TEST(QU8_VLRELU__WASMSIMD_X86_X16,batch_div_16)1886   TEST(QU8_VLRELU__WASMSIMD_X86_X16, batch_div_16) {
1887     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
1888       VLReLUMicrokernelTester()
1889         .batch_size(batch_size)
1890         .input_zero_point(150)
1891         .output_zero_point(100)
1892         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1893     }
1894   }
1895 
TEST(QU8_VLRELU__WASMSIMD_X86_X16,batch_lt_16)1896   TEST(QU8_VLRELU__WASMSIMD_X86_X16, batch_lt_16) {
1897     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
1898       VLReLUMicrokernelTester()
1899         .batch_size(batch_size)
1900         .input_zero_point(150)
1901         .output_zero_point(100)
1902         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1903     }
1904   }
1905 
TEST(QU8_VLRELU__WASMSIMD_X86_X16,batch_gt_16)1906   TEST(QU8_VLRELU__WASMSIMD_X86_X16, batch_gt_16) {
1907     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
1908       VLReLUMicrokernelTester()
1909         .batch_size(batch_size)
1910         .input_zero_point(150)
1911         .output_zero_point(100)
1912         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1913     }
1914   }
1915 
TEST(QU8_VLRELU__WASMSIMD_X86_X16,positive_scale)1916   TEST(QU8_VLRELU__WASMSIMD_X86_X16, positive_scale) {
1917     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1918       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
1919         VLReLUMicrokernelTester()
1920           .batch_size(batch_size)
1921           .positive_scale(positive_scale)
1922           .input_zero_point(150)
1923           .output_zero_point(100)
1924           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1925         }
1926     }
1927   }
1928 
TEST(QU8_VLRELU__WASMSIMD_X86_X16,negative_scale)1929   TEST(QU8_VLRELU__WASMSIMD_X86_X16, negative_scale) {
1930     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1931       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
1932         VLReLUMicrokernelTester()
1933           .batch_size(batch_size)
1934           .negative_scale(negative_scale)
1935           .input_zero_point(150)
1936           .output_zero_point(100)
1937           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1938         }
1939     }
1940   }
1941 
TEST(QU8_VLRELU__WASMSIMD_X86_X16,input_zero_point)1942   TEST(QU8_VLRELU__WASMSIMD_X86_X16, input_zero_point) {
1943     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
1944       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1945         VLReLUMicrokernelTester()
1946           .batch_size(batch_size)
1947           .input_zero_point(input_zero_point)
1948           .output_zero_point(100)
1949           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1950       }
1951     }
1952   }
1953 
TEST(QU8_VLRELU__WASMSIMD_X86_X16,output_zero_point)1954   TEST(QU8_VLRELU__WASMSIMD_X86_X16, output_zero_point) {
1955     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
1956       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
1957         VLReLUMicrokernelTester()
1958           .batch_size(batch_size)
1959           .input_zero_point(150)
1960           .output_zero_point(output_zero_point)
1961           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1962       }
1963     }
1964   }
1965 #endif  // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
1966 
1967 
1968 #if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMSIMD_X86_X32,batch_eq_32)1969   TEST(QU8_VLRELU__WASMSIMD_X86_X32, batch_eq_32) {
1970     VLReLUMicrokernelTester()
1971       .batch_size(32)
1972       .input_zero_point(150)
1973       .output_zero_point(100)
1974       .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1975   }
1976 
TEST(QU8_VLRELU__WASMSIMD_X86_X32,batch_div_32)1977   TEST(QU8_VLRELU__WASMSIMD_X86_X32, batch_div_32) {
1978     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
1979       VLReLUMicrokernelTester()
1980         .batch_size(batch_size)
1981         .input_zero_point(150)
1982         .output_zero_point(100)
1983         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1984     }
1985   }
1986 
TEST(QU8_VLRELU__WASMSIMD_X86_X32,batch_lt_32)1987   TEST(QU8_VLRELU__WASMSIMD_X86_X32, batch_lt_32) {
1988     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
1989       VLReLUMicrokernelTester()
1990         .batch_size(batch_size)
1991         .input_zero_point(150)
1992         .output_zero_point(100)
1993         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
1994     }
1995   }
1996 
TEST(QU8_VLRELU__WASMSIMD_X86_X32,batch_gt_32)1997   TEST(QU8_VLRELU__WASMSIMD_X86_X32, batch_gt_32) {
1998     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
1999       VLReLUMicrokernelTester()
2000         .batch_size(batch_size)
2001         .input_zero_point(150)
2002         .output_zero_point(100)
2003         .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2004     }
2005   }
2006 
TEST(QU8_VLRELU__WASMSIMD_X86_X32,positive_scale)2007   TEST(QU8_VLRELU__WASMSIMD_X86_X32, positive_scale) {
2008     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2009       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2010         VLReLUMicrokernelTester()
2011           .batch_size(batch_size)
2012           .positive_scale(positive_scale)
2013           .input_zero_point(150)
2014           .output_zero_point(100)
2015           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2016         }
2017     }
2018   }
2019 
TEST(QU8_VLRELU__WASMSIMD_X86_X32,negative_scale)2020   TEST(QU8_VLRELU__WASMSIMD_X86_X32, negative_scale) {
2021     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2022       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2023         VLReLUMicrokernelTester()
2024           .batch_size(batch_size)
2025           .negative_scale(negative_scale)
2026           .input_zero_point(150)
2027           .output_zero_point(100)
2028           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2029         }
2030     }
2031   }
2032 
TEST(QU8_VLRELU__WASMSIMD_X86_X32,input_zero_point)2033   TEST(QU8_VLRELU__WASMSIMD_X86_X32, input_zero_point) {
2034     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2035       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2036         VLReLUMicrokernelTester()
2037           .batch_size(batch_size)
2038           .input_zero_point(input_zero_point)
2039           .output_zero_point(100)
2040           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2041       }
2042     }
2043   }
2044 
TEST(QU8_VLRELU__WASMSIMD_X86_X32,output_zero_point)2045   TEST(QU8_VLRELU__WASMSIMD_X86_X32, output_zero_point) {
2046     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2047       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2048         VLReLUMicrokernelTester()
2049           .batch_size(batch_size)
2050           .input_zero_point(150)
2051           .output_zero_point(output_zero_point)
2052           .Test(xnn_qu8_vlrelu_ukernel__wasmsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2053       }
2054     }
2055   }
2056 #endif  // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
2057 
2058 
2059 #if XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16,batch_eq_16)2060   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16, batch_eq_16) {
2061     VLReLUMicrokernelTester()
2062       .batch_size(16)
2063       .input_zero_point(150)
2064       .output_zero_point(100)
2065       .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2066   }
2067 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16,batch_div_16)2068   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16, batch_div_16) {
2069     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
2070       VLReLUMicrokernelTester()
2071         .batch_size(batch_size)
2072         .input_zero_point(150)
2073         .output_zero_point(100)
2074         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2075     }
2076   }
2077 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16,batch_lt_16)2078   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16, batch_lt_16) {
2079     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
2080       VLReLUMicrokernelTester()
2081         .batch_size(batch_size)
2082         .input_zero_point(150)
2083         .output_zero_point(100)
2084         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2085     }
2086   }
2087 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16,batch_gt_16)2088   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16, batch_gt_16) {
2089     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
2090       VLReLUMicrokernelTester()
2091         .batch_size(batch_size)
2092         .input_zero_point(150)
2093         .output_zero_point(100)
2094         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2095     }
2096   }
2097 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16,positive_scale)2098   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16, positive_scale) {
2099     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
2100       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2101         VLReLUMicrokernelTester()
2102           .batch_size(batch_size)
2103           .positive_scale(positive_scale)
2104           .input_zero_point(150)
2105           .output_zero_point(100)
2106           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2107         }
2108     }
2109   }
2110 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16,negative_scale)2111   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16, negative_scale) {
2112     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
2113       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2114         VLReLUMicrokernelTester()
2115           .batch_size(batch_size)
2116           .negative_scale(negative_scale)
2117           .input_zero_point(150)
2118           .output_zero_point(100)
2119           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2120         }
2121     }
2122   }
2123 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16,input_zero_point)2124   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16, input_zero_point) {
2125     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2126       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
2127         VLReLUMicrokernelTester()
2128           .batch_size(batch_size)
2129           .input_zero_point(input_zero_point)
2130           .output_zero_point(100)
2131           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2132       }
2133     }
2134   }
2135 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16,output_zero_point)2136   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X16, output_zero_point) {
2137     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2138       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
2139         VLReLUMicrokernelTester()
2140           .batch_size(batch_size)
2141           .input_zero_point(150)
2142           .output_zero_point(output_zero_point)
2143           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x16, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2144       }
2145     }
2146   }
2147 #endif  // XNN_ARCH_WASMRELAXEDSIMD
2148 
2149 
2150 #if XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32,batch_eq_32)2151   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32, batch_eq_32) {
2152     VLReLUMicrokernelTester()
2153       .batch_size(32)
2154       .input_zero_point(150)
2155       .output_zero_point(100)
2156       .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2157   }
2158 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32,batch_div_32)2159   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32, batch_div_32) {
2160     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
2161       VLReLUMicrokernelTester()
2162         .batch_size(batch_size)
2163         .input_zero_point(150)
2164         .output_zero_point(100)
2165         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2166     }
2167   }
2168 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32,batch_lt_32)2169   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32, batch_lt_32) {
2170     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
2171       VLReLUMicrokernelTester()
2172         .batch_size(batch_size)
2173         .input_zero_point(150)
2174         .output_zero_point(100)
2175         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2176     }
2177   }
2178 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32,batch_gt_32)2179   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32, batch_gt_32) {
2180     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
2181       VLReLUMicrokernelTester()
2182         .batch_size(batch_size)
2183         .input_zero_point(150)
2184         .output_zero_point(100)
2185         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2186     }
2187   }
2188 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32,positive_scale)2189   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32, positive_scale) {
2190     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2191       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2192         VLReLUMicrokernelTester()
2193           .batch_size(batch_size)
2194           .positive_scale(positive_scale)
2195           .input_zero_point(150)
2196           .output_zero_point(100)
2197           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2198         }
2199     }
2200   }
2201 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32,negative_scale)2202   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32, negative_scale) {
2203     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2204       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2205         VLReLUMicrokernelTester()
2206           .batch_size(batch_size)
2207           .negative_scale(negative_scale)
2208           .input_zero_point(150)
2209           .output_zero_point(100)
2210           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2211         }
2212     }
2213   }
2214 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32,input_zero_point)2215   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32, input_zero_point) {
2216     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2217       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2218         VLReLUMicrokernelTester()
2219           .batch_size(batch_size)
2220           .input_zero_point(input_zero_point)
2221           .output_zero_point(100)
2222           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2223       }
2224     }
2225   }
2226 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32,output_zero_point)2227   TEST(QU8_VLRELU__WASMRELAXEDSIMD_ARM_X32, output_zero_point) {
2228     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2229       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2230         VLReLUMicrokernelTester()
2231           .batch_size(batch_size)
2232           .input_zero_point(150)
2233           .output_zero_point(output_zero_point)
2234           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_arm_x32, xnn_init_qu8_lrelu_wasmsimd_arm_params);
2235       }
2236     }
2237   }
2238 #endif  // XNN_ARCH_WASMRELAXEDSIMD
2239 
2240 
2241 #if XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8,batch_eq_8)2242   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8, batch_eq_8) {
2243     VLReLUMicrokernelTester()
2244       .batch_size(8)
2245       .input_zero_point(150)
2246       .output_zero_point(100)
2247       .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2248   }
2249 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8,batch_div_8)2250   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8, batch_div_8) {
2251     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
2252       VLReLUMicrokernelTester()
2253         .batch_size(batch_size)
2254         .input_zero_point(150)
2255         .output_zero_point(100)
2256         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2257     }
2258   }
2259 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8,batch_lt_8)2260   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8, batch_lt_8) {
2261     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
2262       VLReLUMicrokernelTester()
2263         .batch_size(batch_size)
2264         .input_zero_point(150)
2265         .output_zero_point(100)
2266         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2267     }
2268   }
2269 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8,batch_gt_8)2270   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8, batch_gt_8) {
2271     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
2272       VLReLUMicrokernelTester()
2273         .batch_size(batch_size)
2274         .input_zero_point(150)
2275         .output_zero_point(100)
2276         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2277     }
2278   }
2279 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8,positive_scale)2280   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8, positive_scale) {
2281     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
2282       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2283         VLReLUMicrokernelTester()
2284           .batch_size(batch_size)
2285           .positive_scale(positive_scale)
2286           .input_zero_point(150)
2287           .output_zero_point(100)
2288           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2289         }
2290     }
2291   }
2292 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8,negative_scale)2293   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8, negative_scale) {
2294     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
2295       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2296         VLReLUMicrokernelTester()
2297           .batch_size(batch_size)
2298           .negative_scale(negative_scale)
2299           .input_zero_point(150)
2300           .output_zero_point(100)
2301           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2302         }
2303     }
2304   }
2305 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8,input_zero_point)2306   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8, input_zero_point) {
2307     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2308       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
2309         VLReLUMicrokernelTester()
2310           .batch_size(batch_size)
2311           .input_zero_point(input_zero_point)
2312           .output_zero_point(100)
2313           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2314       }
2315     }
2316   }
2317 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8,output_zero_point)2318   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X8, output_zero_point) {
2319     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2320       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
2321         VLReLUMicrokernelTester()
2322           .batch_size(batch_size)
2323           .input_zero_point(150)
2324           .output_zero_point(output_zero_point)
2325           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x8, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2326       }
2327     }
2328   }
2329 #endif  // XNN_ARCH_WASMRELAXEDSIMD
2330 
2331 
2332 #if XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16,batch_eq_16)2333   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16, batch_eq_16) {
2334     VLReLUMicrokernelTester()
2335       .batch_size(16)
2336       .input_zero_point(150)
2337       .output_zero_point(100)
2338       .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2339   }
2340 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16,batch_div_16)2341   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16, batch_div_16) {
2342     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
2343       VLReLUMicrokernelTester()
2344         .batch_size(batch_size)
2345         .input_zero_point(150)
2346         .output_zero_point(100)
2347         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2348     }
2349   }
2350 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16,batch_lt_16)2351   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16, batch_lt_16) {
2352     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
2353       VLReLUMicrokernelTester()
2354         .batch_size(batch_size)
2355         .input_zero_point(150)
2356         .output_zero_point(100)
2357         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2358     }
2359   }
2360 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16,batch_gt_16)2361   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16, batch_gt_16) {
2362     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
2363       VLReLUMicrokernelTester()
2364         .batch_size(batch_size)
2365         .input_zero_point(150)
2366         .output_zero_point(100)
2367         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2368     }
2369   }
2370 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16,positive_scale)2371   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16, positive_scale) {
2372     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
2373       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2374         VLReLUMicrokernelTester()
2375           .batch_size(batch_size)
2376           .positive_scale(positive_scale)
2377           .input_zero_point(150)
2378           .output_zero_point(100)
2379           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2380         }
2381     }
2382   }
2383 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16,negative_scale)2384   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16, negative_scale) {
2385     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
2386       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2387         VLReLUMicrokernelTester()
2388           .batch_size(batch_size)
2389           .negative_scale(negative_scale)
2390           .input_zero_point(150)
2391           .output_zero_point(100)
2392           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2393         }
2394     }
2395   }
2396 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16,input_zero_point)2397   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16, input_zero_point) {
2398     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2399       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
2400         VLReLUMicrokernelTester()
2401           .batch_size(batch_size)
2402           .input_zero_point(input_zero_point)
2403           .output_zero_point(100)
2404           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2405       }
2406     }
2407   }
2408 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16,output_zero_point)2409   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X16, output_zero_point) {
2410     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2411       for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
2412         VLReLUMicrokernelTester()
2413           .batch_size(batch_size)
2414           .input_zero_point(150)
2415           .output_zero_point(output_zero_point)
2416           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x16, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2417       }
2418     }
2419   }
2420 #endif  // XNN_ARCH_WASMRELAXEDSIMD
2421 
2422 
2423 #if XNN_ARCH_WASMRELAXEDSIMD
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32,batch_eq_32)2424   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32, batch_eq_32) {
2425     VLReLUMicrokernelTester()
2426       .batch_size(32)
2427       .input_zero_point(150)
2428       .output_zero_point(100)
2429       .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2430   }
2431 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32,batch_div_32)2432   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32, batch_div_32) {
2433     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
2434       VLReLUMicrokernelTester()
2435         .batch_size(batch_size)
2436         .input_zero_point(150)
2437         .output_zero_point(100)
2438         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2439     }
2440   }
2441 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32,batch_lt_32)2442   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32, batch_lt_32) {
2443     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
2444       VLReLUMicrokernelTester()
2445         .batch_size(batch_size)
2446         .input_zero_point(150)
2447         .output_zero_point(100)
2448         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2449     }
2450   }
2451 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32,batch_gt_32)2452   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32, batch_gt_32) {
2453     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
2454       VLReLUMicrokernelTester()
2455         .batch_size(batch_size)
2456         .input_zero_point(150)
2457         .output_zero_point(100)
2458         .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2459     }
2460   }
2461 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32,positive_scale)2462   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32, positive_scale) {
2463     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2464       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2465         VLReLUMicrokernelTester()
2466           .batch_size(batch_size)
2467           .positive_scale(positive_scale)
2468           .input_zero_point(150)
2469           .output_zero_point(100)
2470           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2471         }
2472     }
2473   }
2474 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32,negative_scale)2475   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32, negative_scale) {
2476     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2477       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2478         VLReLUMicrokernelTester()
2479           .batch_size(batch_size)
2480           .negative_scale(negative_scale)
2481           .input_zero_point(150)
2482           .output_zero_point(100)
2483           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2484         }
2485     }
2486   }
2487 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32,input_zero_point)2488   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32, input_zero_point) {
2489     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2490       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2491         VLReLUMicrokernelTester()
2492           .batch_size(batch_size)
2493           .input_zero_point(input_zero_point)
2494           .output_zero_point(100)
2495           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2496       }
2497     }
2498   }
2499 
TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32,output_zero_point)2500   TEST(QU8_VLRELU__WASMRELAXEDSIMD_X86_X32, output_zero_point) {
2501     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2502       for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
2503         VLReLUMicrokernelTester()
2504           .batch_size(batch_size)
2505           .input_zero_point(150)
2506           .output_zero_point(output_zero_point)
2507           .Test(xnn_qu8_vlrelu_ukernel__wasmrelaxedsimd_x86_x32, xnn_init_qu8_lrelu_wasmsimd_x86_params);
2508       }
2509     }
2510   }
2511 #endif  // XNN_ARCH_WASMRELAXEDSIMD
2512 
2513 
2514 #if XNN_ARCH_ARM
TEST(QU8_VLRELU__ARMSIMD32_X4,batch_eq_4)2515   TEST(QU8_VLRELU__ARMSIMD32_X4, batch_eq_4) {
2516     TEST_REQUIRES_ARM_SIMD32;
2517     VLReLUMicrokernelTester()
2518       .batch_size(4)
2519       .input_zero_point(150)
2520       .output_zero_point(100)
2521       .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x4, xnn_init_qu8_lrelu_armsimd32_params);
2522   }
2523 
TEST(QU8_VLRELU__ARMSIMD32_X4,batch_div_4)2524   TEST(QU8_VLRELU__ARMSIMD32_X4, batch_div_4) {
2525     TEST_REQUIRES_ARM_SIMD32;
2526     for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
2527       VLReLUMicrokernelTester()
2528         .batch_size(batch_size)
2529         .input_zero_point(150)
2530         .output_zero_point(100)
2531         .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x4, xnn_init_qu8_lrelu_armsimd32_params);
2532     }
2533   }
2534 
TEST(QU8_VLRELU__ARMSIMD32_X4,batch_lt_4)2535   TEST(QU8_VLRELU__ARMSIMD32_X4, batch_lt_4) {
2536     TEST_REQUIRES_ARM_SIMD32;
2537     for (size_t batch_size = 1; batch_size < 4; batch_size++) {
2538       VLReLUMicrokernelTester()
2539         .batch_size(batch_size)
2540         .input_zero_point(150)
2541         .output_zero_point(100)
2542         .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x4, xnn_init_qu8_lrelu_armsimd32_params);
2543     }
2544   }
2545 
TEST(QU8_VLRELU__ARMSIMD32_X4,batch_gt_4)2546   TEST(QU8_VLRELU__ARMSIMD32_X4, batch_gt_4) {
2547     TEST_REQUIRES_ARM_SIMD32;
2548     for (size_t batch_size = 5; batch_size < 8; batch_size++) {
2549       VLReLUMicrokernelTester()
2550         .batch_size(batch_size)
2551         .input_zero_point(150)
2552         .output_zero_point(100)
2553         .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x4, xnn_init_qu8_lrelu_armsimd32_params);
2554     }
2555   }
2556 
TEST(QU8_VLRELU__ARMSIMD32_X4,positive_scale)2557   TEST(QU8_VLRELU__ARMSIMD32_X4, positive_scale) {
2558     TEST_REQUIRES_ARM_SIMD32;
2559     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
2560       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2561         VLReLUMicrokernelTester()
2562           .batch_size(batch_size)
2563           .positive_scale(positive_scale)
2564           .input_zero_point(150)
2565           .output_zero_point(100)
2566           .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x4, xnn_init_qu8_lrelu_armsimd32_params);
2567         }
2568     }
2569   }
2570 
TEST(QU8_VLRELU__ARMSIMD32_X4,negative_scale)2571   TEST(QU8_VLRELU__ARMSIMD32_X4, negative_scale) {
2572     TEST_REQUIRES_ARM_SIMD32;
2573     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
2574       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2575         VLReLUMicrokernelTester()
2576           .batch_size(batch_size)
2577           .negative_scale(negative_scale)
2578           .input_zero_point(150)
2579           .output_zero_point(100)
2580           .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x4, xnn_init_qu8_lrelu_armsimd32_params);
2581         }
2582     }
2583   }
2584 
TEST(QU8_VLRELU__ARMSIMD32_X4,input_zero_point)2585   TEST(QU8_VLRELU__ARMSIMD32_X4, input_zero_point) {
2586     TEST_REQUIRES_ARM_SIMD32;
2587     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2588       for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
2589         VLReLUMicrokernelTester()
2590           .batch_size(batch_size)
2591           .input_zero_point(input_zero_point)
2592           .output_zero_point(100)
2593           .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x4, xnn_init_qu8_lrelu_armsimd32_params);
2594       }
2595     }
2596   }
2597 
TEST(QU8_VLRELU__ARMSIMD32_X4,output_zero_point)2598   TEST(QU8_VLRELU__ARMSIMD32_X4, output_zero_point) {
2599     TEST_REQUIRES_ARM_SIMD32;
2600     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2601       for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
2602         VLReLUMicrokernelTester()
2603           .batch_size(batch_size)
2604           .input_zero_point(150)
2605           .output_zero_point(output_zero_point)
2606           .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x4, xnn_init_qu8_lrelu_armsimd32_params);
2607       }
2608     }
2609   }
2610 #endif  // XNN_ARCH_ARM
2611 
2612 
2613 #if XNN_ARCH_ARM
TEST(QU8_VLRELU__ARMSIMD32_X8,batch_eq_8)2614   TEST(QU8_VLRELU__ARMSIMD32_X8, batch_eq_8) {
2615     TEST_REQUIRES_ARM_SIMD32;
2616     VLReLUMicrokernelTester()
2617       .batch_size(8)
2618       .input_zero_point(150)
2619       .output_zero_point(100)
2620       .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x8, xnn_init_qu8_lrelu_armsimd32_params);
2621   }
2622 
TEST(QU8_VLRELU__ARMSIMD32_X8,batch_div_8)2623   TEST(QU8_VLRELU__ARMSIMD32_X8, batch_div_8) {
2624     TEST_REQUIRES_ARM_SIMD32;
2625     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
2626       VLReLUMicrokernelTester()
2627         .batch_size(batch_size)
2628         .input_zero_point(150)
2629         .output_zero_point(100)
2630         .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x8, xnn_init_qu8_lrelu_armsimd32_params);
2631     }
2632   }
2633 
TEST(QU8_VLRELU__ARMSIMD32_X8,batch_lt_8)2634   TEST(QU8_VLRELU__ARMSIMD32_X8, batch_lt_8) {
2635     TEST_REQUIRES_ARM_SIMD32;
2636     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
2637       VLReLUMicrokernelTester()
2638         .batch_size(batch_size)
2639         .input_zero_point(150)
2640         .output_zero_point(100)
2641         .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x8, xnn_init_qu8_lrelu_armsimd32_params);
2642     }
2643   }
2644 
TEST(QU8_VLRELU__ARMSIMD32_X8,batch_gt_8)2645   TEST(QU8_VLRELU__ARMSIMD32_X8, batch_gt_8) {
2646     TEST_REQUIRES_ARM_SIMD32;
2647     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
2648       VLReLUMicrokernelTester()
2649         .batch_size(batch_size)
2650         .input_zero_point(150)
2651         .output_zero_point(100)
2652         .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x8, xnn_init_qu8_lrelu_armsimd32_params);
2653     }
2654   }
2655 
TEST(QU8_VLRELU__ARMSIMD32_X8,positive_scale)2656   TEST(QU8_VLRELU__ARMSIMD32_X8, positive_scale) {
2657     TEST_REQUIRES_ARM_SIMD32;
2658     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
2659       for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2660         VLReLUMicrokernelTester()
2661           .batch_size(batch_size)
2662           .positive_scale(positive_scale)
2663           .input_zero_point(150)
2664           .output_zero_point(100)
2665           .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x8, xnn_init_qu8_lrelu_armsimd32_params);
2666         }
2667     }
2668   }
2669 
TEST(QU8_VLRELU__ARMSIMD32_X8,negative_scale)2670   TEST(QU8_VLRELU__ARMSIMD32_X8, negative_scale) {
2671     TEST_REQUIRES_ARM_SIMD32;
2672     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
2673       for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2674         VLReLUMicrokernelTester()
2675           .batch_size(batch_size)
2676           .negative_scale(negative_scale)
2677           .input_zero_point(150)
2678           .output_zero_point(100)
2679           .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x8, xnn_init_qu8_lrelu_armsimd32_params);
2680         }
2681     }
2682   }
2683 
TEST(QU8_VLRELU__ARMSIMD32_X8,input_zero_point)2684   TEST(QU8_VLRELU__ARMSIMD32_X8, input_zero_point) {
2685     TEST_REQUIRES_ARM_SIMD32;
2686     for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2687       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
2688         VLReLUMicrokernelTester()
2689           .batch_size(batch_size)
2690           .input_zero_point(input_zero_point)
2691           .output_zero_point(100)
2692           .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x8, xnn_init_qu8_lrelu_armsimd32_params);
2693       }
2694     }
2695   }
2696 
TEST(QU8_VLRELU__ARMSIMD32_X8,output_zero_point)2697   TEST(QU8_VLRELU__ARMSIMD32_X8, output_zero_point) {
2698     TEST_REQUIRES_ARM_SIMD32;
2699     for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2700       for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
2701         VLReLUMicrokernelTester()
2702           .batch_size(batch_size)
2703           .input_zero_point(150)
2704           .output_zero_point(output_zero_point)
2705           .Test(xnn_qu8_vlrelu_ukernel__armsimd32_x8, xnn_init_qu8_lrelu_armsimd32_params);
2706       }
2707     }
2708   }
2709 #endif  // XNN_ARCH_ARM
2710 
2711 
TEST(QU8_VLRELU__SCALAR_SELECT_X1,batch_eq_1)2712 TEST(QU8_VLRELU__SCALAR_SELECT_X1, batch_eq_1) {
2713   VLReLUMicrokernelTester()
2714     .batch_size(1)
2715     .input_zero_point(150)
2716     .output_zero_point(100)
2717     .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x1, xnn_init_qu8_lrelu_scalar_select_params);
2718 }
2719 
TEST(QU8_VLRELU__SCALAR_SELECT_X1,batch_gt_1)2720 TEST(QU8_VLRELU__SCALAR_SELECT_X1, batch_gt_1) {
2721   for (size_t batch_size = 2; batch_size < 10; batch_size++) {
2722     VLReLUMicrokernelTester()
2723       .batch_size(batch_size)
2724       .input_zero_point(150)
2725       .output_zero_point(100)
2726       .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x1, xnn_init_qu8_lrelu_scalar_select_params);
2727   }
2728 }
2729 
TEST(QU8_VLRELU__SCALAR_SELECT_X1,positive_scale)2730 TEST(QU8_VLRELU__SCALAR_SELECT_X1, positive_scale) {
2731   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
2732     for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2733       VLReLUMicrokernelTester()
2734         .batch_size(batch_size)
2735         .positive_scale(positive_scale)
2736         .input_zero_point(150)
2737         .output_zero_point(100)
2738         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x1, xnn_init_qu8_lrelu_scalar_select_params);
2739       }
2740   }
2741 }
2742 
TEST(QU8_VLRELU__SCALAR_SELECT_X1,negative_scale)2743 TEST(QU8_VLRELU__SCALAR_SELECT_X1, negative_scale) {
2744   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
2745     for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2746       VLReLUMicrokernelTester()
2747         .batch_size(batch_size)
2748         .negative_scale(negative_scale)
2749         .input_zero_point(150)
2750         .output_zero_point(100)
2751         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x1, xnn_init_qu8_lrelu_scalar_select_params);
2752       }
2753   }
2754 }
2755 
TEST(QU8_VLRELU__SCALAR_SELECT_X1,input_zero_point)2756 TEST(QU8_VLRELU__SCALAR_SELECT_X1, input_zero_point) {
2757   for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2758     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
2759       VLReLUMicrokernelTester()
2760         .batch_size(batch_size)
2761         .input_zero_point(input_zero_point)
2762         .output_zero_point(100)
2763         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x1, xnn_init_qu8_lrelu_scalar_select_params);
2764     }
2765   }
2766 }
2767 
TEST(QU8_VLRELU__SCALAR_SELECT_X1,output_zero_point)2768 TEST(QU8_VLRELU__SCALAR_SELECT_X1, output_zero_point) {
2769   for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2770     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
2771       VLReLUMicrokernelTester()
2772         .batch_size(batch_size)
2773         .input_zero_point(150)
2774         .output_zero_point(output_zero_point)
2775         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x1, xnn_init_qu8_lrelu_scalar_select_params);
2776     }
2777   }
2778 }
2779 
TEST(QU8_VLRELU__SCALAR_SELECT_X2,batch_eq_2)2780 TEST(QU8_VLRELU__SCALAR_SELECT_X2, batch_eq_2) {
2781   VLReLUMicrokernelTester()
2782     .batch_size(2)
2783     .input_zero_point(150)
2784     .output_zero_point(100)
2785     .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x2, xnn_init_qu8_lrelu_scalar_select_params);
2786 }
2787 
TEST(QU8_VLRELU__SCALAR_SELECT_X2,batch_div_2)2788 TEST(QU8_VLRELU__SCALAR_SELECT_X2, batch_div_2) {
2789   for (size_t batch_size = 4; batch_size < 20; batch_size += 2) {
2790     VLReLUMicrokernelTester()
2791       .batch_size(batch_size)
2792       .input_zero_point(150)
2793       .output_zero_point(100)
2794       .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x2, xnn_init_qu8_lrelu_scalar_select_params);
2795   }
2796 }
2797 
TEST(QU8_VLRELU__SCALAR_SELECT_X2,batch_lt_2)2798 TEST(QU8_VLRELU__SCALAR_SELECT_X2, batch_lt_2) {
2799   for (size_t batch_size = 1; batch_size < 2; batch_size++) {
2800     VLReLUMicrokernelTester()
2801       .batch_size(batch_size)
2802       .input_zero_point(150)
2803       .output_zero_point(100)
2804       .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x2, xnn_init_qu8_lrelu_scalar_select_params);
2805   }
2806 }
2807 
TEST(QU8_VLRELU__SCALAR_SELECT_X2,batch_gt_2)2808 TEST(QU8_VLRELU__SCALAR_SELECT_X2, batch_gt_2) {
2809   for (size_t batch_size = 3; batch_size < 4; batch_size++) {
2810     VLReLUMicrokernelTester()
2811       .batch_size(batch_size)
2812       .input_zero_point(150)
2813       .output_zero_point(100)
2814       .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x2, xnn_init_qu8_lrelu_scalar_select_params);
2815   }
2816 }
2817 
TEST(QU8_VLRELU__SCALAR_SELECT_X2,positive_scale)2818 TEST(QU8_VLRELU__SCALAR_SELECT_X2, positive_scale) {
2819   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
2820     for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2821       VLReLUMicrokernelTester()
2822         .batch_size(batch_size)
2823         .positive_scale(positive_scale)
2824         .input_zero_point(150)
2825         .output_zero_point(100)
2826         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x2, xnn_init_qu8_lrelu_scalar_select_params);
2827       }
2828   }
2829 }
2830 
TEST(QU8_VLRELU__SCALAR_SELECT_X2,negative_scale)2831 TEST(QU8_VLRELU__SCALAR_SELECT_X2, negative_scale) {
2832   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
2833     for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2834       VLReLUMicrokernelTester()
2835         .batch_size(batch_size)
2836         .negative_scale(negative_scale)
2837         .input_zero_point(150)
2838         .output_zero_point(100)
2839         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x2, xnn_init_qu8_lrelu_scalar_select_params);
2840       }
2841   }
2842 }
2843 
TEST(QU8_VLRELU__SCALAR_SELECT_X2,input_zero_point)2844 TEST(QU8_VLRELU__SCALAR_SELECT_X2, input_zero_point) {
2845   for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2846     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
2847       VLReLUMicrokernelTester()
2848         .batch_size(batch_size)
2849         .input_zero_point(input_zero_point)
2850         .output_zero_point(100)
2851         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x2, xnn_init_qu8_lrelu_scalar_select_params);
2852     }
2853   }
2854 }
2855 
TEST(QU8_VLRELU__SCALAR_SELECT_X2,output_zero_point)2856 TEST(QU8_VLRELU__SCALAR_SELECT_X2, output_zero_point) {
2857   for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2858     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
2859       VLReLUMicrokernelTester()
2860         .batch_size(batch_size)
2861         .input_zero_point(150)
2862         .output_zero_point(output_zero_point)
2863         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x2, xnn_init_qu8_lrelu_scalar_select_params);
2864     }
2865   }
2866 }
2867 
TEST(QU8_VLRELU__SCALAR_SELECT_X4,batch_eq_4)2868 TEST(QU8_VLRELU__SCALAR_SELECT_X4, batch_eq_4) {
2869   VLReLUMicrokernelTester()
2870     .batch_size(4)
2871     .input_zero_point(150)
2872     .output_zero_point(100)
2873     .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x4, xnn_init_qu8_lrelu_scalar_select_params);
2874 }
2875 
TEST(QU8_VLRELU__SCALAR_SELECT_X4,batch_div_4)2876 TEST(QU8_VLRELU__SCALAR_SELECT_X4, batch_div_4) {
2877   for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
2878     VLReLUMicrokernelTester()
2879       .batch_size(batch_size)
2880       .input_zero_point(150)
2881       .output_zero_point(100)
2882       .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x4, xnn_init_qu8_lrelu_scalar_select_params);
2883   }
2884 }
2885 
TEST(QU8_VLRELU__SCALAR_SELECT_X4,batch_lt_4)2886 TEST(QU8_VLRELU__SCALAR_SELECT_X4, batch_lt_4) {
2887   for (size_t batch_size = 1; batch_size < 4; batch_size++) {
2888     VLReLUMicrokernelTester()
2889       .batch_size(batch_size)
2890       .input_zero_point(150)
2891       .output_zero_point(100)
2892       .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x4, xnn_init_qu8_lrelu_scalar_select_params);
2893   }
2894 }
2895 
TEST(QU8_VLRELU__SCALAR_SELECT_X4,batch_gt_4)2896 TEST(QU8_VLRELU__SCALAR_SELECT_X4, batch_gt_4) {
2897   for (size_t batch_size = 5; batch_size < 8; batch_size++) {
2898     VLReLUMicrokernelTester()
2899       .batch_size(batch_size)
2900       .input_zero_point(150)
2901       .output_zero_point(100)
2902       .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x4, xnn_init_qu8_lrelu_scalar_select_params);
2903   }
2904 }
2905 
TEST(QU8_VLRELU__SCALAR_SELECT_X4,positive_scale)2906 TEST(QU8_VLRELU__SCALAR_SELECT_X4, positive_scale) {
2907   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
2908     for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2909       VLReLUMicrokernelTester()
2910         .batch_size(batch_size)
2911         .positive_scale(positive_scale)
2912         .input_zero_point(150)
2913         .output_zero_point(100)
2914         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x4, xnn_init_qu8_lrelu_scalar_select_params);
2915       }
2916   }
2917 }
2918 
TEST(QU8_VLRELU__SCALAR_SELECT_X4,negative_scale)2919 TEST(QU8_VLRELU__SCALAR_SELECT_X4, negative_scale) {
2920   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
2921     for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2922       VLReLUMicrokernelTester()
2923         .batch_size(batch_size)
2924         .negative_scale(negative_scale)
2925         .input_zero_point(150)
2926         .output_zero_point(100)
2927         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x4, xnn_init_qu8_lrelu_scalar_select_params);
2928       }
2929   }
2930 }
2931 
TEST(QU8_VLRELU__SCALAR_SELECT_X4,input_zero_point)2932 TEST(QU8_VLRELU__SCALAR_SELECT_X4, input_zero_point) {
2933   for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
2934     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
2935       VLReLUMicrokernelTester()
2936         .batch_size(batch_size)
2937         .input_zero_point(input_zero_point)
2938         .output_zero_point(100)
2939         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x4, xnn_init_qu8_lrelu_scalar_select_params);
2940     }
2941   }
2942 }
2943 
TEST(QU8_VLRELU__SCALAR_SELECT_X4,output_zero_point)2944 TEST(QU8_VLRELU__SCALAR_SELECT_X4, output_zero_point) {
2945   for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
2946     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
2947       VLReLUMicrokernelTester()
2948         .batch_size(batch_size)
2949         .input_zero_point(150)
2950         .output_zero_point(output_zero_point)
2951         .Test(xnn_qu8_vlrelu_ukernel__scalar_select_x4, xnn_init_qu8_lrelu_scalar_select_params);
2952     }
2953   }
2954 }
2955 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X1,batch_eq_1)2956 TEST(QU8_VLRELU__SCALAR_ANDXOR_X1, batch_eq_1) {
2957   VLReLUMicrokernelTester()
2958     .batch_size(1)
2959     .input_zero_point(150)
2960     .output_zero_point(100)
2961     .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x1, xnn_init_qu8_lrelu_scalar_andxor_params);
2962 }
2963 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X1,batch_gt_1)2964 TEST(QU8_VLRELU__SCALAR_ANDXOR_X1, batch_gt_1) {
2965   for (size_t batch_size = 2; batch_size < 10; batch_size++) {
2966     VLReLUMicrokernelTester()
2967       .batch_size(batch_size)
2968       .input_zero_point(150)
2969       .output_zero_point(100)
2970       .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x1, xnn_init_qu8_lrelu_scalar_andxor_params);
2971   }
2972 }
2973 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X1,positive_scale)2974 TEST(QU8_VLRELU__SCALAR_ANDXOR_X1, positive_scale) {
2975   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
2976     for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
2977       VLReLUMicrokernelTester()
2978         .batch_size(batch_size)
2979         .positive_scale(positive_scale)
2980         .input_zero_point(150)
2981         .output_zero_point(100)
2982         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x1, xnn_init_qu8_lrelu_scalar_andxor_params);
2983       }
2984   }
2985 }
2986 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X1,negative_scale)2987 TEST(QU8_VLRELU__SCALAR_ANDXOR_X1, negative_scale) {
2988   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
2989     for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
2990       VLReLUMicrokernelTester()
2991         .batch_size(batch_size)
2992         .negative_scale(negative_scale)
2993         .input_zero_point(150)
2994         .output_zero_point(100)
2995         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x1, xnn_init_qu8_lrelu_scalar_andxor_params);
2996       }
2997   }
2998 }
2999 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X1,input_zero_point)3000 TEST(QU8_VLRELU__SCALAR_ANDXOR_X1, input_zero_point) {
3001   for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
3002     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
3003       VLReLUMicrokernelTester()
3004         .batch_size(batch_size)
3005         .input_zero_point(input_zero_point)
3006         .output_zero_point(100)
3007         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x1, xnn_init_qu8_lrelu_scalar_andxor_params);
3008     }
3009   }
3010 }
3011 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X1,output_zero_point)3012 TEST(QU8_VLRELU__SCALAR_ANDXOR_X1, output_zero_point) {
3013   for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
3014     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
3015       VLReLUMicrokernelTester()
3016         .batch_size(batch_size)
3017         .input_zero_point(150)
3018         .output_zero_point(output_zero_point)
3019         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x1, xnn_init_qu8_lrelu_scalar_andxor_params);
3020     }
3021   }
3022 }
3023 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X2,batch_eq_2)3024 TEST(QU8_VLRELU__SCALAR_ANDXOR_X2, batch_eq_2) {
3025   VLReLUMicrokernelTester()
3026     .batch_size(2)
3027     .input_zero_point(150)
3028     .output_zero_point(100)
3029     .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x2, xnn_init_qu8_lrelu_scalar_andxor_params);
3030 }
3031 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X2,batch_div_2)3032 TEST(QU8_VLRELU__SCALAR_ANDXOR_X2, batch_div_2) {
3033   for (size_t batch_size = 4; batch_size < 20; batch_size += 2) {
3034     VLReLUMicrokernelTester()
3035       .batch_size(batch_size)
3036       .input_zero_point(150)
3037       .output_zero_point(100)
3038       .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x2, xnn_init_qu8_lrelu_scalar_andxor_params);
3039   }
3040 }
3041 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X2,batch_lt_2)3042 TEST(QU8_VLRELU__SCALAR_ANDXOR_X2, batch_lt_2) {
3043   for (size_t batch_size = 1; batch_size < 2; batch_size++) {
3044     VLReLUMicrokernelTester()
3045       .batch_size(batch_size)
3046       .input_zero_point(150)
3047       .output_zero_point(100)
3048       .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x2, xnn_init_qu8_lrelu_scalar_andxor_params);
3049   }
3050 }
3051 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X2,batch_gt_2)3052 TEST(QU8_VLRELU__SCALAR_ANDXOR_X2, batch_gt_2) {
3053   for (size_t batch_size = 3; batch_size < 4; batch_size++) {
3054     VLReLUMicrokernelTester()
3055       .batch_size(batch_size)
3056       .input_zero_point(150)
3057       .output_zero_point(100)
3058       .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x2, xnn_init_qu8_lrelu_scalar_andxor_params);
3059   }
3060 }
3061 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X2,positive_scale)3062 TEST(QU8_VLRELU__SCALAR_ANDXOR_X2, positive_scale) {
3063   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
3064     for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
3065       VLReLUMicrokernelTester()
3066         .batch_size(batch_size)
3067         .positive_scale(positive_scale)
3068         .input_zero_point(150)
3069         .output_zero_point(100)
3070         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x2, xnn_init_qu8_lrelu_scalar_andxor_params);
3071       }
3072   }
3073 }
3074 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X2,negative_scale)3075 TEST(QU8_VLRELU__SCALAR_ANDXOR_X2, negative_scale) {
3076   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
3077     for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
3078       VLReLUMicrokernelTester()
3079         .batch_size(batch_size)
3080         .negative_scale(negative_scale)
3081         .input_zero_point(150)
3082         .output_zero_point(100)
3083         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x2, xnn_init_qu8_lrelu_scalar_andxor_params);
3084       }
3085   }
3086 }
3087 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X2,input_zero_point)3088 TEST(QU8_VLRELU__SCALAR_ANDXOR_X2, input_zero_point) {
3089   for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
3090     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
3091       VLReLUMicrokernelTester()
3092         .batch_size(batch_size)
3093         .input_zero_point(input_zero_point)
3094         .output_zero_point(100)
3095         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x2, xnn_init_qu8_lrelu_scalar_andxor_params);
3096     }
3097   }
3098 }
3099 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X2,output_zero_point)3100 TEST(QU8_VLRELU__SCALAR_ANDXOR_X2, output_zero_point) {
3101   for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
3102     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
3103       VLReLUMicrokernelTester()
3104         .batch_size(batch_size)
3105         .input_zero_point(150)
3106         .output_zero_point(output_zero_point)
3107         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x2, xnn_init_qu8_lrelu_scalar_andxor_params);
3108     }
3109   }
3110 }
3111 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X4,batch_eq_4)3112 TEST(QU8_VLRELU__SCALAR_ANDXOR_X4, batch_eq_4) {
3113   VLReLUMicrokernelTester()
3114     .batch_size(4)
3115     .input_zero_point(150)
3116     .output_zero_point(100)
3117     .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x4, xnn_init_qu8_lrelu_scalar_andxor_params);
3118 }
3119 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X4,batch_div_4)3120 TEST(QU8_VLRELU__SCALAR_ANDXOR_X4, batch_div_4) {
3121   for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
3122     VLReLUMicrokernelTester()
3123       .batch_size(batch_size)
3124       .input_zero_point(150)
3125       .output_zero_point(100)
3126       .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x4, xnn_init_qu8_lrelu_scalar_andxor_params);
3127   }
3128 }
3129 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X4,batch_lt_4)3130 TEST(QU8_VLRELU__SCALAR_ANDXOR_X4, batch_lt_4) {
3131   for (size_t batch_size = 1; batch_size < 4; batch_size++) {
3132     VLReLUMicrokernelTester()
3133       .batch_size(batch_size)
3134       .input_zero_point(150)
3135       .output_zero_point(100)
3136       .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x4, xnn_init_qu8_lrelu_scalar_andxor_params);
3137   }
3138 }
3139 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X4,batch_gt_4)3140 TEST(QU8_VLRELU__SCALAR_ANDXOR_X4, batch_gt_4) {
3141   for (size_t batch_size = 5; batch_size < 8; batch_size++) {
3142     VLReLUMicrokernelTester()
3143       .batch_size(batch_size)
3144       .input_zero_point(150)
3145       .output_zero_point(100)
3146       .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x4, xnn_init_qu8_lrelu_scalar_andxor_params);
3147   }
3148 }
3149 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X4,positive_scale)3150 TEST(QU8_VLRELU__SCALAR_ANDXOR_X4, positive_scale) {
3151   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
3152     for (float positive_scale : std::vector<float>({1.0f / 256.0f, 0.3f, 1.3f, 128.0f})) {
3153       VLReLUMicrokernelTester()
3154         .batch_size(batch_size)
3155         .positive_scale(positive_scale)
3156         .input_zero_point(150)
3157         .output_zero_point(100)
3158         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x4, xnn_init_qu8_lrelu_scalar_andxor_params);
3159       }
3160   }
3161 }
3162 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X4,negative_scale)3163 TEST(QU8_VLRELU__SCALAR_ANDXOR_X4, negative_scale) {
3164   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
3165     for (float negative_scale : std::vector<float>({-127.99609375f, -1.3f, -0.3f, -1.0f / 256.0f, 1 / 256.0f, 0.3f, 1.3f, 128.0f})) {
3166       VLReLUMicrokernelTester()
3167         .batch_size(batch_size)
3168         .negative_scale(negative_scale)
3169         .input_zero_point(150)
3170         .output_zero_point(100)
3171         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x4, xnn_init_qu8_lrelu_scalar_andxor_params);
3172       }
3173   }
3174 }
3175 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X4,input_zero_point)3176 TEST(QU8_VLRELU__SCALAR_ANDXOR_X4, input_zero_point) {
3177   for (int16_t input_zero_point = 2; input_zero_point < 10; input_zero_point += 3) {
3178     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
3179       VLReLUMicrokernelTester()
3180         .batch_size(batch_size)
3181         .input_zero_point(input_zero_point)
3182         .output_zero_point(100)
3183         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x4, xnn_init_qu8_lrelu_scalar_andxor_params);
3184     }
3185   }
3186 }
3187 
TEST(QU8_VLRELU__SCALAR_ANDXOR_X4,output_zero_point)3188 TEST(QU8_VLRELU__SCALAR_ANDXOR_X4, output_zero_point) {
3189   for (int16_t output_zero_point = 2; output_zero_point < 10; output_zero_point += 3) {
3190     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
3191       VLReLUMicrokernelTester()
3192         .batch_size(batch_size)
3193         .input_zero_point(150)
3194         .output_zero_point(output_zero_point)
3195         .Test(xnn_qu8_vlrelu_ukernel__scalar_andxor_x4, xnn_init_qu8_lrelu_scalar_andxor_params);
3196     }
3197   }
3198 }