• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 Google LLC
2 //
3 // This source code is licensed under the BSD-style license found in the
4 // LICENSE file in the root directory of this source tree.
5 //
6 // Auto-generated file. Do not edit!
7 //   Specification: test/f32-vadd.yaml
8 //   Generator: tools/generate-vbinary-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/vbinary.h>
17 #include "vbinary-microkernel-tester.h"
18 
19 
20 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(F32_VADD__NEON_X4,batch_eq_4)21   TEST(F32_VADD__NEON_X4, batch_eq_4) {
22     TEST_REQUIRES_ARM_NEON;
23     VBinOpMicrokernelTester()
24       .batch_size(4)
25       .Test(xnn_f32_vadd_ukernel__neon_x4, VBinOpMicrokernelTester::OpType::Add);
26   }
27 
TEST(F32_VADD__NEON_X4,batch_div_4)28   TEST(F32_VADD__NEON_X4, batch_div_4) {
29     TEST_REQUIRES_ARM_NEON;
30     for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
31       VBinOpMicrokernelTester()
32         .batch_size(batch_size)
33         .Test(xnn_f32_vadd_ukernel__neon_x4, VBinOpMicrokernelTester::OpType::Add);
34     }
35   }
36 
TEST(F32_VADD__NEON_X4,batch_lt_4)37   TEST(F32_VADD__NEON_X4, batch_lt_4) {
38     TEST_REQUIRES_ARM_NEON;
39     for (size_t batch_size = 1; batch_size < 4; batch_size++) {
40       VBinOpMicrokernelTester()
41         .batch_size(batch_size)
42         .Test(xnn_f32_vadd_ukernel__neon_x4, VBinOpMicrokernelTester::OpType::Add);
43     }
44   }
45 
TEST(F32_VADD__NEON_X4,batch_gt_4)46   TEST(F32_VADD__NEON_X4, batch_gt_4) {
47     TEST_REQUIRES_ARM_NEON;
48     for (size_t batch_size = 5; batch_size < 8; batch_size++) {
49       VBinOpMicrokernelTester()
50         .batch_size(batch_size)
51         .Test(xnn_f32_vadd_ukernel__neon_x4, VBinOpMicrokernelTester::OpType::Add);
52     }
53   }
54 
TEST(F32_VADD__NEON_X4,inplace_a)55   TEST(F32_VADD__NEON_X4, inplace_a) {
56     TEST_REQUIRES_ARM_NEON;
57     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
58       VBinOpMicrokernelTester()
59         .batch_size(batch_size)
60         .inplace_a(true)
61         .Test(xnn_f32_vadd_ukernel__neon_x4, VBinOpMicrokernelTester::OpType::Add);
62     }
63   }
64 
TEST(F32_VADD__NEON_X4,inplace_b)65   TEST(F32_VADD__NEON_X4, inplace_b) {
66     TEST_REQUIRES_ARM_NEON;
67     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
68       VBinOpMicrokernelTester()
69         .batch_size(batch_size)
70         .inplace_b(true)
71         .Test(xnn_f32_vadd_ukernel__neon_x4, VBinOpMicrokernelTester::OpType::Add);
72     }
73   }
74 
TEST(F32_VADD__NEON_X4,inplace_a_and_b)75   TEST(F32_VADD__NEON_X4, inplace_a_and_b) {
76     TEST_REQUIRES_ARM_NEON;
77     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
78       VBinOpMicrokernelTester()
79         .batch_size(batch_size)
80         .inplace_a(true)
81         .inplace_b(true)
82         .Test(xnn_f32_vadd_ukernel__neon_x4, VBinOpMicrokernelTester::OpType::Add);
83     }
84   }
85 
TEST(F32_VADD__NEON_X4,qmin)86   TEST(F32_VADD__NEON_X4, qmin) {
87     TEST_REQUIRES_ARM_NEON;
88     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
89       VBinOpMicrokernelTester()
90         .batch_size(batch_size)
91         .qmin(128)
92         .Test(xnn_f32_vadd_ukernel__neon_x4, VBinOpMicrokernelTester::OpType::Add);
93     }
94   }
95 
TEST(F32_VADD__NEON_X4,qmax)96   TEST(F32_VADD__NEON_X4, qmax) {
97     TEST_REQUIRES_ARM_NEON;
98     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
99       VBinOpMicrokernelTester()
100         .batch_size(batch_size)
101         .qmax(128)
102         .Test(xnn_f32_vadd_ukernel__neon_x4, VBinOpMicrokernelTester::OpType::Add);
103     }
104   }
105 #endif  // XNN_ARCH_ARM || XNN_ARCH_ARM64
106 
107 
108 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(F32_VADD__NEON_X8,batch_eq_8)109   TEST(F32_VADD__NEON_X8, batch_eq_8) {
110     TEST_REQUIRES_ARM_NEON;
111     VBinOpMicrokernelTester()
112       .batch_size(8)
113       .Test(xnn_f32_vadd_ukernel__neon_x8, VBinOpMicrokernelTester::OpType::Add);
114   }
115 
TEST(F32_VADD__NEON_X8,batch_div_8)116   TEST(F32_VADD__NEON_X8, batch_div_8) {
117     TEST_REQUIRES_ARM_NEON;
118     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
119       VBinOpMicrokernelTester()
120         .batch_size(batch_size)
121         .Test(xnn_f32_vadd_ukernel__neon_x8, VBinOpMicrokernelTester::OpType::Add);
122     }
123   }
124 
TEST(F32_VADD__NEON_X8,batch_lt_8)125   TEST(F32_VADD__NEON_X8, batch_lt_8) {
126     TEST_REQUIRES_ARM_NEON;
127     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
128       VBinOpMicrokernelTester()
129         .batch_size(batch_size)
130         .Test(xnn_f32_vadd_ukernel__neon_x8, VBinOpMicrokernelTester::OpType::Add);
131     }
132   }
133 
TEST(F32_VADD__NEON_X8,batch_gt_8)134   TEST(F32_VADD__NEON_X8, batch_gt_8) {
135     TEST_REQUIRES_ARM_NEON;
136     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
137       VBinOpMicrokernelTester()
138         .batch_size(batch_size)
139         .Test(xnn_f32_vadd_ukernel__neon_x8, VBinOpMicrokernelTester::OpType::Add);
140     }
141   }
142 
TEST(F32_VADD__NEON_X8,inplace_a)143   TEST(F32_VADD__NEON_X8, inplace_a) {
144     TEST_REQUIRES_ARM_NEON;
145     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
146       VBinOpMicrokernelTester()
147         .batch_size(batch_size)
148         .inplace_a(true)
149         .Test(xnn_f32_vadd_ukernel__neon_x8, VBinOpMicrokernelTester::OpType::Add);
150     }
151   }
152 
TEST(F32_VADD__NEON_X8,inplace_b)153   TEST(F32_VADD__NEON_X8, inplace_b) {
154     TEST_REQUIRES_ARM_NEON;
155     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
156       VBinOpMicrokernelTester()
157         .batch_size(batch_size)
158         .inplace_b(true)
159         .Test(xnn_f32_vadd_ukernel__neon_x8, VBinOpMicrokernelTester::OpType::Add);
160     }
161   }
162 
TEST(F32_VADD__NEON_X8,inplace_a_and_b)163   TEST(F32_VADD__NEON_X8, inplace_a_and_b) {
164     TEST_REQUIRES_ARM_NEON;
165     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
166       VBinOpMicrokernelTester()
167         .batch_size(batch_size)
168         .inplace_a(true)
169         .inplace_b(true)
170         .Test(xnn_f32_vadd_ukernel__neon_x8, VBinOpMicrokernelTester::OpType::Add);
171     }
172   }
173 
TEST(F32_VADD__NEON_X8,qmin)174   TEST(F32_VADD__NEON_X8, qmin) {
175     TEST_REQUIRES_ARM_NEON;
176     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
177       VBinOpMicrokernelTester()
178         .batch_size(batch_size)
179         .qmin(128)
180         .Test(xnn_f32_vadd_ukernel__neon_x8, VBinOpMicrokernelTester::OpType::Add);
181     }
182   }
183 
TEST(F32_VADD__NEON_X8,qmax)184   TEST(F32_VADD__NEON_X8, qmax) {
185     TEST_REQUIRES_ARM_NEON;
186     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
187       VBinOpMicrokernelTester()
188         .batch_size(batch_size)
189         .qmax(128)
190         .Test(xnn_f32_vadd_ukernel__neon_x8, VBinOpMicrokernelTester::OpType::Add);
191     }
192   }
193 #endif  // XNN_ARCH_ARM || XNN_ARCH_ARM64
194 
195 
196 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VADD__SSE_X4,batch_eq_4)197   TEST(F32_VADD__SSE_X4, batch_eq_4) {
198     TEST_REQUIRES_X86_SSE;
199     VBinOpMicrokernelTester()
200       .batch_size(4)
201       .Test(xnn_f32_vadd_ukernel__sse_x4, VBinOpMicrokernelTester::OpType::Add);
202   }
203 
TEST(F32_VADD__SSE_X4,batch_div_4)204   TEST(F32_VADD__SSE_X4, batch_div_4) {
205     TEST_REQUIRES_X86_SSE;
206     for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
207       VBinOpMicrokernelTester()
208         .batch_size(batch_size)
209         .Test(xnn_f32_vadd_ukernel__sse_x4, VBinOpMicrokernelTester::OpType::Add);
210     }
211   }
212 
TEST(F32_VADD__SSE_X4,batch_lt_4)213   TEST(F32_VADD__SSE_X4, batch_lt_4) {
214     TEST_REQUIRES_X86_SSE;
215     for (size_t batch_size = 1; batch_size < 4; batch_size++) {
216       VBinOpMicrokernelTester()
217         .batch_size(batch_size)
218         .Test(xnn_f32_vadd_ukernel__sse_x4, VBinOpMicrokernelTester::OpType::Add);
219     }
220   }
221 
TEST(F32_VADD__SSE_X4,batch_gt_4)222   TEST(F32_VADD__SSE_X4, batch_gt_4) {
223     TEST_REQUIRES_X86_SSE;
224     for (size_t batch_size = 5; batch_size < 8; batch_size++) {
225       VBinOpMicrokernelTester()
226         .batch_size(batch_size)
227         .Test(xnn_f32_vadd_ukernel__sse_x4, VBinOpMicrokernelTester::OpType::Add);
228     }
229   }
230 
TEST(F32_VADD__SSE_X4,inplace_a)231   TEST(F32_VADD__SSE_X4, inplace_a) {
232     TEST_REQUIRES_X86_SSE;
233     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
234       VBinOpMicrokernelTester()
235         .batch_size(batch_size)
236         .inplace_a(true)
237         .Test(xnn_f32_vadd_ukernel__sse_x4, VBinOpMicrokernelTester::OpType::Add);
238     }
239   }
240 
TEST(F32_VADD__SSE_X4,inplace_b)241   TEST(F32_VADD__SSE_X4, inplace_b) {
242     TEST_REQUIRES_X86_SSE;
243     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
244       VBinOpMicrokernelTester()
245         .batch_size(batch_size)
246         .inplace_b(true)
247         .Test(xnn_f32_vadd_ukernel__sse_x4, VBinOpMicrokernelTester::OpType::Add);
248     }
249   }
250 
TEST(F32_VADD__SSE_X4,inplace_a_and_b)251   TEST(F32_VADD__SSE_X4, inplace_a_and_b) {
252     TEST_REQUIRES_X86_SSE;
253     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
254       VBinOpMicrokernelTester()
255         .batch_size(batch_size)
256         .inplace_a(true)
257         .inplace_b(true)
258         .Test(xnn_f32_vadd_ukernel__sse_x4, VBinOpMicrokernelTester::OpType::Add);
259     }
260   }
261 
TEST(F32_VADD__SSE_X4,qmin)262   TEST(F32_VADD__SSE_X4, qmin) {
263     TEST_REQUIRES_X86_SSE;
264     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
265       VBinOpMicrokernelTester()
266         .batch_size(batch_size)
267         .qmin(128)
268         .Test(xnn_f32_vadd_ukernel__sse_x4, VBinOpMicrokernelTester::OpType::Add);
269     }
270   }
271 
TEST(F32_VADD__SSE_X4,qmax)272   TEST(F32_VADD__SSE_X4, qmax) {
273     TEST_REQUIRES_X86_SSE;
274     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
275       VBinOpMicrokernelTester()
276         .batch_size(batch_size)
277         .qmax(128)
278         .Test(xnn_f32_vadd_ukernel__sse_x4, VBinOpMicrokernelTester::OpType::Add);
279     }
280   }
281 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
282 
283 
284 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VADD__SSE_X8,batch_eq_8)285   TEST(F32_VADD__SSE_X8, batch_eq_8) {
286     TEST_REQUIRES_X86_SSE;
287     VBinOpMicrokernelTester()
288       .batch_size(8)
289       .Test(xnn_f32_vadd_ukernel__sse_x8, VBinOpMicrokernelTester::OpType::Add);
290   }
291 
TEST(F32_VADD__SSE_X8,batch_div_8)292   TEST(F32_VADD__SSE_X8, batch_div_8) {
293     TEST_REQUIRES_X86_SSE;
294     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
295       VBinOpMicrokernelTester()
296         .batch_size(batch_size)
297         .Test(xnn_f32_vadd_ukernel__sse_x8, VBinOpMicrokernelTester::OpType::Add);
298     }
299   }
300 
TEST(F32_VADD__SSE_X8,batch_lt_8)301   TEST(F32_VADD__SSE_X8, batch_lt_8) {
302     TEST_REQUIRES_X86_SSE;
303     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
304       VBinOpMicrokernelTester()
305         .batch_size(batch_size)
306         .Test(xnn_f32_vadd_ukernel__sse_x8, VBinOpMicrokernelTester::OpType::Add);
307     }
308   }
309 
TEST(F32_VADD__SSE_X8,batch_gt_8)310   TEST(F32_VADD__SSE_X8, batch_gt_8) {
311     TEST_REQUIRES_X86_SSE;
312     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
313       VBinOpMicrokernelTester()
314         .batch_size(batch_size)
315         .Test(xnn_f32_vadd_ukernel__sse_x8, VBinOpMicrokernelTester::OpType::Add);
316     }
317   }
318 
TEST(F32_VADD__SSE_X8,inplace_a)319   TEST(F32_VADD__SSE_X8, inplace_a) {
320     TEST_REQUIRES_X86_SSE;
321     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
322       VBinOpMicrokernelTester()
323         .batch_size(batch_size)
324         .inplace_a(true)
325         .Test(xnn_f32_vadd_ukernel__sse_x8, VBinOpMicrokernelTester::OpType::Add);
326     }
327   }
328 
TEST(F32_VADD__SSE_X8,inplace_b)329   TEST(F32_VADD__SSE_X8, inplace_b) {
330     TEST_REQUIRES_X86_SSE;
331     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
332       VBinOpMicrokernelTester()
333         .batch_size(batch_size)
334         .inplace_b(true)
335         .Test(xnn_f32_vadd_ukernel__sse_x8, VBinOpMicrokernelTester::OpType::Add);
336     }
337   }
338 
TEST(F32_VADD__SSE_X8,inplace_a_and_b)339   TEST(F32_VADD__SSE_X8, inplace_a_and_b) {
340     TEST_REQUIRES_X86_SSE;
341     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
342       VBinOpMicrokernelTester()
343         .batch_size(batch_size)
344         .inplace_a(true)
345         .inplace_b(true)
346         .Test(xnn_f32_vadd_ukernel__sse_x8, VBinOpMicrokernelTester::OpType::Add);
347     }
348   }
349 
TEST(F32_VADD__SSE_X8,qmin)350   TEST(F32_VADD__SSE_X8, qmin) {
351     TEST_REQUIRES_X86_SSE;
352     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
353       VBinOpMicrokernelTester()
354         .batch_size(batch_size)
355         .qmin(128)
356         .Test(xnn_f32_vadd_ukernel__sse_x8, VBinOpMicrokernelTester::OpType::Add);
357     }
358   }
359 
TEST(F32_VADD__SSE_X8,qmax)360   TEST(F32_VADD__SSE_X8, qmax) {
361     TEST_REQUIRES_X86_SSE;
362     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
363       VBinOpMicrokernelTester()
364         .batch_size(batch_size)
365         .qmax(128)
366         .Test(xnn_f32_vadd_ukernel__sse_x8, VBinOpMicrokernelTester::OpType::Add);
367     }
368   }
369 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
370 
371 
372 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VADD__AVX_X8,batch_eq_8)373   TEST(F32_VADD__AVX_X8, batch_eq_8) {
374     TEST_REQUIRES_X86_AVX;
375     VBinOpMicrokernelTester()
376       .batch_size(8)
377       .Test(xnn_f32_vadd_ukernel__avx_x8, VBinOpMicrokernelTester::OpType::Add);
378   }
379 
TEST(F32_VADD__AVX_X8,batch_div_8)380   TEST(F32_VADD__AVX_X8, batch_div_8) {
381     TEST_REQUIRES_X86_AVX;
382     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
383       VBinOpMicrokernelTester()
384         .batch_size(batch_size)
385         .Test(xnn_f32_vadd_ukernel__avx_x8, VBinOpMicrokernelTester::OpType::Add);
386     }
387   }
388 
TEST(F32_VADD__AVX_X8,batch_lt_8)389   TEST(F32_VADD__AVX_X8, batch_lt_8) {
390     TEST_REQUIRES_X86_AVX;
391     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
392       VBinOpMicrokernelTester()
393         .batch_size(batch_size)
394         .Test(xnn_f32_vadd_ukernel__avx_x8, VBinOpMicrokernelTester::OpType::Add);
395     }
396   }
397 
TEST(F32_VADD__AVX_X8,batch_gt_8)398   TEST(F32_VADD__AVX_X8, batch_gt_8) {
399     TEST_REQUIRES_X86_AVX;
400     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
401       VBinOpMicrokernelTester()
402         .batch_size(batch_size)
403         .Test(xnn_f32_vadd_ukernel__avx_x8, VBinOpMicrokernelTester::OpType::Add);
404     }
405   }
406 
TEST(F32_VADD__AVX_X8,inplace_a)407   TEST(F32_VADD__AVX_X8, inplace_a) {
408     TEST_REQUIRES_X86_AVX;
409     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
410       VBinOpMicrokernelTester()
411         .batch_size(batch_size)
412         .inplace_a(true)
413         .Test(xnn_f32_vadd_ukernel__avx_x8, VBinOpMicrokernelTester::OpType::Add);
414     }
415   }
416 
TEST(F32_VADD__AVX_X8,inplace_b)417   TEST(F32_VADD__AVX_X8, inplace_b) {
418     TEST_REQUIRES_X86_AVX;
419     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
420       VBinOpMicrokernelTester()
421         .batch_size(batch_size)
422         .inplace_b(true)
423         .Test(xnn_f32_vadd_ukernel__avx_x8, VBinOpMicrokernelTester::OpType::Add);
424     }
425   }
426 
TEST(F32_VADD__AVX_X8,inplace_a_and_b)427   TEST(F32_VADD__AVX_X8, inplace_a_and_b) {
428     TEST_REQUIRES_X86_AVX;
429     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
430       VBinOpMicrokernelTester()
431         .batch_size(batch_size)
432         .inplace_a(true)
433         .inplace_b(true)
434         .Test(xnn_f32_vadd_ukernel__avx_x8, VBinOpMicrokernelTester::OpType::Add);
435     }
436   }
437 
TEST(F32_VADD__AVX_X8,qmin)438   TEST(F32_VADD__AVX_X8, qmin) {
439     TEST_REQUIRES_X86_AVX;
440     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
441       VBinOpMicrokernelTester()
442         .batch_size(batch_size)
443         .qmin(128)
444         .Test(xnn_f32_vadd_ukernel__avx_x8, VBinOpMicrokernelTester::OpType::Add);
445     }
446   }
447 
TEST(F32_VADD__AVX_X8,qmax)448   TEST(F32_VADD__AVX_X8, qmax) {
449     TEST_REQUIRES_X86_AVX;
450     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
451       VBinOpMicrokernelTester()
452         .batch_size(batch_size)
453         .qmax(128)
454         .Test(xnn_f32_vadd_ukernel__avx_x8, VBinOpMicrokernelTester::OpType::Add);
455     }
456   }
457 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
458 
459 
460 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VADD__AVX_X16,batch_eq_16)461   TEST(F32_VADD__AVX_X16, batch_eq_16) {
462     TEST_REQUIRES_X86_AVX;
463     VBinOpMicrokernelTester()
464       .batch_size(16)
465       .Test(xnn_f32_vadd_ukernel__avx_x16, VBinOpMicrokernelTester::OpType::Add);
466   }
467 
TEST(F32_VADD__AVX_X16,batch_div_16)468   TEST(F32_VADD__AVX_X16, batch_div_16) {
469     TEST_REQUIRES_X86_AVX;
470     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
471       VBinOpMicrokernelTester()
472         .batch_size(batch_size)
473         .Test(xnn_f32_vadd_ukernel__avx_x16, VBinOpMicrokernelTester::OpType::Add);
474     }
475   }
476 
TEST(F32_VADD__AVX_X16,batch_lt_16)477   TEST(F32_VADD__AVX_X16, batch_lt_16) {
478     TEST_REQUIRES_X86_AVX;
479     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
480       VBinOpMicrokernelTester()
481         .batch_size(batch_size)
482         .Test(xnn_f32_vadd_ukernel__avx_x16, VBinOpMicrokernelTester::OpType::Add);
483     }
484   }
485 
TEST(F32_VADD__AVX_X16,batch_gt_16)486   TEST(F32_VADD__AVX_X16, batch_gt_16) {
487     TEST_REQUIRES_X86_AVX;
488     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
489       VBinOpMicrokernelTester()
490         .batch_size(batch_size)
491         .Test(xnn_f32_vadd_ukernel__avx_x16, VBinOpMicrokernelTester::OpType::Add);
492     }
493   }
494 
TEST(F32_VADD__AVX_X16,inplace_a)495   TEST(F32_VADD__AVX_X16, inplace_a) {
496     TEST_REQUIRES_X86_AVX;
497     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
498       VBinOpMicrokernelTester()
499         .batch_size(batch_size)
500         .inplace_a(true)
501         .Test(xnn_f32_vadd_ukernel__avx_x16, VBinOpMicrokernelTester::OpType::Add);
502     }
503   }
504 
TEST(F32_VADD__AVX_X16,inplace_b)505   TEST(F32_VADD__AVX_X16, inplace_b) {
506     TEST_REQUIRES_X86_AVX;
507     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
508       VBinOpMicrokernelTester()
509         .batch_size(batch_size)
510         .inplace_b(true)
511         .Test(xnn_f32_vadd_ukernel__avx_x16, VBinOpMicrokernelTester::OpType::Add);
512     }
513   }
514 
TEST(F32_VADD__AVX_X16,inplace_a_and_b)515   TEST(F32_VADD__AVX_X16, inplace_a_and_b) {
516     TEST_REQUIRES_X86_AVX;
517     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
518       VBinOpMicrokernelTester()
519         .batch_size(batch_size)
520         .inplace_a(true)
521         .inplace_b(true)
522         .Test(xnn_f32_vadd_ukernel__avx_x16, VBinOpMicrokernelTester::OpType::Add);
523     }
524   }
525 
TEST(F32_VADD__AVX_X16,qmin)526   TEST(F32_VADD__AVX_X16, qmin) {
527     TEST_REQUIRES_X86_AVX;
528     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
529       VBinOpMicrokernelTester()
530         .batch_size(batch_size)
531         .qmin(128)
532         .Test(xnn_f32_vadd_ukernel__avx_x16, VBinOpMicrokernelTester::OpType::Add);
533     }
534   }
535 
TEST(F32_VADD__AVX_X16,qmax)536   TEST(F32_VADD__AVX_X16, qmax) {
537     TEST_REQUIRES_X86_AVX;
538     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
539       VBinOpMicrokernelTester()
540         .batch_size(batch_size)
541         .qmax(128)
542         .Test(xnn_f32_vadd_ukernel__avx_x16, VBinOpMicrokernelTester::OpType::Add);
543     }
544   }
545 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
546 
547 
548 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VADD__AVX512F_X16,batch_eq_16)549   TEST(F32_VADD__AVX512F_X16, batch_eq_16) {
550     TEST_REQUIRES_X86_AVX512F;
551     VBinOpMicrokernelTester()
552       .batch_size(16)
553       .Test(xnn_f32_vadd_ukernel__avx512f_x16, VBinOpMicrokernelTester::OpType::Add);
554   }
555 
TEST(F32_VADD__AVX512F_X16,batch_div_16)556   TEST(F32_VADD__AVX512F_X16, batch_div_16) {
557     TEST_REQUIRES_X86_AVX512F;
558     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
559       VBinOpMicrokernelTester()
560         .batch_size(batch_size)
561         .Test(xnn_f32_vadd_ukernel__avx512f_x16, VBinOpMicrokernelTester::OpType::Add);
562     }
563   }
564 
TEST(F32_VADD__AVX512F_X16,batch_lt_16)565   TEST(F32_VADD__AVX512F_X16, batch_lt_16) {
566     TEST_REQUIRES_X86_AVX512F;
567     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
568       VBinOpMicrokernelTester()
569         .batch_size(batch_size)
570         .Test(xnn_f32_vadd_ukernel__avx512f_x16, VBinOpMicrokernelTester::OpType::Add);
571     }
572   }
573 
TEST(F32_VADD__AVX512F_X16,batch_gt_16)574   TEST(F32_VADD__AVX512F_X16, batch_gt_16) {
575     TEST_REQUIRES_X86_AVX512F;
576     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
577       VBinOpMicrokernelTester()
578         .batch_size(batch_size)
579         .Test(xnn_f32_vadd_ukernel__avx512f_x16, VBinOpMicrokernelTester::OpType::Add);
580     }
581   }
582 
TEST(F32_VADD__AVX512F_X16,inplace_a)583   TEST(F32_VADD__AVX512F_X16, inplace_a) {
584     TEST_REQUIRES_X86_AVX512F;
585     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
586       VBinOpMicrokernelTester()
587         .batch_size(batch_size)
588         .inplace_a(true)
589         .Test(xnn_f32_vadd_ukernel__avx512f_x16, VBinOpMicrokernelTester::OpType::Add);
590     }
591   }
592 
TEST(F32_VADD__AVX512F_X16,inplace_b)593   TEST(F32_VADD__AVX512F_X16, inplace_b) {
594     TEST_REQUIRES_X86_AVX512F;
595     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
596       VBinOpMicrokernelTester()
597         .batch_size(batch_size)
598         .inplace_b(true)
599         .Test(xnn_f32_vadd_ukernel__avx512f_x16, VBinOpMicrokernelTester::OpType::Add);
600     }
601   }
602 
TEST(F32_VADD__AVX512F_X16,inplace_a_and_b)603   TEST(F32_VADD__AVX512F_X16, inplace_a_and_b) {
604     TEST_REQUIRES_X86_AVX512F;
605     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
606       VBinOpMicrokernelTester()
607         .batch_size(batch_size)
608         .inplace_a(true)
609         .inplace_b(true)
610         .Test(xnn_f32_vadd_ukernel__avx512f_x16, VBinOpMicrokernelTester::OpType::Add);
611     }
612   }
613 
TEST(F32_VADD__AVX512F_X16,qmin)614   TEST(F32_VADD__AVX512F_X16, qmin) {
615     TEST_REQUIRES_X86_AVX512F;
616     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
617       VBinOpMicrokernelTester()
618         .batch_size(batch_size)
619         .qmin(128)
620         .Test(xnn_f32_vadd_ukernel__avx512f_x16, VBinOpMicrokernelTester::OpType::Add);
621     }
622   }
623 
TEST(F32_VADD__AVX512F_X16,qmax)624   TEST(F32_VADD__AVX512F_X16, qmax) {
625     TEST_REQUIRES_X86_AVX512F;
626     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
627       VBinOpMicrokernelTester()
628         .batch_size(batch_size)
629         .qmax(128)
630         .Test(xnn_f32_vadd_ukernel__avx512f_x16, VBinOpMicrokernelTester::OpType::Add);
631     }
632   }
633 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
634 
635 
636 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VADD__AVX512F_X32,batch_eq_32)637   TEST(F32_VADD__AVX512F_X32, batch_eq_32) {
638     TEST_REQUIRES_X86_AVX512F;
639     VBinOpMicrokernelTester()
640       .batch_size(32)
641       .Test(xnn_f32_vadd_ukernel__avx512f_x32, VBinOpMicrokernelTester::OpType::Add);
642   }
643 
TEST(F32_VADD__AVX512F_X32,batch_div_32)644   TEST(F32_VADD__AVX512F_X32, batch_div_32) {
645     TEST_REQUIRES_X86_AVX512F;
646     for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
647       VBinOpMicrokernelTester()
648         .batch_size(batch_size)
649         .Test(xnn_f32_vadd_ukernel__avx512f_x32, VBinOpMicrokernelTester::OpType::Add);
650     }
651   }
652 
TEST(F32_VADD__AVX512F_X32,batch_lt_32)653   TEST(F32_VADD__AVX512F_X32, batch_lt_32) {
654     TEST_REQUIRES_X86_AVX512F;
655     for (size_t batch_size = 1; batch_size < 32; batch_size++) {
656       VBinOpMicrokernelTester()
657         .batch_size(batch_size)
658         .Test(xnn_f32_vadd_ukernel__avx512f_x32, VBinOpMicrokernelTester::OpType::Add);
659     }
660   }
661 
TEST(F32_VADD__AVX512F_X32,batch_gt_32)662   TEST(F32_VADD__AVX512F_X32, batch_gt_32) {
663     TEST_REQUIRES_X86_AVX512F;
664     for (size_t batch_size = 33; batch_size < 64; batch_size++) {
665       VBinOpMicrokernelTester()
666         .batch_size(batch_size)
667         .Test(xnn_f32_vadd_ukernel__avx512f_x32, VBinOpMicrokernelTester::OpType::Add);
668     }
669   }
670 
TEST(F32_VADD__AVX512F_X32,inplace_a)671   TEST(F32_VADD__AVX512F_X32, inplace_a) {
672     TEST_REQUIRES_X86_AVX512F;
673     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
674       VBinOpMicrokernelTester()
675         .batch_size(batch_size)
676         .inplace_a(true)
677         .Test(xnn_f32_vadd_ukernel__avx512f_x32, VBinOpMicrokernelTester::OpType::Add);
678     }
679   }
680 
TEST(F32_VADD__AVX512F_X32,inplace_b)681   TEST(F32_VADD__AVX512F_X32, inplace_b) {
682     TEST_REQUIRES_X86_AVX512F;
683     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
684       VBinOpMicrokernelTester()
685         .batch_size(batch_size)
686         .inplace_b(true)
687         .Test(xnn_f32_vadd_ukernel__avx512f_x32, VBinOpMicrokernelTester::OpType::Add);
688     }
689   }
690 
TEST(F32_VADD__AVX512F_X32,inplace_a_and_b)691   TEST(F32_VADD__AVX512F_X32, inplace_a_and_b) {
692     TEST_REQUIRES_X86_AVX512F;
693     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
694       VBinOpMicrokernelTester()
695         .batch_size(batch_size)
696         .inplace_a(true)
697         .inplace_b(true)
698         .Test(xnn_f32_vadd_ukernel__avx512f_x32, VBinOpMicrokernelTester::OpType::Add);
699     }
700   }
701 
TEST(F32_VADD__AVX512F_X32,qmin)702   TEST(F32_VADD__AVX512F_X32, qmin) {
703     TEST_REQUIRES_X86_AVX512F;
704     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
705       VBinOpMicrokernelTester()
706         .batch_size(batch_size)
707         .qmin(128)
708         .Test(xnn_f32_vadd_ukernel__avx512f_x32, VBinOpMicrokernelTester::OpType::Add);
709     }
710   }
711 
TEST(F32_VADD__AVX512F_X32,qmax)712   TEST(F32_VADD__AVX512F_X32, qmax) {
713     TEST_REQUIRES_X86_AVX512F;
714     for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
715       VBinOpMicrokernelTester()
716         .batch_size(batch_size)
717         .qmax(128)
718         .Test(xnn_f32_vadd_ukernel__avx512f_x32, VBinOpMicrokernelTester::OpType::Add);
719     }
720   }
721 #endif  // XNN_ARCH_X86 || XNN_ARCH_X86_64
722 
723 
724 #if !XNN_ARCH_ASMJS && !XNN_ARCH_WASM
TEST(F32_VADD__PSIMD_X4,batch_eq_4)725   TEST(F32_VADD__PSIMD_X4, batch_eq_4) {
726     TEST_REQUIRES_PSIMD;
727     VBinOpMicrokernelTester()
728       .batch_size(4)
729       .Test(xnn_f32_vadd_ukernel__psimd_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
730   }
731 
TEST(F32_VADD__PSIMD_X4,batch_div_4)732   TEST(F32_VADD__PSIMD_X4, batch_div_4) {
733     TEST_REQUIRES_PSIMD;
734     for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
735       VBinOpMicrokernelTester()
736         .batch_size(batch_size)
737         .Test(xnn_f32_vadd_ukernel__psimd_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
738     }
739   }
740 
TEST(F32_VADD__PSIMD_X4,batch_lt_4)741   TEST(F32_VADD__PSIMD_X4, batch_lt_4) {
742     TEST_REQUIRES_PSIMD;
743     for (size_t batch_size = 1; batch_size < 4; batch_size++) {
744       VBinOpMicrokernelTester()
745         .batch_size(batch_size)
746         .Test(xnn_f32_vadd_ukernel__psimd_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
747     }
748   }
749 
TEST(F32_VADD__PSIMD_X4,batch_gt_4)750   TEST(F32_VADD__PSIMD_X4, batch_gt_4) {
751     TEST_REQUIRES_PSIMD;
752     for (size_t batch_size = 5; batch_size < 8; batch_size++) {
753       VBinOpMicrokernelTester()
754         .batch_size(batch_size)
755         .Test(xnn_f32_vadd_ukernel__psimd_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
756     }
757   }
758 
TEST(F32_VADD__PSIMD_X4,inplace_a)759   TEST(F32_VADD__PSIMD_X4, inplace_a) {
760     TEST_REQUIRES_PSIMD;
761     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
762       VBinOpMicrokernelTester()
763         .batch_size(batch_size)
764         .inplace_a(true)
765         .Test(xnn_f32_vadd_ukernel__psimd_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
766     }
767   }
768 
TEST(F32_VADD__PSIMD_X4,inplace_b)769   TEST(F32_VADD__PSIMD_X4, inplace_b) {
770     TEST_REQUIRES_PSIMD;
771     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
772       VBinOpMicrokernelTester()
773         .batch_size(batch_size)
774         .inplace_b(true)
775         .Test(xnn_f32_vadd_ukernel__psimd_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
776     }
777   }
778 
TEST(F32_VADD__PSIMD_X4,inplace_a_and_b)779   TEST(F32_VADD__PSIMD_X4, inplace_a_and_b) {
780     TEST_REQUIRES_PSIMD;
781     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
782       VBinOpMicrokernelTester()
783         .batch_size(batch_size)
784         .inplace_a(true)
785         .inplace_b(true)
786         .Test(xnn_f32_vadd_ukernel__psimd_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
787     }
788   }
789 
TEST(F32_VADD__PSIMD_X4,qmin)790   TEST(F32_VADD__PSIMD_X4, qmin) {
791     TEST_REQUIRES_PSIMD;
792     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
793       VBinOpMicrokernelTester()
794         .batch_size(batch_size)
795         .qmin(128)
796         .Test(xnn_f32_vadd_ukernel__psimd_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
797     }
798   }
799 
TEST(F32_VADD__PSIMD_X4,qmax)800   TEST(F32_VADD__PSIMD_X4, qmax) {
801     TEST_REQUIRES_PSIMD;
802     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
803       VBinOpMicrokernelTester()
804         .batch_size(batch_size)
805         .qmax(128)
806         .Test(xnn_f32_vadd_ukernel__psimd_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
807     }
808   }
809 #endif  // !XNN_ARCH_ASMJS && !XNN_ARCH_WASM
810 
811 
812 #if !XNN_ARCH_ASMJS && !XNN_ARCH_WASM
TEST(F32_VADD__PSIMD_X8,batch_eq_8)813   TEST(F32_VADD__PSIMD_X8, batch_eq_8) {
814     TEST_REQUIRES_PSIMD;
815     VBinOpMicrokernelTester()
816       .batch_size(8)
817       .Test(xnn_f32_vadd_ukernel__psimd_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
818   }
819 
TEST(F32_VADD__PSIMD_X8,batch_div_8)820   TEST(F32_VADD__PSIMD_X8, batch_div_8) {
821     TEST_REQUIRES_PSIMD;
822     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
823       VBinOpMicrokernelTester()
824         .batch_size(batch_size)
825         .Test(xnn_f32_vadd_ukernel__psimd_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
826     }
827   }
828 
TEST(F32_VADD__PSIMD_X8,batch_lt_8)829   TEST(F32_VADD__PSIMD_X8, batch_lt_8) {
830     TEST_REQUIRES_PSIMD;
831     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
832       VBinOpMicrokernelTester()
833         .batch_size(batch_size)
834         .Test(xnn_f32_vadd_ukernel__psimd_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
835     }
836   }
837 
TEST(F32_VADD__PSIMD_X8,batch_gt_8)838   TEST(F32_VADD__PSIMD_X8, batch_gt_8) {
839     TEST_REQUIRES_PSIMD;
840     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
841       VBinOpMicrokernelTester()
842         .batch_size(batch_size)
843         .Test(xnn_f32_vadd_ukernel__psimd_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
844     }
845   }
846 
TEST(F32_VADD__PSIMD_X8,inplace_a)847   TEST(F32_VADD__PSIMD_X8, inplace_a) {
848     TEST_REQUIRES_PSIMD;
849     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
850       VBinOpMicrokernelTester()
851         .batch_size(batch_size)
852         .inplace_a(true)
853         .Test(xnn_f32_vadd_ukernel__psimd_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
854     }
855   }
856 
TEST(F32_VADD__PSIMD_X8,inplace_b)857   TEST(F32_VADD__PSIMD_X8, inplace_b) {
858     TEST_REQUIRES_PSIMD;
859     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
860       VBinOpMicrokernelTester()
861         .batch_size(batch_size)
862         .inplace_b(true)
863         .Test(xnn_f32_vadd_ukernel__psimd_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
864     }
865   }
866 
TEST(F32_VADD__PSIMD_X8,inplace_a_and_b)867   TEST(F32_VADD__PSIMD_X8, inplace_a_and_b) {
868     TEST_REQUIRES_PSIMD;
869     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
870       VBinOpMicrokernelTester()
871         .batch_size(batch_size)
872         .inplace_a(true)
873         .inplace_b(true)
874         .Test(xnn_f32_vadd_ukernel__psimd_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
875     }
876   }
877 
TEST(F32_VADD__PSIMD_X8,qmin)878   TEST(F32_VADD__PSIMD_X8, qmin) {
879     TEST_REQUIRES_PSIMD;
880     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
881       VBinOpMicrokernelTester()
882         .batch_size(batch_size)
883         .qmin(128)
884         .Test(xnn_f32_vadd_ukernel__psimd_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
885     }
886   }
887 
TEST(F32_VADD__PSIMD_X8,qmax)888   TEST(F32_VADD__PSIMD_X8, qmax) {
889     TEST_REQUIRES_PSIMD;
890     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
891       VBinOpMicrokernelTester()
892         .batch_size(batch_size)
893         .qmax(128)
894         .Test(xnn_f32_vadd_ukernel__psimd_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
895     }
896   }
897 #endif  // !XNN_ARCH_ASMJS && !XNN_ARCH_WASM
898 
899 
900 #if XNN_ARCH_WASM
TEST(F32_VADD__WASM_X1,batch_eq_1)901   TEST(F32_VADD__WASM_X1, batch_eq_1) {
902     VBinOpMicrokernelTester()
903       .batch_size(1)
904       .Test(xnn_f32_vadd_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
905   }
906 
TEST(F32_VADD__WASM_X1,batch_gt_1)907   TEST(F32_VADD__WASM_X1, batch_gt_1) {
908     for (size_t batch_size = 2; batch_size < 10; batch_size++) {
909       VBinOpMicrokernelTester()
910         .batch_size(batch_size)
911         .Test(xnn_f32_vadd_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
912     }
913   }
914 
TEST(F32_VADD__WASM_X1,inplace_a)915   TEST(F32_VADD__WASM_X1, inplace_a) {
916     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
917       VBinOpMicrokernelTester()
918         .batch_size(batch_size)
919         .inplace_a(true)
920         .Test(xnn_f32_vadd_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
921     }
922   }
923 
TEST(F32_VADD__WASM_X1,inplace_b)924   TEST(F32_VADD__WASM_X1, inplace_b) {
925     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
926       VBinOpMicrokernelTester()
927         .batch_size(batch_size)
928         .inplace_b(true)
929         .Test(xnn_f32_vadd_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
930     }
931   }
932 
TEST(F32_VADD__WASM_X1,inplace_a_and_b)933   TEST(F32_VADD__WASM_X1, inplace_a_and_b) {
934     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
935       VBinOpMicrokernelTester()
936         .batch_size(batch_size)
937         .inplace_a(true)
938         .inplace_b(true)
939         .Test(xnn_f32_vadd_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
940     }
941   }
942 
TEST(F32_VADD__WASM_X1,qmin)943   TEST(F32_VADD__WASM_X1, qmin) {
944     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
945       VBinOpMicrokernelTester()
946         .batch_size(batch_size)
947         .qmin(128)
948         .Test(xnn_f32_vadd_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
949     }
950   }
951 
TEST(F32_VADD__WASM_X1,qmax)952   TEST(F32_VADD__WASM_X1, qmax) {
953     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
954       VBinOpMicrokernelTester()
955         .batch_size(batch_size)
956         .qmax(128)
957         .Test(xnn_f32_vadd_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
958     }
959   }
960 #endif  // XNN_ARCH_WASM
961 
962 
963 #if XNN_ARCH_WASM
TEST(F32_VADD__WASM_X2,batch_eq_2)964   TEST(F32_VADD__WASM_X2, batch_eq_2) {
965     VBinOpMicrokernelTester()
966       .batch_size(2)
967       .Test(xnn_f32_vadd_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
968   }
969 
TEST(F32_VADD__WASM_X2,batch_div_2)970   TEST(F32_VADD__WASM_X2, batch_div_2) {
971     for (size_t batch_size = 4; batch_size < 20; batch_size += 2) {
972       VBinOpMicrokernelTester()
973         .batch_size(batch_size)
974         .Test(xnn_f32_vadd_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
975     }
976   }
977 
TEST(F32_VADD__WASM_X2,batch_lt_2)978   TEST(F32_VADD__WASM_X2, batch_lt_2) {
979     for (size_t batch_size = 1; batch_size < 2; batch_size++) {
980       VBinOpMicrokernelTester()
981         .batch_size(batch_size)
982         .Test(xnn_f32_vadd_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
983     }
984   }
985 
TEST(F32_VADD__WASM_X2,batch_gt_2)986   TEST(F32_VADD__WASM_X2, batch_gt_2) {
987     for (size_t batch_size = 3; batch_size < 4; batch_size++) {
988       VBinOpMicrokernelTester()
989         .batch_size(batch_size)
990         .Test(xnn_f32_vadd_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
991     }
992   }
993 
TEST(F32_VADD__WASM_X2,inplace_a)994   TEST(F32_VADD__WASM_X2, inplace_a) {
995     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
996       VBinOpMicrokernelTester()
997         .batch_size(batch_size)
998         .inplace_a(true)
999         .Test(xnn_f32_vadd_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1000     }
1001   }
1002 
TEST(F32_VADD__WASM_X2,inplace_b)1003   TEST(F32_VADD__WASM_X2, inplace_b) {
1004     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
1005       VBinOpMicrokernelTester()
1006         .batch_size(batch_size)
1007         .inplace_b(true)
1008         .Test(xnn_f32_vadd_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1009     }
1010   }
1011 
TEST(F32_VADD__WASM_X2,inplace_a_and_b)1012   TEST(F32_VADD__WASM_X2, inplace_a_and_b) {
1013     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
1014       VBinOpMicrokernelTester()
1015         .batch_size(batch_size)
1016         .inplace_a(true)
1017         .inplace_b(true)
1018         .Test(xnn_f32_vadd_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1019     }
1020   }
1021 
TEST(F32_VADD__WASM_X2,qmin)1022   TEST(F32_VADD__WASM_X2, qmin) {
1023     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
1024       VBinOpMicrokernelTester()
1025         .batch_size(batch_size)
1026         .qmin(128)
1027         .Test(xnn_f32_vadd_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1028     }
1029   }
1030 
TEST(F32_VADD__WASM_X2,qmax)1031   TEST(F32_VADD__WASM_X2, qmax) {
1032     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
1033       VBinOpMicrokernelTester()
1034         .batch_size(batch_size)
1035         .qmax(128)
1036         .Test(xnn_f32_vadd_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1037     }
1038   }
1039 #endif  // XNN_ARCH_WASM
1040 
1041 
1042 #if XNN_ARCH_WASM
TEST(F32_VADD__WASM_X4,batch_eq_4)1043   TEST(F32_VADD__WASM_X4, batch_eq_4) {
1044     VBinOpMicrokernelTester()
1045       .batch_size(4)
1046       .Test(xnn_f32_vadd_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1047   }
1048 
TEST(F32_VADD__WASM_X4,batch_div_4)1049   TEST(F32_VADD__WASM_X4, batch_div_4) {
1050     for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
1051       VBinOpMicrokernelTester()
1052         .batch_size(batch_size)
1053         .Test(xnn_f32_vadd_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1054     }
1055   }
1056 
TEST(F32_VADD__WASM_X4,batch_lt_4)1057   TEST(F32_VADD__WASM_X4, batch_lt_4) {
1058     for (size_t batch_size = 1; batch_size < 4; batch_size++) {
1059       VBinOpMicrokernelTester()
1060         .batch_size(batch_size)
1061         .Test(xnn_f32_vadd_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1062     }
1063   }
1064 
TEST(F32_VADD__WASM_X4,batch_gt_4)1065   TEST(F32_VADD__WASM_X4, batch_gt_4) {
1066     for (size_t batch_size = 5; batch_size < 8; batch_size++) {
1067       VBinOpMicrokernelTester()
1068         .batch_size(batch_size)
1069         .Test(xnn_f32_vadd_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1070     }
1071   }
1072 
TEST(F32_VADD__WASM_X4,inplace_a)1073   TEST(F32_VADD__WASM_X4, inplace_a) {
1074     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1075       VBinOpMicrokernelTester()
1076         .batch_size(batch_size)
1077         .inplace_a(true)
1078         .Test(xnn_f32_vadd_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1079     }
1080   }
1081 
TEST(F32_VADD__WASM_X4,inplace_b)1082   TEST(F32_VADD__WASM_X4, inplace_b) {
1083     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1084       VBinOpMicrokernelTester()
1085         .batch_size(batch_size)
1086         .inplace_b(true)
1087         .Test(xnn_f32_vadd_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1088     }
1089   }
1090 
TEST(F32_VADD__WASM_X4,inplace_a_and_b)1091   TEST(F32_VADD__WASM_X4, inplace_a_and_b) {
1092     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1093       VBinOpMicrokernelTester()
1094         .batch_size(batch_size)
1095         .inplace_a(true)
1096         .inplace_b(true)
1097         .Test(xnn_f32_vadd_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1098     }
1099   }
1100 
TEST(F32_VADD__WASM_X4,qmin)1101   TEST(F32_VADD__WASM_X4, qmin) {
1102     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1103       VBinOpMicrokernelTester()
1104         .batch_size(batch_size)
1105         .qmin(128)
1106         .Test(xnn_f32_vadd_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1107     }
1108   }
1109 
TEST(F32_VADD__WASM_X4,qmax)1110   TEST(F32_VADD__WASM_X4, qmax) {
1111     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1112       VBinOpMicrokernelTester()
1113         .batch_size(batch_size)
1114         .qmax(128)
1115         .Test(xnn_f32_vadd_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1116     }
1117   }
1118 #endif  // XNN_ARCH_WASM
1119 
1120 
TEST(F32_VADD__SCALAR_X1,batch_eq_1)1121 TEST(F32_VADD__SCALAR_X1, batch_eq_1) {
1122   VBinOpMicrokernelTester()
1123     .batch_size(1)
1124     .Test(xnn_f32_vadd_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1125 }
1126 
TEST(F32_VADD__SCALAR_X1,batch_gt_1)1127 TEST(F32_VADD__SCALAR_X1, batch_gt_1) {
1128   for (size_t batch_size = 2; batch_size < 10; batch_size++) {
1129     VBinOpMicrokernelTester()
1130       .batch_size(batch_size)
1131       .Test(xnn_f32_vadd_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1132   }
1133 }
1134 
TEST(F32_VADD__SCALAR_X1,inplace_a)1135 TEST(F32_VADD__SCALAR_X1, inplace_a) {
1136   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
1137     VBinOpMicrokernelTester()
1138       .batch_size(batch_size)
1139       .inplace_a(true)
1140       .Test(xnn_f32_vadd_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1141   }
1142 }
1143 
TEST(F32_VADD__SCALAR_X1,inplace_b)1144 TEST(F32_VADD__SCALAR_X1, inplace_b) {
1145   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
1146     VBinOpMicrokernelTester()
1147       .batch_size(batch_size)
1148       .inplace_b(true)
1149       .Test(xnn_f32_vadd_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1150   }
1151 }
1152 
TEST(F32_VADD__SCALAR_X1,inplace_a_and_b)1153 TEST(F32_VADD__SCALAR_X1, inplace_a_and_b) {
1154   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
1155     VBinOpMicrokernelTester()
1156       .batch_size(batch_size)
1157       .inplace_a(true)
1158       .inplace_b(true)
1159       .Test(xnn_f32_vadd_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1160   }
1161 }
1162 
TEST(F32_VADD__SCALAR_X1,qmin)1163 TEST(F32_VADD__SCALAR_X1, qmin) {
1164   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
1165     VBinOpMicrokernelTester()
1166       .batch_size(batch_size)
1167       .qmin(128)
1168       .Test(xnn_f32_vadd_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1169   }
1170 }
1171 
TEST(F32_VADD__SCALAR_X1,qmax)1172 TEST(F32_VADD__SCALAR_X1, qmax) {
1173   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
1174     VBinOpMicrokernelTester()
1175       .batch_size(batch_size)
1176       .qmax(128)
1177       .Test(xnn_f32_vadd_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1178   }
1179 }
1180 
TEST(F32_VADD__SCALAR_X2,batch_eq_2)1181 TEST(F32_VADD__SCALAR_X2, batch_eq_2) {
1182   VBinOpMicrokernelTester()
1183     .batch_size(2)
1184     .Test(xnn_f32_vadd_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1185 }
1186 
TEST(F32_VADD__SCALAR_X2,batch_div_2)1187 TEST(F32_VADD__SCALAR_X2, batch_div_2) {
1188   for (size_t batch_size = 4; batch_size < 20; batch_size += 2) {
1189     VBinOpMicrokernelTester()
1190       .batch_size(batch_size)
1191       .Test(xnn_f32_vadd_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1192   }
1193 }
1194 
TEST(F32_VADD__SCALAR_X2,batch_lt_2)1195 TEST(F32_VADD__SCALAR_X2, batch_lt_2) {
1196   for (size_t batch_size = 1; batch_size < 2; batch_size++) {
1197     VBinOpMicrokernelTester()
1198       .batch_size(batch_size)
1199       .Test(xnn_f32_vadd_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1200   }
1201 }
1202 
TEST(F32_VADD__SCALAR_X2,batch_gt_2)1203 TEST(F32_VADD__SCALAR_X2, batch_gt_2) {
1204   for (size_t batch_size = 3; batch_size < 4; batch_size++) {
1205     VBinOpMicrokernelTester()
1206       .batch_size(batch_size)
1207       .Test(xnn_f32_vadd_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1208   }
1209 }
1210 
TEST(F32_VADD__SCALAR_X2,inplace_a)1211 TEST(F32_VADD__SCALAR_X2, inplace_a) {
1212   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
1213     VBinOpMicrokernelTester()
1214       .batch_size(batch_size)
1215       .inplace_a(true)
1216       .Test(xnn_f32_vadd_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1217   }
1218 }
1219 
TEST(F32_VADD__SCALAR_X2,inplace_b)1220 TEST(F32_VADD__SCALAR_X2, inplace_b) {
1221   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
1222     VBinOpMicrokernelTester()
1223       .batch_size(batch_size)
1224       .inplace_b(true)
1225       .Test(xnn_f32_vadd_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1226   }
1227 }
1228 
TEST(F32_VADD__SCALAR_X2,inplace_a_and_b)1229 TEST(F32_VADD__SCALAR_X2, inplace_a_and_b) {
1230   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
1231     VBinOpMicrokernelTester()
1232       .batch_size(batch_size)
1233       .inplace_a(true)
1234       .inplace_b(true)
1235       .Test(xnn_f32_vadd_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1236   }
1237 }
1238 
TEST(F32_VADD__SCALAR_X2,qmin)1239 TEST(F32_VADD__SCALAR_X2, qmin) {
1240   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
1241     VBinOpMicrokernelTester()
1242       .batch_size(batch_size)
1243       .qmin(128)
1244       .Test(xnn_f32_vadd_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1245   }
1246 }
1247 
TEST(F32_VADD__SCALAR_X2,qmax)1248 TEST(F32_VADD__SCALAR_X2, qmax) {
1249   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
1250     VBinOpMicrokernelTester()
1251       .batch_size(batch_size)
1252       .qmax(128)
1253       .Test(xnn_f32_vadd_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1254   }
1255 }
1256 
TEST(F32_VADD__SCALAR_X4,batch_eq_4)1257 TEST(F32_VADD__SCALAR_X4, batch_eq_4) {
1258   VBinOpMicrokernelTester()
1259     .batch_size(4)
1260     .Test(xnn_f32_vadd_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1261 }
1262 
TEST(F32_VADD__SCALAR_X4,batch_div_4)1263 TEST(F32_VADD__SCALAR_X4, batch_div_4) {
1264   for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
1265     VBinOpMicrokernelTester()
1266       .batch_size(batch_size)
1267       .Test(xnn_f32_vadd_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1268   }
1269 }
1270 
TEST(F32_VADD__SCALAR_X4,batch_lt_4)1271 TEST(F32_VADD__SCALAR_X4, batch_lt_4) {
1272   for (size_t batch_size = 1; batch_size < 4; batch_size++) {
1273     VBinOpMicrokernelTester()
1274       .batch_size(batch_size)
1275       .Test(xnn_f32_vadd_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1276   }
1277 }
1278 
TEST(F32_VADD__SCALAR_X4,batch_gt_4)1279 TEST(F32_VADD__SCALAR_X4, batch_gt_4) {
1280   for (size_t batch_size = 5; batch_size < 8; batch_size++) {
1281     VBinOpMicrokernelTester()
1282       .batch_size(batch_size)
1283       .Test(xnn_f32_vadd_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1284   }
1285 }
1286 
TEST(F32_VADD__SCALAR_X4,inplace_a)1287 TEST(F32_VADD__SCALAR_X4, inplace_a) {
1288   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1289     VBinOpMicrokernelTester()
1290       .batch_size(batch_size)
1291       .inplace_a(true)
1292       .Test(xnn_f32_vadd_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1293   }
1294 }
1295 
TEST(F32_VADD__SCALAR_X4,inplace_b)1296 TEST(F32_VADD__SCALAR_X4, inplace_b) {
1297   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1298     VBinOpMicrokernelTester()
1299       .batch_size(batch_size)
1300       .inplace_b(true)
1301       .Test(xnn_f32_vadd_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1302   }
1303 }
1304 
TEST(F32_VADD__SCALAR_X4,inplace_a_and_b)1305 TEST(F32_VADD__SCALAR_X4, inplace_a_and_b) {
1306   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1307     VBinOpMicrokernelTester()
1308       .batch_size(batch_size)
1309       .inplace_a(true)
1310       .inplace_b(true)
1311       .Test(xnn_f32_vadd_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1312   }
1313 }
1314 
TEST(F32_VADD__SCALAR_X4,qmin)1315 TEST(F32_VADD__SCALAR_X4, qmin) {
1316   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1317     VBinOpMicrokernelTester()
1318       .batch_size(batch_size)
1319       .qmin(128)
1320       .Test(xnn_f32_vadd_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1321   }
1322 }
1323 
TEST(F32_VADD__SCALAR_X4,qmax)1324 TEST(F32_VADD__SCALAR_X4, qmax) {
1325   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
1326     VBinOpMicrokernelTester()
1327       .batch_size(batch_size)
1328       .qmax(128)
1329       .Test(xnn_f32_vadd_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
1330   }
1331 }