blob: b0a21864efd966884401ef73adfac4e583103011 [file] [log] [blame]
Frank Barchard674778d2020-08-08 10:17:25 -07001// 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-vsubc-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
Marat Dukhan87bd5112021-08-02 11:43:53 -070016#include <xnnpack/params-init.h>
Frank Barchard674778d2020-08-08 10:17:25 -070017#include <xnnpack/vbinary.h>
18#include "vbinaryc-microkernel-tester.h"
19
20
21#if XNN_ARCH_WASMSIMD
22 TEST(F32_VSUBC_RELU__WASMSIMD_X4, batch_eq_4) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070023 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070024 .batch_size(4)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070025 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -070026 }
27
28 TEST(F32_VSUBC_RELU__WASMSIMD_X4, batch_div_4) {
29 for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070030 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070031 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070032 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -070033 }
34 }
35
36 TEST(F32_VSUBC_RELU__WASMSIMD_X4, batch_lt_4) {
37 for (size_t batch_size = 1; batch_size < 4; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070038 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070039 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070040 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -070041 }
42 }
43
44 TEST(F32_VSUBC_RELU__WASMSIMD_X4, batch_gt_4) {
45 for (size_t batch_size = 5; batch_size < 8; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070046 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070047 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070048 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -070049 }
50 }
51
52 TEST(F32_VSUBC_RELU__WASMSIMD_X4, inplace) {
53 for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070054 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070055 .batch_size(batch_size)
56 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070057 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -070058 }
59 }
60#endif // XNN_ARCH_WASMSIMD
61
62
63#if XNN_ARCH_WASMSIMD
64 TEST(F32_VSUBC_RELU__WASMSIMD_X8, batch_eq_8) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070065 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070066 .batch_size(8)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070067 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -070068 }
69
70 TEST(F32_VSUBC_RELU__WASMSIMD_X8, batch_div_8) {
71 for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070072 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070073 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070074 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -070075 }
76 }
77
78 TEST(F32_VSUBC_RELU__WASMSIMD_X8, batch_lt_8) {
79 for (size_t batch_size = 1; batch_size < 8; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070080 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070081 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070082 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -070083 }
84 }
85
86 TEST(F32_VSUBC_RELU__WASMSIMD_X8, batch_gt_8) {
87 for (size_t batch_size = 9; batch_size < 16; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070088 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070089 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070090 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -070091 }
92 }
93
94 TEST(F32_VSUBC_RELU__WASMSIMD_X8, inplace) {
95 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -070096 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -070097 .batch_size(batch_size)
98 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -070099 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700100 }
101 }
102#endif // XNN_ARCH_WASMSIMD
103
104
Frank Barchard9c7308f2020-08-31 17:03:01 -0700105#if XNN_ARCH_WASMSIMD
106 TEST(F32_VSUBC_RELU__WASMSIMD_X16, batch_eq_16) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700107 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700108 .batch_size(16)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700109 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700110 }
111
112 TEST(F32_VSUBC_RELU__WASMSIMD_X16, batch_div_16) {
113 for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700114 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700115 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700116 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700117 }
118 }
119
120 TEST(F32_VSUBC_RELU__WASMSIMD_X16, batch_lt_16) {
121 for (size_t batch_size = 1; batch_size < 16; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700122 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700123 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700124 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700125 }
126 }
127
128 TEST(F32_VSUBC_RELU__WASMSIMD_X16, batch_gt_16) {
129 for (size_t batch_size = 17; batch_size < 32; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700130 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700131 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700132 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700133 }
134 }
135
136 TEST(F32_VSUBC_RELU__WASMSIMD_X16, inplace) {
137 for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700138 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700139 .batch_size(batch_size)
140 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700141 .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700142 }
143 }
144#endif // XNN_ARCH_WASMSIMD
145
146
Frank Barchard674778d2020-08-08 10:17:25 -0700147#if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
148 TEST(F32_VSUBC_RELU__WASM_X1, batch_eq_1) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700149 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700150 .batch_size(1)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700151 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x1, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700152 }
153
154 TEST(F32_VSUBC_RELU__WASM_X1, batch_gt_1) {
155 for (size_t batch_size = 2; batch_size < 10; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700156 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700157 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700158 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x1, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700159 }
160 }
161
162 TEST(F32_VSUBC_RELU__WASM_X1, inplace) {
163 for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700164 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700165 .batch_size(batch_size)
166 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700167 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x1, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700168 }
169 }
170#endif // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
171
172
173#if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
174 TEST(F32_VSUBC_RELU__WASM_X2, batch_eq_2) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700175 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700176 .batch_size(2)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700177 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700178 }
179
180 TEST(F32_VSUBC_RELU__WASM_X2, batch_div_2) {
181 for (size_t batch_size = 4; batch_size < 20; batch_size += 2) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700182 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700183 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700184 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700185 }
186 }
187
188 TEST(F32_VSUBC_RELU__WASM_X2, batch_lt_2) {
189 for (size_t batch_size = 1; batch_size < 2; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700190 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700191 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700192 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700193 }
194 }
195
196 TEST(F32_VSUBC_RELU__WASM_X2, batch_gt_2) {
197 for (size_t batch_size = 3; batch_size < 4; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700198 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700199 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700200 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700201 }
202 }
203
204 TEST(F32_VSUBC_RELU__WASM_X2, inplace) {
205 for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700206 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700207 .batch_size(batch_size)
208 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700209 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700210 }
211 }
212#endif // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
213
214
215#if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
216 TEST(F32_VSUBC_RELU__WASM_X4, batch_eq_4) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700217 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700218 .batch_size(4)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700219 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700220 }
221
222 TEST(F32_VSUBC_RELU__WASM_X4, batch_div_4) {
223 for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700224 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700225 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700226 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700227 }
228 }
229
230 TEST(F32_VSUBC_RELU__WASM_X4, batch_lt_4) {
231 for (size_t batch_size = 1; batch_size < 4; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700232 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700233 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700234 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700235 }
236 }
237
238 TEST(F32_VSUBC_RELU__WASM_X4, batch_gt_4) {
239 for (size_t batch_size = 5; batch_size < 8; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700240 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700241 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700242 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700243 }
244 }
245
246 TEST(F32_VSUBC_RELU__WASM_X4, inplace) {
247 for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700248 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700249 .batch_size(batch_size)
250 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700251 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard674778d2020-08-08 10:17:25 -0700252 }
253 }
254#endif // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
255
256
Frank Barchard9c7308f2020-08-31 17:03:01 -0700257#if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
258 TEST(F32_VSUBC_RELU__WASM_X8, batch_eq_8) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700259 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700260 .batch_size(8)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700261 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700262 }
263
264 TEST(F32_VSUBC_RELU__WASM_X8, batch_div_8) {
265 for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700266 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700267 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700268 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700269 }
270 }
271
272 TEST(F32_VSUBC_RELU__WASM_X8, batch_lt_8) {
273 for (size_t batch_size = 1; batch_size < 8; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700274 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700275 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700276 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700277 }
278 }
279
280 TEST(F32_VSUBC_RELU__WASM_X8, batch_gt_8) {
281 for (size_t batch_size = 9; batch_size < 16; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700282 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700283 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700284 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700285 }
286 }
287
288 TEST(F32_VSUBC_RELU__WASM_X8, inplace) {
289 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700290 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700291 .batch_size(batch_size)
292 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700293 .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700294 }
295 }
296#endif // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
297
298
Frank Barchard674778d2020-08-08 10:17:25 -0700299TEST(F32_VSUBC_RELU__SCALAR_X1, batch_eq_1) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700300 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700301 .batch_size(1)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700302 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x1, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700303}
304
305TEST(F32_VSUBC_RELU__SCALAR_X1, batch_gt_1) {
306 for (size_t batch_size = 2; batch_size < 10; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700307 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700308 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700309 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x1, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700310 }
311}
312
313TEST(F32_VSUBC_RELU__SCALAR_X1, inplace) {
314 for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700315 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700316 .batch_size(batch_size)
317 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700318 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x1, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700319 }
320}
321
322
323TEST(F32_VSUBC_RELU__SCALAR_X2, batch_eq_2) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700324 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700325 .batch_size(2)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700326 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700327}
328
329TEST(F32_VSUBC_RELU__SCALAR_X2, batch_div_2) {
330 for (size_t batch_size = 4; batch_size < 20; batch_size += 2) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700331 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700332 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700333 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700334 }
335}
336
337TEST(F32_VSUBC_RELU__SCALAR_X2, batch_lt_2) {
338 for (size_t batch_size = 1; batch_size < 2; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700339 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700340 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700341 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700342 }
343}
344
345TEST(F32_VSUBC_RELU__SCALAR_X2, batch_gt_2) {
346 for (size_t batch_size = 3; batch_size < 4; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700347 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700348 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700349 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700350 }
351}
352
353TEST(F32_VSUBC_RELU__SCALAR_X2, inplace) {
354 for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700355 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700356 .batch_size(batch_size)
357 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700358 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700359 }
360}
361
362
363TEST(F32_VSUBC_RELU__SCALAR_X4, batch_eq_4) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700364 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700365 .batch_size(4)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700366 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700367}
368
369TEST(F32_VSUBC_RELU__SCALAR_X4, batch_div_4) {
370 for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700371 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700372 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700373 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700374 }
375}
376
377TEST(F32_VSUBC_RELU__SCALAR_X4, batch_lt_4) {
378 for (size_t batch_size = 1; batch_size < 4; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700379 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700380 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700381 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700382 }
383}
384
385TEST(F32_VSUBC_RELU__SCALAR_X4, batch_gt_4) {
386 for (size_t batch_size = 5; batch_size < 8; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700387 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700388 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700389 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700390 }
391}
392
393TEST(F32_VSUBC_RELU__SCALAR_X4, inplace) {
394 for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700395 VBinaryCMicrokernelTester()
Frank Barchard674778d2020-08-08 10:17:25 -0700396 .batch_size(batch_size)
397 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700398 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard674778d2020-08-08 10:17:25 -0700399 }
400}
Frank Barchard9c7308f2020-08-31 17:03:01 -0700401
402
403TEST(F32_VSUBC_RELU__SCALAR_X8, batch_eq_8) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700404 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700405 .batch_size(8)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700406 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700407}
408
409TEST(F32_VSUBC_RELU__SCALAR_X8, batch_div_8) {
410 for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700411 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700412 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700413 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700414 }
415}
416
417TEST(F32_VSUBC_RELU__SCALAR_X8, batch_lt_8) {
418 for (size_t batch_size = 1; batch_size < 8; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700419 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700420 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700421 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700422 }
423}
424
425TEST(F32_VSUBC_RELU__SCALAR_X8, batch_gt_8) {
426 for (size_t batch_size = 9; batch_size < 16; batch_size++) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700427 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700428 .batch_size(batch_size)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700429 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700430 }
431}
432
433TEST(F32_VSUBC_RELU__SCALAR_X8, inplace) {
434 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700435 VBinaryCMicrokernelTester()
Frank Barchard9c7308f2020-08-31 17:03:01 -0700436 .batch_size(batch_size)
437 .inplace(true)
Marat Dukhan10f1fe02021-05-13 12:51:12 -0700438 .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar);
Frank Barchard9c7308f2020-08-31 17:03:01 -0700439 }
440}