XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 1 | // Copyright 2020 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. |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 5 | // |
| 6 | // Auto-generated file. Do not edit! |
| 7 | // Specification: test/f32-ibilinear-chw.yaml |
| 8 | // Generator: tools/generate-ibilinear-chw-test.py |
| 9 | |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 10 | |
| 11 | #include <gtest/gtest.h> |
| 12 | |
| 13 | #include <xnnpack/common.h> |
| 14 | #include <xnnpack/isa-checks.h> |
| 15 | |
| 16 | #include <xnnpack/ibilinear.h> |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 17 | #include "ibilinear-microkernel-tester.h" |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 18 | |
| 19 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 20 | TEST(F32_IBILINEAR_CHW__SCALAR_P1, pixels_eq_1) { |
| 21 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 22 | .pixels(1) |
| 23 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 24 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 25 | } |
| 26 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 27 | TEST(F32_IBILINEAR_CHW__SCALAR_P1, pixels_gt_1) { |
| 28 | for (size_t pixels = 2; pixels < 10; pixels++) { |
| 29 | IBilinearMicrokernelTester() |
| 30 | .pixels(pixels) |
| 31 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 32 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 33 | } |
| 34 | } |
| 35 | |
XNNPACK Team | 965272b | 2020-10-23 21:10:15 -0700 | [diff] [blame] | 36 | TEST(F32_IBILINEAR_CHW__SCALAR_P1, channels_eq_1) { |
| 37 | for (size_t pixels = 1; pixels <= 5; pixels += 1) { |
| 38 | IBilinearMicrokernelTester() |
| 39 | .pixels(pixels) |
| 40 | .channels(1) |
| 41 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1); |
| 42 | } |
| 43 | } |
| 44 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 45 | TEST(F32_IBILINEAR_CHW__SCALAR_P1, channels_gt_1) { |
| 46 | for (size_t channels = 2; channels < 3; channels++) { |
| 47 | for (size_t pixels = 1; pixels <= 5; pixels += 1) { |
| 48 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 49 | .pixels(pixels) |
| 50 | .channels(channels) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 51 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 56 | TEST(F32_IBILINEAR_CHW__SCALAR_P1, input_offset) { |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 57 | for (size_t pixels = 1; pixels < 5; pixels += 1) { |
| 58 | for (size_t channels = 1; channels <= 5; channels += 1) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 59 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 60 | .pixels(pixels) |
| 61 | .channels(channels) |
| 62 | .input_offset(7) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 63 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 68 | TEST(F32_IBILINEAR_CHW__SCALAR_P1, input_stride) { |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 69 | for (size_t pixels = 1; pixels < 5; pixels += 1) { |
| 70 | for (size_t channels = 1; channels <= 5; channels += 1) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 71 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 72 | .pixels(pixels) |
| 73 | .channels(channels) |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 74 | .input_stride(23) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 75 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p1); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 76 | } |
| 77 | } |
| 78 | } |
| 79 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 80 | |
| 81 | TEST(F32_IBILINEAR_CHW__SCALAR_P2, pixels_eq_2) { |
| 82 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 83 | .pixels(2) |
| 84 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 85 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 86 | } |
| 87 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 88 | TEST(F32_IBILINEAR_CHW__SCALAR_P2, pixels_div_2) { |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 89 | for (size_t pixels = 4; pixels < 20; pixels += 2) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 90 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 91 | .pixels(pixels) |
| 92 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 93 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 94 | } |
| 95 | } |
| 96 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 97 | TEST(F32_IBILINEAR_CHW__SCALAR_P2, pixels_lt_2) { |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 98 | for (size_t pixels = 1; pixels < 2; pixels++) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 99 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 100 | .pixels(pixels) |
| 101 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 102 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 103 | } |
| 104 | } |
| 105 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 106 | TEST(F32_IBILINEAR_CHW__SCALAR_P2, pixels_gt_2) { |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 107 | for (size_t pixels = 3; pixels < 4; pixels++) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 108 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 109 | .pixels(pixels) |
| 110 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 111 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 112 | } |
| 113 | } |
| 114 | |
XNNPACK Team | 965272b | 2020-10-23 21:10:15 -0700 | [diff] [blame] | 115 | TEST(F32_IBILINEAR_CHW__SCALAR_P2, channels_eq_1) { |
| 116 | for (size_t pixels = 1; pixels <= 10; pixels += 1) { |
| 117 | IBilinearMicrokernelTester() |
| 118 | .pixels(pixels) |
| 119 | .channels(1) |
| 120 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | TEST(F32_IBILINEAR_CHW__SCALAR_P2, channels_gt_1) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 125 | for (size_t channels = 2; channels < 3; channels++) { |
| 126 | for (size_t pixels = 1; pixels <= 10; pixels += 1) { |
| 127 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 128 | .pixels(pixels) |
| 129 | .channels(channels) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 130 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 131 | } |
| 132 | } |
| 133 | } |
| 134 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 135 | TEST(F32_IBILINEAR_CHW__SCALAR_P2, input_offset) { |
| 136 | for (size_t pixels = 1; pixels < 10; pixels += 1) { |
| 137 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 138 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 139 | .pixels(pixels) |
| 140 | .channels(channels) |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 141 | .input_offset(7) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 142 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 143 | } |
| 144 | } |
| 145 | } |
| 146 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 147 | TEST(F32_IBILINEAR_CHW__SCALAR_P2, input_stride) { |
| 148 | for (size_t pixels = 1; pixels < 10; pixels += 1) { |
| 149 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 150 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 151 | .pixels(pixels) |
| 152 | .channels(channels) |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 153 | .input_stride(43) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 154 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p2); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 155 | } |
| 156 | } |
| 157 | } |
| 158 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 159 | |
| 160 | TEST(F32_IBILINEAR_CHW__SCALAR_P4, pixels_eq_4) { |
| 161 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 162 | .pixels(4) |
| 163 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 164 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 165 | } |
| 166 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 167 | TEST(F32_IBILINEAR_CHW__SCALAR_P4, pixels_div_4) { |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 168 | for (size_t pixels = 8; pixels < 40; pixels += 4) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 169 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 170 | .pixels(pixels) |
| 171 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 172 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 173 | } |
| 174 | } |
| 175 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 176 | TEST(F32_IBILINEAR_CHW__SCALAR_P4, pixels_lt_4) { |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 177 | for (size_t pixels = 1; pixels < 4; pixels++) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 178 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 179 | .pixels(pixels) |
| 180 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 181 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 182 | } |
| 183 | } |
| 184 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 185 | TEST(F32_IBILINEAR_CHW__SCALAR_P4, pixels_gt_4) { |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 186 | for (size_t pixels = 5; pixels < 8; pixels++) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 187 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 188 | .pixels(pixels) |
| 189 | .channels(1) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 190 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 191 | } |
| 192 | } |
| 193 | |
XNNPACK Team | 965272b | 2020-10-23 21:10:15 -0700 | [diff] [blame] | 194 | TEST(F32_IBILINEAR_CHW__SCALAR_P4, channels_eq_1) { |
| 195 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 196 | IBilinearMicrokernelTester() |
| 197 | .pixels(pixels) |
| 198 | .channels(1) |
| 199 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4); |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | TEST(F32_IBILINEAR_CHW__SCALAR_P4, channels_gt_1) { |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 204 | for (size_t channels = 2; channels < 3; channels++) { |
| 205 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 206 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 207 | .pixels(pixels) |
| 208 | .channels(channels) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 209 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 210 | } |
| 211 | } |
| 212 | } |
| 213 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 214 | TEST(F32_IBILINEAR_CHW__SCALAR_P4, input_offset) { |
| 215 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 216 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 217 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 218 | .pixels(pixels) |
| 219 | .channels(channels) |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 220 | .input_offset(7) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 221 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 222 | } |
| 223 | } |
| 224 | } |
| 225 | |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 226 | TEST(F32_IBILINEAR_CHW__SCALAR_P4, input_stride) { |
| 227 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 228 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 229 | IBilinearMicrokernelTester() |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 230 | .pixels(pixels) |
| 231 | .channels(channels) |
XNNPACK Team | 6be46b2 | 2020-10-22 23:34:54 -0700 | [diff] [blame] | 232 | .input_stride(83) |
XNNPACK Team | cb2b667 | 2020-10-23 19:30:50 -0700 | [diff] [blame] | 233 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__scalar_p4); |
XNNPACK Team | 2143267 | 2020-10-19 19:58:48 -0700 | [diff] [blame] | 234 | } |
| 235 | } |
| 236 | } |
XNNPACK Team | 965272b | 2020-10-23 21:10:15 -0700 | [diff] [blame] | 237 | |
| 238 | |
Marat Dukhan | 4c61779 | 2021-12-21 15:47:58 -0800 | [diff] [blame] | 239 | #if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD |
XNNPACK Team | 965272b | 2020-10-23 21:10:15 -0700 | [diff] [blame] | 240 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, pixels_eq_4) { |
| 241 | IBilinearMicrokernelTester() |
| 242 | .pixels(4) |
| 243 | .channels(1) |
| 244 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4); |
| 245 | } |
| 246 | |
| 247 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, pixels_div_4) { |
| 248 | for (size_t pixels = 8; pixels < 40; pixels += 4) { |
| 249 | IBilinearMicrokernelTester() |
| 250 | .pixels(pixels) |
| 251 | .channels(1) |
| 252 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4); |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, pixels_lt_4) { |
| 257 | for (size_t pixels = 1; pixels < 4; pixels++) { |
| 258 | IBilinearMicrokernelTester() |
| 259 | .pixels(pixels) |
| 260 | .channels(1) |
| 261 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4); |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, pixels_gt_4) { |
| 266 | for (size_t pixels = 5; pixels < 8; pixels++) { |
| 267 | IBilinearMicrokernelTester() |
| 268 | .pixels(pixels) |
| 269 | .channels(1) |
| 270 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4); |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, channels_eq_1) { |
| 275 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 276 | IBilinearMicrokernelTester() |
| 277 | .pixels(pixels) |
| 278 | .channels(1) |
| 279 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4); |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, channels_gt_1) { |
| 284 | for (size_t channels = 2; channels < 3; channels++) { |
| 285 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 286 | IBilinearMicrokernelTester() |
| 287 | .pixels(pixels) |
| 288 | .channels(channels) |
| 289 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4); |
| 290 | } |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, input_offset) { |
| 295 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 296 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 297 | IBilinearMicrokernelTester() |
| 298 | .pixels(pixels) |
| 299 | .channels(channels) |
| 300 | .input_offset(7) |
| 301 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4); |
| 302 | } |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P4, input_stride) { |
| 307 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 308 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 309 | IBilinearMicrokernelTester() |
| 310 | .pixels(pixels) |
| 311 | .channels(channels) |
| 312 | .input_stride(83) |
| 313 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p4); |
| 314 | } |
| 315 | } |
| 316 | } |
Marat Dukhan | 4c61779 | 2021-12-21 15:47:58 -0800 | [diff] [blame] | 317 | #endif // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD |
XNNPACK Team | 965272b | 2020-10-23 21:10:15 -0700 | [diff] [blame] | 318 | |
| 319 | |
Marat Dukhan | 4c61779 | 2021-12-21 15:47:58 -0800 | [diff] [blame] | 320 | #if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD |
XNNPACK Team | 965272b | 2020-10-23 21:10:15 -0700 | [diff] [blame] | 321 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, pixels_eq_8) { |
| 322 | IBilinearMicrokernelTester() |
| 323 | .pixels(8) |
| 324 | .channels(1) |
| 325 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8); |
| 326 | } |
| 327 | |
| 328 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, pixels_div_8) { |
| 329 | for (size_t pixels = 16; pixels < 80; pixels += 8) { |
| 330 | IBilinearMicrokernelTester() |
| 331 | .pixels(pixels) |
| 332 | .channels(1) |
| 333 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, pixels_lt_8) { |
| 338 | for (size_t pixels = 1; pixels < 8; pixels++) { |
| 339 | IBilinearMicrokernelTester() |
| 340 | .pixels(pixels) |
| 341 | .channels(1) |
| 342 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8); |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, pixels_gt_8) { |
| 347 | for (size_t pixels = 9; pixels < 16; pixels++) { |
| 348 | IBilinearMicrokernelTester() |
| 349 | .pixels(pixels) |
| 350 | .channels(1) |
| 351 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8); |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, channels_eq_1) { |
| 356 | for (size_t pixels = 1; pixels <= 40; pixels += 7) { |
| 357 | IBilinearMicrokernelTester() |
| 358 | .pixels(pixels) |
| 359 | .channels(1) |
| 360 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8); |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, channels_gt_1) { |
| 365 | for (size_t channels = 2; channels < 3; channels++) { |
| 366 | for (size_t pixels = 1; pixels <= 40; pixels += 7) { |
| 367 | IBilinearMicrokernelTester() |
| 368 | .pixels(pixels) |
| 369 | .channels(channels) |
| 370 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8); |
| 371 | } |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, input_offset) { |
| 376 | for (size_t pixels = 1; pixels < 40; pixels += 7) { |
| 377 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 378 | IBilinearMicrokernelTester() |
| 379 | .pixels(pixels) |
| 380 | .channels(channels) |
| 381 | .input_offset(7) |
| 382 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8); |
| 383 | } |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | TEST(F32_IBILINEAR_CHW__WASMSIMD_P8, input_stride) { |
| 388 | for (size_t pixels = 1; pixels < 40; pixels += 7) { |
| 389 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 390 | IBilinearMicrokernelTester() |
| 391 | .pixels(pixels) |
| 392 | .channels(channels) |
| 393 | .input_stride(163) |
| 394 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__wasmsimd_p8); |
| 395 | } |
| 396 | } |
| 397 | } |
Marat Dukhan | 4c61779 | 2021-12-21 15:47:58 -0800 | [diff] [blame] | 398 | #endif // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD |
Artsiom Ablavatski | 2202c81 | 2021-01-22 14:16:43 -0800 | [diff] [blame] | 399 | |
| 400 | |
| 401 | #if XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 402 | TEST(F32_IBILINEAR_CHW__NEON_P4, pixels_eq_4) { |
| 403 | TEST_REQUIRES_ARM_NEON; |
| 404 | IBilinearMicrokernelTester() |
| 405 | .pixels(4) |
| 406 | .channels(1) |
| 407 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4); |
| 408 | } |
| 409 | |
| 410 | TEST(F32_IBILINEAR_CHW__NEON_P4, pixels_div_4) { |
| 411 | TEST_REQUIRES_ARM_NEON; |
| 412 | for (size_t pixels = 8; pixels < 40; pixels += 4) { |
| 413 | IBilinearMicrokernelTester() |
| 414 | .pixels(pixels) |
| 415 | .channels(1) |
| 416 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4); |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | TEST(F32_IBILINEAR_CHW__NEON_P4, pixels_lt_4) { |
| 421 | TEST_REQUIRES_ARM_NEON; |
| 422 | for (size_t pixels = 1; pixels < 4; pixels++) { |
| 423 | IBilinearMicrokernelTester() |
| 424 | .pixels(pixels) |
| 425 | .channels(1) |
| 426 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4); |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | TEST(F32_IBILINEAR_CHW__NEON_P4, pixels_gt_4) { |
| 431 | TEST_REQUIRES_ARM_NEON; |
| 432 | for (size_t pixels = 5; pixels < 8; pixels++) { |
| 433 | IBilinearMicrokernelTester() |
| 434 | .pixels(pixels) |
| 435 | .channels(1) |
| 436 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4); |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | TEST(F32_IBILINEAR_CHW__NEON_P4, channels_eq_1) { |
| 441 | TEST_REQUIRES_ARM_NEON; |
| 442 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 443 | IBilinearMicrokernelTester() |
| 444 | .pixels(pixels) |
| 445 | .channels(1) |
| 446 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4); |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | TEST(F32_IBILINEAR_CHW__NEON_P4, channels_gt_1) { |
| 451 | TEST_REQUIRES_ARM_NEON; |
| 452 | for (size_t channels = 2; channels < 3; channels++) { |
| 453 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 454 | IBilinearMicrokernelTester() |
| 455 | .pixels(pixels) |
| 456 | .channels(channels) |
| 457 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4); |
| 458 | } |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | TEST(F32_IBILINEAR_CHW__NEON_P4, input_offset) { |
| 463 | TEST_REQUIRES_ARM_NEON; |
| 464 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 465 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 466 | IBilinearMicrokernelTester() |
| 467 | .pixels(pixels) |
| 468 | .channels(channels) |
| 469 | .input_offset(7) |
| 470 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4); |
| 471 | } |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | TEST(F32_IBILINEAR_CHW__NEON_P4, input_stride) { |
| 476 | TEST_REQUIRES_ARM_NEON; |
| 477 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 478 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 479 | IBilinearMicrokernelTester() |
| 480 | .pixels(pixels) |
| 481 | .channels(channels) |
| 482 | .input_stride(83) |
| 483 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p4); |
| 484 | } |
| 485 | } |
| 486 | } |
| 487 | #endif // XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 488 | |
| 489 | |
| 490 | #if XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 491 | TEST(F32_IBILINEAR_CHW__NEON_P8, pixels_eq_8) { |
| 492 | TEST_REQUIRES_ARM_NEON; |
| 493 | IBilinearMicrokernelTester() |
| 494 | .pixels(8) |
| 495 | .channels(1) |
| 496 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8); |
| 497 | } |
| 498 | |
| 499 | TEST(F32_IBILINEAR_CHW__NEON_P8, pixels_div_8) { |
| 500 | TEST_REQUIRES_ARM_NEON; |
| 501 | for (size_t pixels = 16; pixels < 80; pixels += 8) { |
| 502 | IBilinearMicrokernelTester() |
| 503 | .pixels(pixels) |
| 504 | .channels(1) |
| 505 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8); |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | TEST(F32_IBILINEAR_CHW__NEON_P8, pixels_lt_8) { |
| 510 | TEST_REQUIRES_ARM_NEON; |
| 511 | for (size_t pixels = 1; pixels < 8; pixels++) { |
| 512 | IBilinearMicrokernelTester() |
| 513 | .pixels(pixels) |
| 514 | .channels(1) |
| 515 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8); |
| 516 | } |
| 517 | } |
| 518 | |
| 519 | TEST(F32_IBILINEAR_CHW__NEON_P8, pixels_gt_8) { |
| 520 | TEST_REQUIRES_ARM_NEON; |
| 521 | for (size_t pixels = 9; pixels < 16; pixels++) { |
| 522 | IBilinearMicrokernelTester() |
| 523 | .pixels(pixels) |
| 524 | .channels(1) |
| 525 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8); |
| 526 | } |
| 527 | } |
| 528 | |
| 529 | TEST(F32_IBILINEAR_CHW__NEON_P8, channels_eq_1) { |
| 530 | TEST_REQUIRES_ARM_NEON; |
| 531 | for (size_t pixels = 1; pixels <= 40; pixels += 7) { |
| 532 | IBilinearMicrokernelTester() |
| 533 | .pixels(pixels) |
| 534 | .channels(1) |
| 535 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8); |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | TEST(F32_IBILINEAR_CHW__NEON_P8, channels_gt_1) { |
| 540 | TEST_REQUIRES_ARM_NEON; |
| 541 | for (size_t channels = 2; channels < 3; channels++) { |
| 542 | for (size_t pixels = 1; pixels <= 40; pixels += 7) { |
| 543 | IBilinearMicrokernelTester() |
| 544 | .pixels(pixels) |
| 545 | .channels(channels) |
| 546 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8); |
| 547 | } |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | TEST(F32_IBILINEAR_CHW__NEON_P8, input_offset) { |
| 552 | TEST_REQUIRES_ARM_NEON; |
| 553 | for (size_t pixels = 1; pixels < 40; pixels += 7) { |
| 554 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 555 | IBilinearMicrokernelTester() |
| 556 | .pixels(pixels) |
| 557 | .channels(channels) |
| 558 | .input_offset(7) |
| 559 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8); |
| 560 | } |
| 561 | } |
| 562 | } |
| 563 | |
| 564 | TEST(F32_IBILINEAR_CHW__NEON_P8, input_stride) { |
| 565 | TEST_REQUIRES_ARM_NEON; |
| 566 | for (size_t pixels = 1; pixels < 40; pixels += 7) { |
| 567 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 568 | IBilinearMicrokernelTester() |
| 569 | .pixels(pixels) |
| 570 | .channels(channels) |
| 571 | .input_stride(163) |
| 572 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neon_p8); |
| 573 | } |
| 574 | } |
| 575 | } |
| 576 | #endif // XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 577 | |
| 578 | |
| 579 | #if XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 580 | TEST(F32_IBILINEAR_CHW__NEONFMA_P4, pixels_eq_4) { |
| 581 | TEST_REQUIRES_ARM_NEON_FMA; |
| 582 | IBilinearMicrokernelTester() |
| 583 | .pixels(4) |
| 584 | .channels(1) |
| 585 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4); |
| 586 | } |
| 587 | |
| 588 | TEST(F32_IBILINEAR_CHW__NEONFMA_P4, pixels_div_4) { |
| 589 | TEST_REQUIRES_ARM_NEON_FMA; |
| 590 | for (size_t pixels = 8; pixels < 40; pixels += 4) { |
| 591 | IBilinearMicrokernelTester() |
| 592 | .pixels(pixels) |
| 593 | .channels(1) |
| 594 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4); |
| 595 | } |
| 596 | } |
| 597 | |
| 598 | TEST(F32_IBILINEAR_CHW__NEONFMA_P4, pixels_lt_4) { |
| 599 | TEST_REQUIRES_ARM_NEON_FMA; |
| 600 | for (size_t pixels = 1; pixels < 4; pixels++) { |
| 601 | IBilinearMicrokernelTester() |
| 602 | .pixels(pixels) |
| 603 | .channels(1) |
| 604 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4); |
| 605 | } |
| 606 | } |
| 607 | |
| 608 | TEST(F32_IBILINEAR_CHW__NEONFMA_P4, pixels_gt_4) { |
| 609 | TEST_REQUIRES_ARM_NEON_FMA; |
| 610 | for (size_t pixels = 5; pixels < 8; pixels++) { |
| 611 | IBilinearMicrokernelTester() |
| 612 | .pixels(pixels) |
| 613 | .channels(1) |
| 614 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4); |
| 615 | } |
| 616 | } |
| 617 | |
| 618 | TEST(F32_IBILINEAR_CHW__NEONFMA_P4, channels_eq_1) { |
| 619 | TEST_REQUIRES_ARM_NEON_FMA; |
| 620 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 621 | IBilinearMicrokernelTester() |
| 622 | .pixels(pixels) |
| 623 | .channels(1) |
| 624 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4); |
| 625 | } |
| 626 | } |
| 627 | |
| 628 | TEST(F32_IBILINEAR_CHW__NEONFMA_P4, channels_gt_1) { |
| 629 | TEST_REQUIRES_ARM_NEON_FMA; |
| 630 | for (size_t channels = 2; channels < 3; channels++) { |
| 631 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 632 | IBilinearMicrokernelTester() |
| 633 | .pixels(pixels) |
| 634 | .channels(channels) |
| 635 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4); |
| 636 | } |
| 637 | } |
| 638 | } |
| 639 | |
| 640 | TEST(F32_IBILINEAR_CHW__NEONFMA_P4, input_offset) { |
| 641 | TEST_REQUIRES_ARM_NEON_FMA; |
| 642 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 643 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 644 | IBilinearMicrokernelTester() |
| 645 | .pixels(pixels) |
| 646 | .channels(channels) |
| 647 | .input_offset(7) |
| 648 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4); |
| 649 | } |
| 650 | } |
| 651 | } |
| 652 | |
| 653 | TEST(F32_IBILINEAR_CHW__NEONFMA_P4, input_stride) { |
| 654 | TEST_REQUIRES_ARM_NEON_FMA; |
| 655 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 656 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 657 | IBilinearMicrokernelTester() |
| 658 | .pixels(pixels) |
| 659 | .channels(channels) |
| 660 | .input_stride(83) |
| 661 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p4); |
| 662 | } |
| 663 | } |
| 664 | } |
| 665 | #endif // XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 666 | |
| 667 | |
| 668 | #if XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 669 | TEST(F32_IBILINEAR_CHW__NEONFMA_P8, pixels_eq_8) { |
| 670 | TEST_REQUIRES_ARM_NEON_FMA; |
| 671 | IBilinearMicrokernelTester() |
| 672 | .pixels(8) |
| 673 | .channels(1) |
| 674 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8); |
| 675 | } |
| 676 | |
| 677 | TEST(F32_IBILINEAR_CHW__NEONFMA_P8, pixels_div_8) { |
| 678 | TEST_REQUIRES_ARM_NEON_FMA; |
| 679 | for (size_t pixels = 16; pixels < 80; pixels += 8) { |
| 680 | IBilinearMicrokernelTester() |
| 681 | .pixels(pixels) |
| 682 | .channels(1) |
| 683 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8); |
| 684 | } |
| 685 | } |
| 686 | |
| 687 | TEST(F32_IBILINEAR_CHW__NEONFMA_P8, pixels_lt_8) { |
| 688 | TEST_REQUIRES_ARM_NEON_FMA; |
| 689 | for (size_t pixels = 1; pixels < 8; pixels++) { |
| 690 | IBilinearMicrokernelTester() |
| 691 | .pixels(pixels) |
| 692 | .channels(1) |
| 693 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8); |
| 694 | } |
| 695 | } |
| 696 | |
| 697 | TEST(F32_IBILINEAR_CHW__NEONFMA_P8, pixels_gt_8) { |
| 698 | TEST_REQUIRES_ARM_NEON_FMA; |
| 699 | for (size_t pixels = 9; pixels < 16; pixels++) { |
| 700 | IBilinearMicrokernelTester() |
| 701 | .pixels(pixels) |
| 702 | .channels(1) |
| 703 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8); |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | TEST(F32_IBILINEAR_CHW__NEONFMA_P8, channels_eq_1) { |
| 708 | TEST_REQUIRES_ARM_NEON_FMA; |
| 709 | for (size_t pixels = 1; pixels <= 40; pixels += 7) { |
| 710 | IBilinearMicrokernelTester() |
| 711 | .pixels(pixels) |
| 712 | .channels(1) |
| 713 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8); |
| 714 | } |
| 715 | } |
| 716 | |
| 717 | TEST(F32_IBILINEAR_CHW__NEONFMA_P8, channels_gt_1) { |
| 718 | TEST_REQUIRES_ARM_NEON_FMA; |
| 719 | for (size_t channels = 2; channels < 3; channels++) { |
| 720 | for (size_t pixels = 1; pixels <= 40; pixels += 7) { |
| 721 | IBilinearMicrokernelTester() |
| 722 | .pixels(pixels) |
| 723 | .channels(channels) |
| 724 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8); |
| 725 | } |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | TEST(F32_IBILINEAR_CHW__NEONFMA_P8, input_offset) { |
| 730 | TEST_REQUIRES_ARM_NEON_FMA; |
| 731 | for (size_t pixels = 1; pixels < 40; pixels += 7) { |
| 732 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 733 | IBilinearMicrokernelTester() |
| 734 | .pixels(pixels) |
| 735 | .channels(channels) |
| 736 | .input_offset(7) |
| 737 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8); |
| 738 | } |
| 739 | } |
| 740 | } |
| 741 | |
| 742 | TEST(F32_IBILINEAR_CHW__NEONFMA_P8, input_stride) { |
| 743 | TEST_REQUIRES_ARM_NEON_FMA; |
| 744 | for (size_t pixels = 1; pixels < 40; pixels += 7) { |
| 745 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 746 | IBilinearMicrokernelTester() |
| 747 | .pixels(pixels) |
| 748 | .channels(channels) |
| 749 | .input_stride(163) |
| 750 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__neonfma_p8); |
| 751 | } |
| 752 | } |
| 753 | } |
| 754 | #endif // XNN_ARCH_ARM || XNN_ARCH_ARM64 |
Artsiom Ablavatski | b3ffd58 | 2021-03-31 13:00:08 -0700 | [diff] [blame] | 755 | |
| 756 | |
| 757 | #if XNN_ARCH_X86 || XNN_ARCH_X86_64 |
| 758 | TEST(F32_IBILINEAR_CHW__SSE_P4, pixels_eq_4) { |
| 759 | TEST_REQUIRES_X86_SSE; |
| 760 | IBilinearMicrokernelTester() |
| 761 | .pixels(4) |
| 762 | .channels(1) |
| 763 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p4); |
| 764 | } |
| 765 | |
| 766 | TEST(F32_IBILINEAR_CHW__SSE_P4, pixels_div_4) { |
| 767 | TEST_REQUIRES_X86_SSE; |
| 768 | for (size_t pixels = 8; pixels < 40; pixels += 4) { |
| 769 | IBilinearMicrokernelTester() |
| 770 | .pixels(pixels) |
| 771 | .channels(1) |
| 772 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p4); |
| 773 | } |
| 774 | } |
| 775 | |
| 776 | TEST(F32_IBILINEAR_CHW__SSE_P4, pixels_lt_4) { |
| 777 | TEST_REQUIRES_X86_SSE; |
| 778 | for (size_t pixels = 1; pixels < 4; pixels++) { |
| 779 | IBilinearMicrokernelTester() |
| 780 | .pixels(pixels) |
| 781 | .channels(1) |
| 782 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p4); |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | TEST(F32_IBILINEAR_CHW__SSE_P4, pixels_gt_4) { |
| 787 | TEST_REQUIRES_X86_SSE; |
| 788 | for (size_t pixels = 5; pixels < 8; pixels++) { |
| 789 | IBilinearMicrokernelTester() |
| 790 | .pixels(pixels) |
| 791 | .channels(1) |
| 792 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p4); |
| 793 | } |
| 794 | } |
| 795 | |
| 796 | TEST(F32_IBILINEAR_CHW__SSE_P4, channels_eq_1) { |
| 797 | TEST_REQUIRES_X86_SSE; |
| 798 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 799 | IBilinearMicrokernelTester() |
| 800 | .pixels(pixels) |
| 801 | .channels(1) |
| 802 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p4); |
| 803 | } |
| 804 | } |
| 805 | |
| 806 | TEST(F32_IBILINEAR_CHW__SSE_P4, channels_gt_1) { |
| 807 | TEST_REQUIRES_X86_SSE; |
| 808 | for (size_t channels = 2; channels < 3; channels++) { |
| 809 | for (size_t pixels = 1; pixels <= 20; pixels += 3) { |
| 810 | IBilinearMicrokernelTester() |
| 811 | .pixels(pixels) |
| 812 | .channels(channels) |
| 813 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p4); |
| 814 | } |
| 815 | } |
| 816 | } |
| 817 | |
| 818 | TEST(F32_IBILINEAR_CHW__SSE_P4, input_offset) { |
| 819 | TEST_REQUIRES_X86_SSE; |
| 820 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 821 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 822 | IBilinearMicrokernelTester() |
| 823 | .pixels(pixels) |
| 824 | .channels(channels) |
| 825 | .input_offset(7) |
| 826 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p4); |
| 827 | } |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | TEST(F32_IBILINEAR_CHW__SSE_P4, input_stride) { |
| 832 | TEST_REQUIRES_X86_SSE; |
| 833 | for (size_t pixels = 1; pixels < 20; pixels += 3) { |
| 834 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 835 | IBilinearMicrokernelTester() |
| 836 | .pixels(pixels) |
| 837 | .channels(channels) |
| 838 | .input_stride(83) |
| 839 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p4); |
| 840 | } |
| 841 | } |
| 842 | } |
| 843 | #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64 |
| 844 | |
| 845 | |
| 846 | #if XNN_ARCH_X86 || XNN_ARCH_X86_64 |
| 847 | TEST(F32_IBILINEAR_CHW__SSE_P8, pixels_eq_8) { |
| 848 | TEST_REQUIRES_X86_SSE; |
| 849 | IBilinearMicrokernelTester() |
| 850 | .pixels(8) |
| 851 | .channels(1) |
| 852 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p8); |
| 853 | } |
| 854 | |
| 855 | TEST(F32_IBILINEAR_CHW__SSE_P8, pixels_div_8) { |
| 856 | TEST_REQUIRES_X86_SSE; |
| 857 | for (size_t pixels = 16; pixels < 80; pixels += 8) { |
| 858 | IBilinearMicrokernelTester() |
| 859 | .pixels(pixels) |
| 860 | .channels(1) |
| 861 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p8); |
| 862 | } |
| 863 | } |
| 864 | |
| 865 | TEST(F32_IBILINEAR_CHW__SSE_P8, pixels_lt_8) { |
| 866 | TEST_REQUIRES_X86_SSE; |
| 867 | for (size_t pixels = 1; pixels < 8; pixels++) { |
| 868 | IBilinearMicrokernelTester() |
| 869 | .pixels(pixels) |
| 870 | .channels(1) |
| 871 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p8); |
| 872 | } |
| 873 | } |
| 874 | |
| 875 | TEST(F32_IBILINEAR_CHW__SSE_P8, pixels_gt_8) { |
| 876 | TEST_REQUIRES_X86_SSE; |
| 877 | for (size_t pixels = 9; pixels < 16; pixels++) { |
| 878 | IBilinearMicrokernelTester() |
| 879 | .pixels(pixels) |
| 880 | .channels(1) |
| 881 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p8); |
| 882 | } |
| 883 | } |
| 884 | |
| 885 | TEST(F32_IBILINEAR_CHW__SSE_P8, channels_eq_1) { |
| 886 | TEST_REQUIRES_X86_SSE; |
| 887 | for (size_t pixels = 1; pixels <= 40; pixels += 7) { |
| 888 | IBilinearMicrokernelTester() |
| 889 | .pixels(pixels) |
| 890 | .channels(1) |
| 891 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p8); |
| 892 | } |
| 893 | } |
| 894 | |
| 895 | TEST(F32_IBILINEAR_CHW__SSE_P8, channels_gt_1) { |
| 896 | TEST_REQUIRES_X86_SSE; |
| 897 | for (size_t channels = 2; channels < 3; channels++) { |
| 898 | for (size_t pixels = 1; pixels <= 40; pixels += 7) { |
| 899 | IBilinearMicrokernelTester() |
| 900 | .pixels(pixels) |
| 901 | .channels(channels) |
| 902 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p8); |
| 903 | } |
| 904 | } |
| 905 | } |
| 906 | |
| 907 | TEST(F32_IBILINEAR_CHW__SSE_P8, input_offset) { |
| 908 | TEST_REQUIRES_X86_SSE; |
| 909 | for (size_t pixels = 1; pixels < 40; pixels += 7) { |
| 910 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 911 | IBilinearMicrokernelTester() |
| 912 | .pixels(pixels) |
| 913 | .channels(channels) |
| 914 | .input_offset(7) |
| 915 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p8); |
| 916 | } |
| 917 | } |
| 918 | } |
| 919 | |
| 920 | TEST(F32_IBILINEAR_CHW__SSE_P8, input_stride) { |
| 921 | TEST_REQUIRES_X86_SSE; |
| 922 | for (size_t pixels = 1; pixels < 40; pixels += 7) { |
| 923 | for (size_t channels = 1; channels <= 5; channels += 1) { |
| 924 | IBilinearMicrokernelTester() |
| 925 | .pixels(pixels) |
| 926 | .channels(channels) |
| 927 | .input_stride(163) |
| 928 | .TestCHW(xnn_f32_ibilinear_chw_ukernel__sse_p8); |
| 929 | } |
| 930 | } |
| 931 | } |
| 932 | #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64 |