• 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-relu.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_WASMSIMD
TEST(F32_VADD_RELU__WASMSIMD_X4,batch_eq_4)21   TEST(F32_VADD_RELU__WASMSIMD_X4, batch_eq_4) {
22     VBinOpMicrokernelTester()
23       .batch_size(4)
24       .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x4, VBinOpMicrokernelTester::OpType::Add);
25   }
26 
TEST(F32_VADD_RELU__WASMSIMD_X4,batch_div_4)27   TEST(F32_VADD_RELU__WASMSIMD_X4, batch_div_4) {
28     for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
29       VBinOpMicrokernelTester()
30         .batch_size(batch_size)
31         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x4, VBinOpMicrokernelTester::OpType::Add);
32     }
33   }
34 
TEST(F32_VADD_RELU__WASMSIMD_X4,batch_lt_4)35   TEST(F32_VADD_RELU__WASMSIMD_X4, batch_lt_4) {
36     for (size_t batch_size = 1; batch_size < 4; batch_size++) {
37       VBinOpMicrokernelTester()
38         .batch_size(batch_size)
39         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x4, VBinOpMicrokernelTester::OpType::Add);
40     }
41   }
42 
TEST(F32_VADD_RELU__WASMSIMD_X4,batch_gt_4)43   TEST(F32_VADD_RELU__WASMSIMD_X4, batch_gt_4) {
44     for (size_t batch_size = 5; batch_size < 8; batch_size++) {
45       VBinOpMicrokernelTester()
46         .batch_size(batch_size)
47         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x4, VBinOpMicrokernelTester::OpType::Add);
48     }
49   }
50 
TEST(F32_VADD_RELU__WASMSIMD_X4,inplace_a)51   TEST(F32_VADD_RELU__WASMSIMD_X4, inplace_a) {
52     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
53       VBinOpMicrokernelTester()
54         .batch_size(batch_size)
55         .inplace_a(true)
56         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x4, VBinOpMicrokernelTester::OpType::Add);
57     }
58   }
59 
TEST(F32_VADD_RELU__WASMSIMD_X4,inplace_b)60   TEST(F32_VADD_RELU__WASMSIMD_X4, inplace_b) {
61     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
62       VBinOpMicrokernelTester()
63         .batch_size(batch_size)
64         .inplace_b(true)
65         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x4, VBinOpMicrokernelTester::OpType::Add);
66     }
67   }
68 
TEST(F32_VADD_RELU__WASMSIMD_X4,inplace_a_and_b)69   TEST(F32_VADD_RELU__WASMSIMD_X4, inplace_a_and_b) {
70     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
71       VBinOpMicrokernelTester()
72         .batch_size(batch_size)
73         .inplace_a(true)
74         .inplace_b(true)
75         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x4, VBinOpMicrokernelTester::OpType::Add);
76     }
77   }
78 #endif  // XNN_ARCH_WASMSIMD
79 
80 
81 #if XNN_ARCH_WASMSIMD
TEST(F32_VADD_RELU__WASMSIMD_X8,batch_eq_8)82   TEST(F32_VADD_RELU__WASMSIMD_X8, batch_eq_8) {
83     VBinOpMicrokernelTester()
84       .batch_size(8)
85       .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x8, VBinOpMicrokernelTester::OpType::Add);
86   }
87 
TEST(F32_VADD_RELU__WASMSIMD_X8,batch_div_8)88   TEST(F32_VADD_RELU__WASMSIMD_X8, batch_div_8) {
89     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
90       VBinOpMicrokernelTester()
91         .batch_size(batch_size)
92         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x8, VBinOpMicrokernelTester::OpType::Add);
93     }
94   }
95 
TEST(F32_VADD_RELU__WASMSIMD_X8,batch_lt_8)96   TEST(F32_VADD_RELU__WASMSIMD_X8, batch_lt_8) {
97     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
98       VBinOpMicrokernelTester()
99         .batch_size(batch_size)
100         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x8, VBinOpMicrokernelTester::OpType::Add);
101     }
102   }
103 
TEST(F32_VADD_RELU__WASMSIMD_X8,batch_gt_8)104   TEST(F32_VADD_RELU__WASMSIMD_X8, batch_gt_8) {
105     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
106       VBinOpMicrokernelTester()
107         .batch_size(batch_size)
108         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x8, VBinOpMicrokernelTester::OpType::Add);
109     }
110   }
111 
TEST(F32_VADD_RELU__WASMSIMD_X8,inplace_a)112   TEST(F32_VADD_RELU__WASMSIMD_X8, inplace_a) {
113     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
114       VBinOpMicrokernelTester()
115         .batch_size(batch_size)
116         .inplace_a(true)
117         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x8, VBinOpMicrokernelTester::OpType::Add);
118     }
119   }
120 
TEST(F32_VADD_RELU__WASMSIMD_X8,inplace_b)121   TEST(F32_VADD_RELU__WASMSIMD_X8, inplace_b) {
122     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
123       VBinOpMicrokernelTester()
124         .batch_size(batch_size)
125         .inplace_b(true)
126         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x8, VBinOpMicrokernelTester::OpType::Add);
127     }
128   }
129 
TEST(F32_VADD_RELU__WASMSIMD_X8,inplace_a_and_b)130   TEST(F32_VADD_RELU__WASMSIMD_X8, inplace_a_and_b) {
131     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
132       VBinOpMicrokernelTester()
133         .batch_size(batch_size)
134         .inplace_a(true)
135         .inplace_b(true)
136         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x8, VBinOpMicrokernelTester::OpType::Add);
137     }
138   }
139 #endif  // XNN_ARCH_WASMSIMD
140 
141 
142 #if XNN_ARCH_WASMSIMD
TEST(F32_VADD_RELU__WASMSIMD_X16,batch_eq_16)143   TEST(F32_VADD_RELU__WASMSIMD_X16, batch_eq_16) {
144     VBinOpMicrokernelTester()
145       .batch_size(16)
146       .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x16, VBinOpMicrokernelTester::OpType::Add);
147   }
148 
TEST(F32_VADD_RELU__WASMSIMD_X16,batch_div_16)149   TEST(F32_VADD_RELU__WASMSIMD_X16, batch_div_16) {
150     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
151       VBinOpMicrokernelTester()
152         .batch_size(batch_size)
153         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x16, VBinOpMicrokernelTester::OpType::Add);
154     }
155   }
156 
TEST(F32_VADD_RELU__WASMSIMD_X16,batch_lt_16)157   TEST(F32_VADD_RELU__WASMSIMD_X16, batch_lt_16) {
158     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
159       VBinOpMicrokernelTester()
160         .batch_size(batch_size)
161         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x16, VBinOpMicrokernelTester::OpType::Add);
162     }
163   }
164 
TEST(F32_VADD_RELU__WASMSIMD_X16,batch_gt_16)165   TEST(F32_VADD_RELU__WASMSIMD_X16, batch_gt_16) {
166     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
167       VBinOpMicrokernelTester()
168         .batch_size(batch_size)
169         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x16, VBinOpMicrokernelTester::OpType::Add);
170     }
171   }
172 
TEST(F32_VADD_RELU__WASMSIMD_X16,inplace_a)173   TEST(F32_VADD_RELU__WASMSIMD_X16, inplace_a) {
174     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
175       VBinOpMicrokernelTester()
176         .batch_size(batch_size)
177         .inplace_a(true)
178         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x16, VBinOpMicrokernelTester::OpType::Add);
179     }
180   }
181 
TEST(F32_VADD_RELU__WASMSIMD_X16,inplace_b)182   TEST(F32_VADD_RELU__WASMSIMD_X16, inplace_b) {
183     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
184       VBinOpMicrokernelTester()
185         .batch_size(batch_size)
186         .inplace_b(true)
187         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x16, VBinOpMicrokernelTester::OpType::Add);
188     }
189   }
190 
TEST(F32_VADD_RELU__WASMSIMD_X16,inplace_a_and_b)191   TEST(F32_VADD_RELU__WASMSIMD_X16, inplace_a_and_b) {
192     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
193       VBinOpMicrokernelTester()
194         .batch_size(batch_size)
195         .inplace_a(true)
196         .inplace_b(true)
197         .Test(xnn_f32_vadd_relu_ukernel__wasmsimd_x16, VBinOpMicrokernelTester::OpType::Add);
198     }
199   }
200 #endif  // XNN_ARCH_WASMSIMD
201 
202 
203 #if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
TEST(F32_VADD_RELU__WASM_X1,batch_eq_1)204   TEST(F32_VADD_RELU__WASM_X1, batch_eq_1) {
205     VBinOpMicrokernelTester()
206       .batch_size(1)
207       .Test(xnn_f32_vadd_relu_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add);
208   }
209 
TEST(F32_VADD_RELU__WASM_X1,batch_gt_1)210   TEST(F32_VADD_RELU__WASM_X1, batch_gt_1) {
211     for (size_t batch_size = 2; batch_size < 10; batch_size++) {
212       VBinOpMicrokernelTester()
213         .batch_size(batch_size)
214         .Test(xnn_f32_vadd_relu_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add);
215     }
216   }
217 
TEST(F32_VADD_RELU__WASM_X1,inplace_a)218   TEST(F32_VADD_RELU__WASM_X1, inplace_a) {
219     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
220       VBinOpMicrokernelTester()
221         .batch_size(batch_size)
222         .inplace_a(true)
223         .Test(xnn_f32_vadd_relu_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add);
224     }
225   }
226 
TEST(F32_VADD_RELU__WASM_X1,inplace_b)227   TEST(F32_VADD_RELU__WASM_X1, inplace_b) {
228     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
229       VBinOpMicrokernelTester()
230         .batch_size(batch_size)
231         .inplace_b(true)
232         .Test(xnn_f32_vadd_relu_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add);
233     }
234   }
235 
TEST(F32_VADD_RELU__WASM_X1,inplace_a_and_b)236   TEST(F32_VADD_RELU__WASM_X1, inplace_a_and_b) {
237     for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
238       VBinOpMicrokernelTester()
239         .batch_size(batch_size)
240         .inplace_a(true)
241         .inplace_b(true)
242         .Test(xnn_f32_vadd_relu_ukernel__wasm_x1, VBinOpMicrokernelTester::OpType::Add);
243     }
244   }
245 #endif  // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
246 
247 
248 #if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
TEST(F32_VADD_RELU__WASM_X2,batch_eq_2)249   TEST(F32_VADD_RELU__WASM_X2, batch_eq_2) {
250     VBinOpMicrokernelTester()
251       .batch_size(2)
252       .Test(xnn_f32_vadd_relu_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add);
253   }
254 
TEST(F32_VADD_RELU__WASM_X2,batch_div_2)255   TEST(F32_VADD_RELU__WASM_X2, batch_div_2) {
256     for (size_t batch_size = 4; batch_size < 20; batch_size += 2) {
257       VBinOpMicrokernelTester()
258         .batch_size(batch_size)
259         .Test(xnn_f32_vadd_relu_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add);
260     }
261   }
262 
TEST(F32_VADD_RELU__WASM_X2,batch_lt_2)263   TEST(F32_VADD_RELU__WASM_X2, batch_lt_2) {
264     for (size_t batch_size = 1; batch_size < 2; batch_size++) {
265       VBinOpMicrokernelTester()
266         .batch_size(batch_size)
267         .Test(xnn_f32_vadd_relu_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add);
268     }
269   }
270 
TEST(F32_VADD_RELU__WASM_X2,batch_gt_2)271   TEST(F32_VADD_RELU__WASM_X2, batch_gt_2) {
272     for (size_t batch_size = 3; batch_size < 4; batch_size++) {
273       VBinOpMicrokernelTester()
274         .batch_size(batch_size)
275         .Test(xnn_f32_vadd_relu_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add);
276     }
277   }
278 
TEST(F32_VADD_RELU__WASM_X2,inplace_a)279   TEST(F32_VADD_RELU__WASM_X2, inplace_a) {
280     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
281       VBinOpMicrokernelTester()
282         .batch_size(batch_size)
283         .inplace_a(true)
284         .Test(xnn_f32_vadd_relu_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add);
285     }
286   }
287 
TEST(F32_VADD_RELU__WASM_X2,inplace_b)288   TEST(F32_VADD_RELU__WASM_X2, inplace_b) {
289     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
290       VBinOpMicrokernelTester()
291         .batch_size(batch_size)
292         .inplace_b(true)
293         .Test(xnn_f32_vadd_relu_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add);
294     }
295   }
296 
TEST(F32_VADD_RELU__WASM_X2,inplace_a_and_b)297   TEST(F32_VADD_RELU__WASM_X2, inplace_a_and_b) {
298     for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
299       VBinOpMicrokernelTester()
300         .batch_size(batch_size)
301         .inplace_a(true)
302         .inplace_b(true)
303         .Test(xnn_f32_vadd_relu_ukernel__wasm_x2, VBinOpMicrokernelTester::OpType::Add);
304     }
305   }
306 #endif  // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
307 
308 
309 #if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
TEST(F32_VADD_RELU__WASM_X4,batch_eq_4)310   TEST(F32_VADD_RELU__WASM_X4, batch_eq_4) {
311     VBinOpMicrokernelTester()
312       .batch_size(4)
313       .Test(xnn_f32_vadd_relu_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add);
314   }
315 
TEST(F32_VADD_RELU__WASM_X4,batch_div_4)316   TEST(F32_VADD_RELU__WASM_X4, batch_div_4) {
317     for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
318       VBinOpMicrokernelTester()
319         .batch_size(batch_size)
320         .Test(xnn_f32_vadd_relu_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add);
321     }
322   }
323 
TEST(F32_VADD_RELU__WASM_X4,batch_lt_4)324   TEST(F32_VADD_RELU__WASM_X4, batch_lt_4) {
325     for (size_t batch_size = 1; batch_size < 4; batch_size++) {
326       VBinOpMicrokernelTester()
327         .batch_size(batch_size)
328         .Test(xnn_f32_vadd_relu_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add);
329     }
330   }
331 
TEST(F32_VADD_RELU__WASM_X4,batch_gt_4)332   TEST(F32_VADD_RELU__WASM_X4, batch_gt_4) {
333     for (size_t batch_size = 5; batch_size < 8; batch_size++) {
334       VBinOpMicrokernelTester()
335         .batch_size(batch_size)
336         .Test(xnn_f32_vadd_relu_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add);
337     }
338   }
339 
TEST(F32_VADD_RELU__WASM_X4,inplace_a)340   TEST(F32_VADD_RELU__WASM_X4, inplace_a) {
341     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
342       VBinOpMicrokernelTester()
343         .batch_size(batch_size)
344         .inplace_a(true)
345         .Test(xnn_f32_vadd_relu_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add);
346     }
347   }
348 
TEST(F32_VADD_RELU__WASM_X4,inplace_b)349   TEST(F32_VADD_RELU__WASM_X4, inplace_b) {
350     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
351       VBinOpMicrokernelTester()
352         .batch_size(batch_size)
353         .inplace_b(true)
354         .Test(xnn_f32_vadd_relu_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add);
355     }
356   }
357 
TEST(F32_VADD_RELU__WASM_X4,inplace_a_and_b)358   TEST(F32_VADD_RELU__WASM_X4, inplace_a_and_b) {
359     for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
360       VBinOpMicrokernelTester()
361         .batch_size(batch_size)
362         .inplace_a(true)
363         .inplace_b(true)
364         .Test(xnn_f32_vadd_relu_ukernel__wasm_x4, VBinOpMicrokernelTester::OpType::Add);
365     }
366   }
367 #endif  // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
368 
369 
370 #if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
TEST(F32_VADD_RELU__WASM_X8,batch_eq_8)371   TEST(F32_VADD_RELU__WASM_X8, batch_eq_8) {
372     VBinOpMicrokernelTester()
373       .batch_size(8)
374       .Test(xnn_f32_vadd_relu_ukernel__wasm_x8, VBinOpMicrokernelTester::OpType::Add);
375   }
376 
TEST(F32_VADD_RELU__WASM_X8,batch_div_8)377   TEST(F32_VADD_RELU__WASM_X8, batch_div_8) {
378     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
379       VBinOpMicrokernelTester()
380         .batch_size(batch_size)
381         .Test(xnn_f32_vadd_relu_ukernel__wasm_x8, VBinOpMicrokernelTester::OpType::Add);
382     }
383   }
384 
TEST(F32_VADD_RELU__WASM_X8,batch_lt_8)385   TEST(F32_VADD_RELU__WASM_X8, batch_lt_8) {
386     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
387       VBinOpMicrokernelTester()
388         .batch_size(batch_size)
389         .Test(xnn_f32_vadd_relu_ukernel__wasm_x8, VBinOpMicrokernelTester::OpType::Add);
390     }
391   }
392 
TEST(F32_VADD_RELU__WASM_X8,batch_gt_8)393   TEST(F32_VADD_RELU__WASM_X8, batch_gt_8) {
394     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
395       VBinOpMicrokernelTester()
396         .batch_size(batch_size)
397         .Test(xnn_f32_vadd_relu_ukernel__wasm_x8, VBinOpMicrokernelTester::OpType::Add);
398     }
399   }
400 
TEST(F32_VADD_RELU__WASM_X8,inplace_a)401   TEST(F32_VADD_RELU__WASM_X8, inplace_a) {
402     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
403       VBinOpMicrokernelTester()
404         .batch_size(batch_size)
405         .inplace_a(true)
406         .Test(xnn_f32_vadd_relu_ukernel__wasm_x8, VBinOpMicrokernelTester::OpType::Add);
407     }
408   }
409 
TEST(F32_VADD_RELU__WASM_X8,inplace_b)410   TEST(F32_VADD_RELU__WASM_X8, inplace_b) {
411     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
412       VBinOpMicrokernelTester()
413         .batch_size(batch_size)
414         .inplace_b(true)
415         .Test(xnn_f32_vadd_relu_ukernel__wasm_x8, VBinOpMicrokernelTester::OpType::Add);
416     }
417   }
418 
TEST(F32_VADD_RELU__WASM_X8,inplace_a_and_b)419   TEST(F32_VADD_RELU__WASM_X8, inplace_a_and_b) {
420     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
421       VBinOpMicrokernelTester()
422         .batch_size(batch_size)
423         .inplace_a(true)
424         .inplace_b(true)
425         .Test(xnn_f32_vadd_relu_ukernel__wasm_x8, VBinOpMicrokernelTester::OpType::Add);
426     }
427   }
428 #endif  // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
429 
430 
TEST(F32_VADD_RELU__SCALAR_X1,batch_eq_1)431 TEST(F32_VADD_RELU__SCALAR_X1, batch_eq_1) {
432   VBinOpMicrokernelTester()
433     .batch_size(1)
434     .Test(xnn_f32_vadd_relu_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
435 }
436 
TEST(F32_VADD_RELU__SCALAR_X1,batch_gt_1)437 TEST(F32_VADD_RELU__SCALAR_X1, batch_gt_1) {
438   for (size_t batch_size = 2; batch_size < 10; batch_size++) {
439     VBinOpMicrokernelTester()
440       .batch_size(batch_size)
441       .Test(xnn_f32_vadd_relu_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
442   }
443 }
444 
TEST(F32_VADD_RELU__SCALAR_X1,inplace_a)445 TEST(F32_VADD_RELU__SCALAR_X1, inplace_a) {
446   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
447     VBinOpMicrokernelTester()
448       .batch_size(batch_size)
449       .inplace_a(true)
450       .Test(xnn_f32_vadd_relu_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
451   }
452 }
453 
TEST(F32_VADD_RELU__SCALAR_X1,inplace_b)454 TEST(F32_VADD_RELU__SCALAR_X1, inplace_b) {
455   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
456     VBinOpMicrokernelTester()
457       .batch_size(batch_size)
458       .inplace_b(true)
459       .Test(xnn_f32_vadd_relu_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
460   }
461 }
462 
TEST(F32_VADD_RELU__SCALAR_X1,inplace_a_and_b)463 TEST(F32_VADD_RELU__SCALAR_X1, inplace_a_and_b) {
464   for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
465     VBinOpMicrokernelTester()
466       .batch_size(batch_size)
467       .inplace_a(true)
468       .inplace_b(true)
469       .Test(xnn_f32_vadd_relu_ukernel__scalar_x1, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
470   }
471 }
472 
473 
TEST(F32_VADD_RELU__SCALAR_X2,batch_eq_2)474 TEST(F32_VADD_RELU__SCALAR_X2, batch_eq_2) {
475   VBinOpMicrokernelTester()
476     .batch_size(2)
477     .Test(xnn_f32_vadd_relu_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
478 }
479 
TEST(F32_VADD_RELU__SCALAR_X2,batch_div_2)480 TEST(F32_VADD_RELU__SCALAR_X2, batch_div_2) {
481   for (size_t batch_size = 4; batch_size < 20; batch_size += 2) {
482     VBinOpMicrokernelTester()
483       .batch_size(batch_size)
484       .Test(xnn_f32_vadd_relu_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
485   }
486 }
487 
TEST(F32_VADD_RELU__SCALAR_X2,batch_lt_2)488 TEST(F32_VADD_RELU__SCALAR_X2, batch_lt_2) {
489   for (size_t batch_size = 1; batch_size < 2; batch_size++) {
490     VBinOpMicrokernelTester()
491       .batch_size(batch_size)
492       .Test(xnn_f32_vadd_relu_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
493   }
494 }
495 
TEST(F32_VADD_RELU__SCALAR_X2,batch_gt_2)496 TEST(F32_VADD_RELU__SCALAR_X2, batch_gt_2) {
497   for (size_t batch_size = 3; batch_size < 4; batch_size++) {
498     VBinOpMicrokernelTester()
499       .batch_size(batch_size)
500       .Test(xnn_f32_vadd_relu_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
501   }
502 }
503 
TEST(F32_VADD_RELU__SCALAR_X2,inplace_a)504 TEST(F32_VADD_RELU__SCALAR_X2, inplace_a) {
505   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
506     VBinOpMicrokernelTester()
507       .batch_size(batch_size)
508       .inplace_a(true)
509       .Test(xnn_f32_vadd_relu_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
510   }
511 }
512 
TEST(F32_VADD_RELU__SCALAR_X2,inplace_b)513 TEST(F32_VADD_RELU__SCALAR_X2, inplace_b) {
514   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
515     VBinOpMicrokernelTester()
516       .batch_size(batch_size)
517       .inplace_b(true)
518       .Test(xnn_f32_vadd_relu_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
519   }
520 }
521 
TEST(F32_VADD_RELU__SCALAR_X2,inplace_a_and_b)522 TEST(F32_VADD_RELU__SCALAR_X2, inplace_a_and_b) {
523   for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
524     VBinOpMicrokernelTester()
525       .batch_size(batch_size)
526       .inplace_a(true)
527       .inplace_b(true)
528       .Test(xnn_f32_vadd_relu_ukernel__scalar_x2, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
529   }
530 }
531 
532 
TEST(F32_VADD_RELU__SCALAR_X4,batch_eq_4)533 TEST(F32_VADD_RELU__SCALAR_X4, batch_eq_4) {
534   VBinOpMicrokernelTester()
535     .batch_size(4)
536     .Test(xnn_f32_vadd_relu_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
537 }
538 
TEST(F32_VADD_RELU__SCALAR_X4,batch_div_4)539 TEST(F32_VADD_RELU__SCALAR_X4, batch_div_4) {
540   for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
541     VBinOpMicrokernelTester()
542       .batch_size(batch_size)
543       .Test(xnn_f32_vadd_relu_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
544   }
545 }
546 
TEST(F32_VADD_RELU__SCALAR_X4,batch_lt_4)547 TEST(F32_VADD_RELU__SCALAR_X4, batch_lt_4) {
548   for (size_t batch_size = 1; batch_size < 4; batch_size++) {
549     VBinOpMicrokernelTester()
550       .batch_size(batch_size)
551       .Test(xnn_f32_vadd_relu_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
552   }
553 }
554 
TEST(F32_VADD_RELU__SCALAR_X4,batch_gt_4)555 TEST(F32_VADD_RELU__SCALAR_X4, batch_gt_4) {
556   for (size_t batch_size = 5; batch_size < 8; batch_size++) {
557     VBinOpMicrokernelTester()
558       .batch_size(batch_size)
559       .Test(xnn_f32_vadd_relu_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
560   }
561 }
562 
TEST(F32_VADD_RELU__SCALAR_X4,inplace_a)563 TEST(F32_VADD_RELU__SCALAR_X4, inplace_a) {
564   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
565     VBinOpMicrokernelTester()
566       .batch_size(batch_size)
567       .inplace_a(true)
568       .Test(xnn_f32_vadd_relu_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
569   }
570 }
571 
TEST(F32_VADD_RELU__SCALAR_X4,inplace_b)572 TEST(F32_VADD_RELU__SCALAR_X4, inplace_b) {
573   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
574     VBinOpMicrokernelTester()
575       .batch_size(batch_size)
576       .inplace_b(true)
577       .Test(xnn_f32_vadd_relu_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
578   }
579 }
580 
TEST(F32_VADD_RELU__SCALAR_X4,inplace_a_and_b)581 TEST(F32_VADD_RELU__SCALAR_X4, inplace_a_and_b) {
582   for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
583     VBinOpMicrokernelTester()
584       .batch_size(batch_size)
585       .inplace_a(true)
586       .inplace_b(true)
587       .Test(xnn_f32_vadd_relu_ukernel__scalar_x4, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
588   }
589 }
590 
591 
TEST(F32_VADD_RELU__SCALAR_X8,batch_eq_8)592 TEST(F32_VADD_RELU__SCALAR_X8, batch_eq_8) {
593   VBinOpMicrokernelTester()
594     .batch_size(8)
595     .Test(xnn_f32_vadd_relu_ukernel__scalar_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
596 }
597 
TEST(F32_VADD_RELU__SCALAR_X8,batch_div_8)598 TEST(F32_VADD_RELU__SCALAR_X8, batch_div_8) {
599   for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
600     VBinOpMicrokernelTester()
601       .batch_size(batch_size)
602       .Test(xnn_f32_vadd_relu_ukernel__scalar_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
603   }
604 }
605 
TEST(F32_VADD_RELU__SCALAR_X8,batch_lt_8)606 TEST(F32_VADD_RELU__SCALAR_X8, batch_lt_8) {
607   for (size_t batch_size = 1; batch_size < 8; batch_size++) {
608     VBinOpMicrokernelTester()
609       .batch_size(batch_size)
610       .Test(xnn_f32_vadd_relu_ukernel__scalar_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
611   }
612 }
613 
TEST(F32_VADD_RELU__SCALAR_X8,batch_gt_8)614 TEST(F32_VADD_RELU__SCALAR_X8, batch_gt_8) {
615   for (size_t batch_size = 9; batch_size < 16; batch_size++) {
616     VBinOpMicrokernelTester()
617       .batch_size(batch_size)
618       .Test(xnn_f32_vadd_relu_ukernel__scalar_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
619   }
620 }
621 
TEST(F32_VADD_RELU__SCALAR_X8,inplace_a)622 TEST(F32_VADD_RELU__SCALAR_X8, inplace_a) {
623   for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
624     VBinOpMicrokernelTester()
625       .batch_size(batch_size)
626       .inplace_a(true)
627       .Test(xnn_f32_vadd_relu_ukernel__scalar_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
628   }
629 }
630 
TEST(F32_VADD_RELU__SCALAR_X8,inplace_b)631 TEST(F32_VADD_RELU__SCALAR_X8, inplace_b) {
632   for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
633     VBinOpMicrokernelTester()
634       .batch_size(batch_size)
635       .inplace_b(true)
636       .Test(xnn_f32_vadd_relu_ukernel__scalar_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
637   }
638 }
639 
TEST(F32_VADD_RELU__SCALAR_X8,inplace_a_and_b)640 TEST(F32_VADD_RELU__SCALAR_X8, inplace_a_and_b) {
641   for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
642     VBinOpMicrokernelTester()
643       .batch_size(batch_size)
644       .inplace_a(true)
645       .inplace_b(true)
646       .Test(xnn_f32_vadd_relu_ukernel__scalar_x8, VBinOpMicrokernelTester::OpType::Add, VBinOpMicrokernelTester::Variant::Scalar);
647   }
648 }
649