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