Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 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-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 Dukhan | 87bd511 | 2021-08-02 11:43:53 -0700 | [diff] [blame] | 16 | #include <xnnpack/params-init.h> |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 17 | #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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 23 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 24 | .batch_size(4) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 25 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 26 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 30 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 31 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 32 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 33 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 38 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 39 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 40 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 41 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 46 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 47 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 48 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 49 | } |
| 50 | } |
| 51 | |
| 52 | TEST(F32_VSUBC_RELU__WASMSIMD_X4, inplace) { |
| 53 | for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 54 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 55 | .batch_size(batch_size) |
| 56 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 57 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 58 | } |
| 59 | } |
| 60 | #endif // XNN_ARCH_WASMSIMD |
| 61 | |
| 62 | |
| 63 | #if XNN_ARCH_WASMSIMD |
| 64 | TEST(F32_VSUBC_RELU__WASMSIMD_X8, batch_eq_8) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 65 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 66 | .batch_size(8) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 67 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 68 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 72 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 73 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 74 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 75 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 80 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 81 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 82 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 83 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 88 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 89 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 90 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 91 | } |
| 92 | } |
| 93 | |
| 94 | TEST(F32_VSUBC_RELU__WASMSIMD_X8, inplace) { |
| 95 | for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 96 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 97 | .batch_size(batch_size) |
| 98 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 99 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 100 | } |
| 101 | } |
| 102 | #endif // XNN_ARCH_WASMSIMD |
| 103 | |
| 104 | |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 105 | #if XNN_ARCH_WASMSIMD |
| 106 | TEST(F32_VSUBC_RELU__WASMSIMD_X16, batch_eq_16) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 107 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 108 | .batch_size(16) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 109 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 110 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 114 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 115 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 116 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 117 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 122 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 123 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 124 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 125 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 130 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 131 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 132 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 133 | } |
| 134 | } |
| 135 | |
| 136 | TEST(F32_VSUBC_RELU__WASMSIMD_X16, inplace) { |
| 137 | for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 138 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 139 | .batch_size(batch_size) |
| 140 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 141 | .Test(xnn_f32_vsubc_relu_ukernel__wasmsimd_x16, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 142 | } |
| 143 | } |
| 144 | #endif // XNN_ARCH_WASMSIMD |
| 145 | |
| 146 | |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 147 | #if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD |
| 148 | TEST(F32_VSUBC_RELU__WASM_X1, batch_eq_1) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 149 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 150 | .batch_size(1) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 151 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x1, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 152 | } |
| 153 | |
| 154 | TEST(F32_VSUBC_RELU__WASM_X1, batch_gt_1) { |
| 155 | for (size_t batch_size = 2; batch_size < 10; batch_size++) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 156 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 157 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 158 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x1, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 159 | } |
| 160 | } |
| 161 | |
| 162 | TEST(F32_VSUBC_RELU__WASM_X1, inplace) { |
| 163 | for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 164 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 165 | .batch_size(batch_size) |
| 166 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 167 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x1, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 168 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 175 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 176 | .batch_size(2) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 177 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 178 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 182 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 183 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 184 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 185 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 190 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 191 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 192 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 193 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 198 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 199 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 200 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 201 | } |
| 202 | } |
| 203 | |
| 204 | TEST(F32_VSUBC_RELU__WASM_X2, inplace) { |
| 205 | for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 206 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 207 | .batch_size(batch_size) |
| 208 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 209 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x2, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 210 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 217 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 218 | .batch_size(4) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 219 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 220 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 224 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 225 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 226 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 227 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 232 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 233 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 234 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 235 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 240 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 241 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 242 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 243 | } |
| 244 | } |
| 245 | |
| 246 | TEST(F32_VSUBC_RELU__WASM_X4, inplace) { |
| 247 | for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 248 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 249 | .batch_size(batch_size) |
| 250 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 251 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x4, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 252 | } |
| 253 | } |
| 254 | #endif // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD |
| 255 | |
| 256 | |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 257 | #if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD |
| 258 | TEST(F32_VSUBC_RELU__WASM_X8, batch_eq_8) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 259 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 260 | .batch_size(8) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 261 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 262 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 266 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 267 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 268 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 269 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 274 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 275 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 276 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 277 | } |
| 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 Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 282 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 283 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 284 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 285 | } |
| 286 | } |
| 287 | |
| 288 | TEST(F32_VSUBC_RELU__WASM_X8, inplace) { |
| 289 | for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 290 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 291 | .batch_size(batch_size) |
| 292 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 293 | .Test(xnn_f32_vsubc_relu_ukernel__wasm_x8, VBinaryCMicrokernelTester::OpType::SubC); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 294 | } |
| 295 | } |
| 296 | #endif // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD |
| 297 | |
| 298 | |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 299 | TEST(F32_VSUBC_RELU__SCALAR_X1, batch_eq_1) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 300 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 301 | .batch_size(1) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 302 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x1, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 303 | } |
| 304 | |
| 305 | TEST(F32_VSUBC_RELU__SCALAR_X1, batch_gt_1) { |
| 306 | for (size_t batch_size = 2; batch_size < 10; batch_size++) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 307 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 308 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 309 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x1, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 310 | } |
| 311 | } |
| 312 | |
| 313 | TEST(F32_VSUBC_RELU__SCALAR_X1, inplace) { |
| 314 | for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 315 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 316 | .batch_size(batch_size) |
| 317 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 318 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x1, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 319 | } |
| 320 | } |
| 321 | |
| 322 | |
| 323 | TEST(F32_VSUBC_RELU__SCALAR_X2, batch_eq_2) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 324 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 325 | .batch_size(2) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 326 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 327 | } |
| 328 | |
| 329 | TEST(F32_VSUBC_RELU__SCALAR_X2, batch_div_2) { |
| 330 | for (size_t batch_size = 4; batch_size < 20; batch_size += 2) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 331 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 332 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 333 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 334 | } |
| 335 | } |
| 336 | |
| 337 | TEST(F32_VSUBC_RELU__SCALAR_X2, batch_lt_2) { |
| 338 | for (size_t batch_size = 1; batch_size < 2; batch_size++) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 339 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 340 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 341 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 342 | } |
| 343 | } |
| 344 | |
| 345 | TEST(F32_VSUBC_RELU__SCALAR_X2, batch_gt_2) { |
| 346 | for (size_t batch_size = 3; batch_size < 4; batch_size++) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 347 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 348 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 349 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 350 | } |
| 351 | } |
| 352 | |
| 353 | TEST(F32_VSUBC_RELU__SCALAR_X2, inplace) { |
| 354 | for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 355 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 356 | .batch_size(batch_size) |
| 357 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 358 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x2, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 359 | } |
| 360 | } |
| 361 | |
| 362 | |
| 363 | TEST(F32_VSUBC_RELU__SCALAR_X4, batch_eq_4) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 364 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 365 | .batch_size(4) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 366 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 367 | } |
| 368 | |
| 369 | TEST(F32_VSUBC_RELU__SCALAR_X4, batch_div_4) { |
| 370 | for (size_t batch_size = 8; batch_size < 40; batch_size += 4) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 371 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 372 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 373 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 374 | } |
| 375 | } |
| 376 | |
| 377 | TEST(F32_VSUBC_RELU__SCALAR_X4, batch_lt_4) { |
| 378 | for (size_t batch_size = 1; batch_size < 4; batch_size++) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 379 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 380 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 381 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 382 | } |
| 383 | } |
| 384 | |
| 385 | TEST(F32_VSUBC_RELU__SCALAR_X4, batch_gt_4) { |
| 386 | for (size_t batch_size = 5; batch_size < 8; batch_size++) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 387 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 388 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 389 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 390 | } |
| 391 | } |
| 392 | |
| 393 | TEST(F32_VSUBC_RELU__SCALAR_X4, inplace) { |
| 394 | for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 395 | VBinaryCMicrokernelTester() |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 396 | .batch_size(batch_size) |
| 397 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 398 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x4, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 674778d | 2020-08-08 10:17:25 -0700 | [diff] [blame] | 399 | } |
| 400 | } |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 401 | |
| 402 | |
| 403 | TEST(F32_VSUBC_RELU__SCALAR_X8, batch_eq_8) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 404 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 405 | .batch_size(8) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 406 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 407 | } |
| 408 | |
| 409 | TEST(F32_VSUBC_RELU__SCALAR_X8, batch_div_8) { |
| 410 | for (size_t batch_size = 16; batch_size < 80; batch_size += 8) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 411 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 412 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 413 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 414 | } |
| 415 | } |
| 416 | |
| 417 | TEST(F32_VSUBC_RELU__SCALAR_X8, batch_lt_8) { |
| 418 | for (size_t batch_size = 1; batch_size < 8; batch_size++) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 419 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 420 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 421 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 422 | } |
| 423 | } |
| 424 | |
| 425 | TEST(F32_VSUBC_RELU__SCALAR_X8, batch_gt_8) { |
| 426 | for (size_t batch_size = 9; batch_size < 16; batch_size++) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 427 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 428 | .batch_size(batch_size) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 429 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 430 | } |
| 431 | } |
| 432 | |
| 433 | TEST(F32_VSUBC_RELU__SCALAR_X8, inplace) { |
| 434 | for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) { |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 435 | VBinaryCMicrokernelTester() |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 436 | .batch_size(batch_size) |
| 437 | .inplace(true) |
Marat Dukhan | 10f1fe0 | 2021-05-13 12:51:12 -0700 | [diff] [blame] | 438 | .Test(xnn_f32_vsubc_relu_ukernel__scalar_x8, VBinaryCMicrokernelTester::OpType::SubC, VBinaryCMicrokernelTester::Variant::Scalar); |
Frank Barchard | 9c7308f | 2020-08-31 17:03:01 -0700 | [diff] [blame] | 439 | } |
| 440 | } |