Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -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 | # Description: |
| 7 | # XNNPACK - optimized floating-point neural network operators library |
| 8 | |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 9 | load(":build_defs.bzl", "xnnpack_aggregate_library", "xnnpack_benchmark", "xnnpack_binary", "xnnpack_cc_library", "xnnpack_min_size_copts", "xnnpack_optional_armcl_copts", "xnnpack_optional_armcl_deps", "xnnpack_optional_gemmlowp_copts", "xnnpack_optional_gemmlowp_deps", "xnnpack_optional_ruy_copts", "xnnpack_optional_ruy_deps", "xnnpack_optional_tflite_copts", "xnnpack_optional_tflite_deps", "xnnpack_std_copts", "xnnpack_unit_test", "xnnpack_visibility") |
| 10 | |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 11 | licenses(["notice"]) |
| 12 | |
| 13 | exports_files(["LICENSE"]) |
| 14 | |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 15 | OPERATOR_BENCHMARK_DEPS = [ |
| 16 | ":XNNPACK", |
| 17 | ":bench_utils", |
| 18 | "@cpuinfo", |
| 19 | "@pthreadpool", |
| 20 | ] |
| 21 | |
| 22 | MICROKERNEL_BENCHMARK_DEPS = [ |
| 23 | ":ukernels", |
| 24 | ":bench_utils", |
Frank Barchard | 7e95597 | 2019-10-11 10:34:25 -0700 | [diff] [blame] | 25 | ":enable_assembly", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 26 | "@cpuinfo", |
| 27 | "@FP16", |
| 28 | "@pthreadpool", |
| 29 | ] |
| 30 | |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 31 | ACCURACY_EVAL_DEPS = [ |
| 32 | ":XNNPACK", |
| 33 | ":ukernels", |
| 34 | "@FP16", |
| 35 | "@pthreadpool", |
| 36 | ] |
| 37 | |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 38 | MICROKERNEL_TEST_DEPS = [ |
| 39 | ":ukernels", |
Frank Barchard | 7e95597 | 2019-10-11 10:34:25 -0700 | [diff] [blame] | 40 | ":enable_assembly", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 41 | "@cpuinfo", |
| 42 | "@FP16", |
| 43 | "@pthreadpool", |
| 44 | ] |
| 45 | |
| 46 | OPERATOR_TEST_DEPS = [ |
| 47 | ":XNNPACK", |
| 48 | "@pthreadpool", |
| 49 | "@FP16", |
| 50 | ] |
| 51 | |
| 52 | OPERATOR_SRCS = [ |
| 53 | "src/add.c", |
| 54 | "src/argmax-pooling.c", |
| 55 | "src/average-pooling.c", |
| 56 | "src/channel-pad.c", |
| 57 | "src/channel-shuffle.c", |
| 58 | "src/clamp.c", |
| 59 | "src/convolution-spnchw.c", |
| 60 | "src/convolution.c", |
| 61 | "src/deconvolution.c", |
| 62 | "src/fully-connected.c", |
| 63 | "src/global-average-pooling-spnchw.c", |
| 64 | "src/global-average-pooling.c", |
| 65 | "src/hardswish.c", |
| 66 | "src/leaky-relu.c", |
| 67 | "src/max-pooling.c", |
Marat Dukhan | ca2733c | 2019-11-15 23:21:17 -0800 | [diff] [blame] | 68 | "src/multiply.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 69 | "src/prelu.c", |
Marat Dukhan | 6972249 | 2019-11-11 19:55:50 -0800 | [diff] [blame] | 70 | "src/resize-bilinear.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 71 | "src/sigmoid.c", |
| 72 | "src/softargmax.c", |
| 73 | "src/unpooling.c", |
| 74 | ] |
| 75 | |
| 76 | SCALAR_UKERNELS = [ |
| 77 | "src/f32-argmaxpool/mp9p8q-scalar.c", |
| 78 | "src/f32-argmaxpool/up4-scalar.c", |
| 79 | "src/f32-argmaxpool/up9-scalar.c", |
| 80 | "src/f32-avgpool/mp9p8q-scalar.c", |
| 81 | "src/f32-avgpool/up9-scalar.c", |
Marat Dukhan | 35dacfb | 2019-11-07 19:18:16 -0800 | [diff] [blame] | 82 | "src/f32-bilinear/scalar-c1.c", |
| 83 | "src/f32-bilinear/scalar-c2.c", |
| 84 | "src/f32-bilinear/scalar-c4.c", |
Marat Dukhan | c07cb7f | 2019-11-14 15:32:05 -0800 | [diff] [blame] | 85 | "src/f32-binop/vadd-scalar-x1.c", |
| 86 | "src/f32-binop/vadd-scalar-x2.c", |
| 87 | "src/f32-binop/vadd-scalar-x4.c", |
| 88 | "src/f32-binop/vaddc-scalar-x1.c", |
| 89 | "src/f32-binop/vaddc-scalar-x2.c", |
| 90 | "src/f32-binop/vaddc-scalar-x4.c", |
| 91 | "src/f32-binop/vmul-scalar-x1.c", |
| 92 | "src/f32-binop/vmul-scalar-x2.c", |
| 93 | "src/f32-binop/vmul-scalar-x4.c", |
| 94 | "src/f32-binop/vmulc-scalar-x1.c", |
| 95 | "src/f32-binop/vmulc-scalar-x2.c", |
| 96 | "src/f32-binop/vmulc-scalar-x4.c", |
| 97 | "src/f32-binop/vsub-scalar-x1.c", |
| 98 | "src/f32-binop/vsub-scalar-x2.c", |
| 99 | "src/f32-binop/vsub-scalar-x4.c", |
| 100 | "src/f32-binop/vsubc-scalar-x1.c", |
| 101 | "src/f32-binop/vsubc-scalar-x2.c", |
| 102 | "src/f32-binop/vsubc-scalar-x4.c", |
| 103 | "src/f32-binop/vrsubc-scalar-x1.c", |
| 104 | "src/f32-binop/vrsubc-scalar-x2.c", |
| 105 | "src/f32-binop/vrsubc-scalar-x4.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 106 | "src/f32-clamp/scalar.c", |
Erich Elsen | 563df5f | 2019-10-23 08:02:21 -0700 | [diff] [blame] | 107 | "src/f32-conv-hwc2spchw/3x3s2p1c3x4-scalar-1x1.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 108 | "src/f32-igemm/1x4-scalar.c", |
| 109 | "src/f32-igemm/2x4-scalar.c", |
| 110 | "src/f32-igemm/4x2-scalar.c", |
| 111 | "src/f32-igemm/4x4-scalar.c", |
| 112 | "src/f32-dwconv/up1x25-scalar.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 113 | "src/f32-dwconv/up1x25-scalar-acc2.c", |
| 114 | "src/f32-dwconv/up2x25-scalar.c", |
| 115 | "src/f32-dwconv/up2x25-scalar-acc2.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 116 | "src/f32-dwconv/up1x4-scalar.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 117 | "src/f32-dwconv/up1x4-scalar-acc2.c", |
| 118 | "src/f32-dwconv/up2x4-scalar.c", |
| 119 | "src/f32-dwconv/up2x4-scalar-acc2.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 120 | "src/f32-dwconv/up1x9-scalar.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 121 | "src/f32-dwconv/up1x9-scalar-acc2.c", |
| 122 | "src/f32-dwconv/up2x9-scalar.c", |
| 123 | "src/f32-dwconv/up2x9-scalar-acc2.c", |
Erich Elsen | 0cc2c53 | 2019-10-15 04:44:18 -0700 | [diff] [blame] | 124 | "src/f32-dwconv-spchw/3x3p1-scalar.c", |
Erich Elsen | 38709a6 | 2019-11-08 11:58:45 -0800 | [diff] [blame] | 125 | "src/f32-dwconv-spchw/5x5p2-scalar.c", |
Erich Elsen | ac4de80 | 2019-10-16 04:35:30 -0700 | [diff] [blame] | 126 | "src/f32-dwconv-spchw/3x3s2p1-scalar.c", |
Erich Elsen | 38709a6 | 2019-11-08 11:58:45 -0800 | [diff] [blame] | 127 | "src/f32-dwconv-spchw/5x5s2p2-scalar.c", |
Erich Elsen | 34dc2c0 | 2019-10-16 05:11:41 -0700 | [diff] [blame] | 128 | "src/f32-gavgpool-spchw/scalar-x1.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 129 | "src/f32-gavgpool/mp7p7q-scalar.c", |
| 130 | "src/f32-gavgpool/up7-scalar.c", |
| 131 | "src/f32-gemm/1x4-scalar.c", |
| 132 | "src/f32-gemm/2x4-scalar.c", |
| 133 | "src/f32-gemm/4x2-scalar.c", |
| 134 | "src/f32-gemm/4x4-scalar.c", |
| 135 | "src/f32-gemminc/1x4-scalar.c", |
| 136 | "src/f32-gemminc/2x4-scalar.c", |
| 137 | "src/f32-gemminc/4x4-scalar.c", |
| 138 | "src/f32-hswish/scalar.c", |
| 139 | "src/f32-maxpool/9p8q-scalar.c", |
| 140 | "src/f32-pavgpool/mp9p8q-scalar.c", |
| 141 | "src/f32-pavgpool/up9-scalar.c", |
| 142 | "src/f32-ppmm/2x4-scalar.c", |
| 143 | "src/f32-ppmm/3x3-scalar.c", |
| 144 | "src/f32-ppmm/4x2-scalar.c", |
| 145 | "src/f32-ppmm/4x4-scalar.c", |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 146 | "src/f32-prelu/scalar-2x1.c", |
| 147 | "src/f32-prelu/scalar-2x4.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 148 | "src/f32-rmax/scalar.c", |
| 149 | "src/f32-spmm/1x1-scalar-pipelined.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 150 | "src/f32-spmm/1x1-scalar.c", |
| 151 | "src/f32-spmm/2x1-scalar-pipelined.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 152 | "src/f32-spmm/2x1-scalar.c", |
| 153 | "src/f32-spmm/4x1-scalar-pipelined.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 154 | "src/f32-spmm/4x1-scalar.c", |
| 155 | "src/f32-spmm/8x1-scalar-pipelined.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 156 | "src/f32-spmm/8x1-scalar.c", |
Erich Elsen | c6afd9b | 2019-10-24 16:10:53 -0700 | [diff] [blame] | 157 | "src/f32-spmm/8x2-scalar.c", |
| 158 | "src/f32-spmm/8x4-scalar.c", |
Marat Dukhan | 49e6ee9 | 2019-11-06 15:55:29 -0800 | [diff] [blame] | 159 | "src/f32-vmulcaddc/c1-scalar-2x.c", |
| 160 | "src/f32-vmulcaddc/c2-scalar-2x.c", |
| 161 | "src/f32-vmulcaddc/c4-scalar-2x.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 162 | "src/q8-avgpool/mp9p8q-scalar.c", |
| 163 | "src/q8-avgpool/up9-scalar.c", |
| 164 | "src/q8-igemm/2x2-scalar.c", |
| 165 | "src/q8-dwconv/up1x9-scalar.c", |
| 166 | "src/q8-gavgpool/mp7p7q-scalar.c", |
| 167 | "src/q8-gavgpool/up7-scalar.c", |
| 168 | "src/q8-gemm/2x2-scalar.c", |
| 169 | "src/q8-vadd/scalar.c", |
| 170 | "src/u8-clamp/scalar.c", |
| 171 | "src/u8-lut32norm/scalar.c", |
| 172 | "src/u8-maxpool/9p8q-scalar.c", |
| 173 | "src/u8-rmax/scalar.c", |
| 174 | "src/x32-packx/x2-scalar.c", |
| 175 | "src/x32-packx/x3-scalar.c", |
| 176 | "src/x32-packx/x4-scalar.c", |
| 177 | "src/x32-pad/x2-scalar.c", |
| 178 | "src/x32-unpool/scalar.c", |
| 179 | "src/x32-zip/x2-scalar.c", |
| 180 | "src/x32-zip/x3-scalar.c", |
| 181 | "src/x32-zip/x4-scalar.c", |
| 182 | "src/x32-zip/xm-scalar.c", |
| 183 | "src/x8-lut/scalar.c", |
| 184 | "src/x8-zip/x2-scalar.c", |
| 185 | "src/x8-zip/x3-scalar.c", |
| 186 | "src/x8-zip/x4-scalar.c", |
| 187 | "src/x8-zip/xm-scalar.c", |
| 188 | ] |
| 189 | |
| 190 | PSIMD_UKERNELS = [ |
| 191 | "src/f32-argmaxpool/mp9p8q-psimd.c", |
| 192 | "src/f32-argmaxpool/up4-psimd.c", |
| 193 | "src/f32-argmaxpool/up9-psimd.c", |
| 194 | "src/f32-avgpool/mp9p8q-psimd.c", |
| 195 | "src/f32-avgpool/up9-psimd.c", |
Marat Dukhan | 35dacfb | 2019-11-07 19:18:16 -0800 | [diff] [blame] | 196 | "src/f32-bilinear/psimd-c4.c", |
| 197 | "src/f32-bilinear/psimd-c8.c", |
Marat Dukhan | c07cb7f | 2019-11-14 15:32:05 -0800 | [diff] [blame] | 198 | "src/f32-binop/vadd-psimd-x4.c", |
| 199 | "src/f32-binop/vadd-psimd-x8.c", |
| 200 | "src/f32-binop/vaddc-psimd-x4.c", |
| 201 | "src/f32-binop/vaddc-psimd-x8.c", |
| 202 | "src/f32-binop/vmul-psimd-x4.c", |
| 203 | "src/f32-binop/vmul-psimd-x8.c", |
| 204 | "src/f32-binop/vmulc-psimd-x4.c", |
| 205 | "src/f32-binop/vmulc-psimd-x8.c", |
| 206 | "src/f32-binop/vrsubc-psimd-x4.c", |
| 207 | "src/f32-binop/vrsubc-psimd-x8.c", |
| 208 | "src/f32-binop/vsub-psimd-x4.c", |
| 209 | "src/f32-binop/vsub-psimd-x8.c", |
| 210 | "src/f32-binop/vsubc-psimd-x4.c", |
| 211 | "src/f32-binop/vsubc-psimd-x8.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 212 | "src/f32-clamp/psimd.c", |
| 213 | "src/f32-igemm/1x8-psimd-loadsplat.c", |
| 214 | "src/f32-igemm/1x8-psimd-splat.c", |
| 215 | "src/f32-igemm/1x8s4-psimd.c", |
| 216 | "src/f32-igemm/4x2c4-psimd.c", |
| 217 | "src/f32-igemm/4x8-psimd-loadsplat.c", |
| 218 | "src/f32-igemm/4x8-psimd-splat.c", |
| 219 | "src/f32-igemm/4x8s4-psimd.c", |
| 220 | "src/f32-igemm/6x8-psimd-loadsplat.c", |
| 221 | "src/f32-igemm/6x8-psimd-splat.c", |
| 222 | "src/f32-igemm/6x8s4-psimd.c", |
| 223 | "src/f32-dwconv/up4x25-psimd.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 224 | "src/f32-dwconv/up4x25-psimd-acc2.c", |
| 225 | "src/f32-dwconv/up8x25-psimd.c", |
| 226 | "src/f32-dwconv/up8x25-psimd-acc2.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 227 | "src/f32-dwconv/up4x4-psimd.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 228 | "src/f32-dwconv/up4x4-psimd-acc2.c", |
| 229 | "src/f32-dwconv/up8x4-psimd.c", |
| 230 | "src/f32-dwconv/up8x4-psimd-acc2.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 231 | "src/f32-dwconv/up4x9-psimd.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 232 | "src/f32-dwconv/up4x9-psimd-acc2.c", |
| 233 | "src/f32-dwconv/up8x9-psimd.c", |
| 234 | "src/f32-dwconv/up8x9-psimd-acc2.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 235 | "src/f32-gavgpool/mp7p7q-psimd.c", |
| 236 | "src/f32-gavgpool/up7-psimd.c", |
| 237 | "src/f32-gemm/1x8-psimd-loadsplat.c", |
| 238 | "src/f32-gemm/1x8-psimd-splat.c", |
| 239 | "src/f32-gemm/1x8s4-psimd.c", |
| 240 | "src/f32-gemm/4x8-psimd-loadsplat.c", |
| 241 | "src/f32-gemm/4x8-psimd-splat.c", |
| 242 | "src/f32-gemm/4x8s4-psimd.c", |
| 243 | "src/f32-gemm/6x8-psimd-loadsplat.c", |
| 244 | "src/f32-gemm/6x8-psimd-splat.c", |
| 245 | "src/f32-gemm/6x8s4-psimd.c", |
| 246 | "src/f32-gemminc/1x8-psimd-loadsplat.c", |
| 247 | "src/f32-gemminc/1x8-psimd-splat.c", |
| 248 | "src/f32-gemminc/1x8s4-psimd.c", |
| 249 | "src/f32-gemminc/4x8-psimd-loadsplat.c", |
| 250 | "src/f32-gemminc/4x8-psimd-splat.c", |
| 251 | "src/f32-gemminc/4x8s4-psimd.c", |
| 252 | "src/f32-gemminc/6x8-psimd-loadsplat.c", |
| 253 | "src/f32-gemminc/6x8-psimd-splat.c", |
| 254 | "src/f32-gemminc/6x8s4-psimd.c", |
| 255 | "src/f32-hswish/psimd.c", |
| 256 | "src/f32-maxpool/9p8q-psimd.c", |
| 257 | "src/f32-pavgpool/mp9p8q-psimd.c", |
| 258 | "src/f32-pavgpool/up9-psimd.c", |
| 259 | "src/f32-ppmm/4x8-psimd.c", |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 260 | "src/f32-prelu/psimd-2x4.c", |
| 261 | "src/f32-prelu/psimd-2x8.c", |
Marat Dukhan | 49e6ee9 | 2019-11-06 15:55:29 -0800 | [diff] [blame] | 262 | "src/f32-vmulcaddc/c4-psimd-2x.c", |
| 263 | "src/f32-vmulcaddc/c8-psimd-2x.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 264 | "src/x32-packx/x4-psimd.c", |
| 265 | "src/x32-pad/x2-psimd.c", |
| 266 | "src/x32-unpool/psimd.c", |
| 267 | "src/x32-zip/x2-psimd.c", |
| 268 | "src/x32-zip/x3-psimd.c", |
| 269 | "src/x32-zip/x4-psimd.c", |
| 270 | "src/x32-zip/xm-psimd.c", |
| 271 | ] |
| 272 | |
| 273 | # ISA-specific micro-kernels |
| 274 | NEON_UKERNELS = [ |
| 275 | "src/f32-avgpool/mp9p8q-neon.c", |
| 276 | "src/f32-avgpool/up9-neon.c", |
Marat Dukhan | 35dacfb | 2019-11-07 19:18:16 -0800 | [diff] [blame] | 277 | "src/f32-bilinear/neon-c4.c", |
| 278 | "src/f32-bilinear/neon-c8.c", |
Marat Dukhan | c07cb7f | 2019-11-14 15:32:05 -0800 | [diff] [blame] | 279 | "src/f32-binop/vadd-neon-x4.c", |
| 280 | "src/f32-binop/vadd-neon-x8.c", |
| 281 | "src/f32-binop/vaddc-neon-x4.c", |
| 282 | "src/f32-binop/vaddc-neon-x8.c", |
| 283 | "src/f32-binop/vmul-neon-x4.c", |
| 284 | "src/f32-binop/vmul-neon-x8.c", |
| 285 | "src/f32-binop/vmulc-neon-x4.c", |
| 286 | "src/f32-binop/vmulc-neon-x8.c", |
| 287 | "src/f32-binop/vrsubc-neon-x4.c", |
| 288 | "src/f32-binop/vrsubc-neon-x8.c", |
| 289 | "src/f32-binop/vsub-neon-x4.c", |
| 290 | "src/f32-binop/vsub-neon-x8.c", |
| 291 | "src/f32-binop/vsubc-neon-x4.c", |
| 292 | "src/f32-binop/vsubc-neon-x8.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 293 | "src/f32-clamp/neon.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 294 | "src/f32-dwconv/up4x9-neon.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 295 | "src/f32-dwconv/up4x9-neon-acc2.c", |
| 296 | "src/f32-dwconv/up8x9-neon.c", |
| 297 | "src/f32-dwconv/up8x9-neon-acc2.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 298 | "src/f32-gavgpool-spchw/neon-x4.c", |
| 299 | "src/f32-gavgpool/mp7p7q-neon.c", |
| 300 | "src/f32-gavgpool/up7-neon.c", |
| 301 | "src/f32-gemm/1x8-neon-ld64.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 302 | "src/f32-gemm/4x2-neon-ld64.c", |
| 303 | "src/f32-gemm/4x8-neon-ld128.c", |
| 304 | "src/f32-gemm/4x8-neon-ld64.c", |
| 305 | "src/f32-gemm/5x8-neon-ld64.c", |
| 306 | "src/f32-gemm/6x8-neon-ld64.c", |
| 307 | "src/f32-gemminc/1x8-neon-ld64.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 308 | "src/f32-gemminc/4x8-neon-ld128.c", |
| 309 | "src/f32-gemminc/4x8-neon-ld64.c", |
| 310 | "src/f32-gemminc/5x8-neon-ld64.c", |
| 311 | "src/f32-gemminc/6x8-neon-ld64.c", |
| 312 | "src/f32-hswish/neon.c", |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 313 | "src/f32-igemm/1x8-neon-ld64.c", |
| 314 | "src/f32-igemm/4x2-neon-ld64.c", |
| 315 | "src/f32-igemm/4x4-neon-ld64.c", |
| 316 | "src/f32-igemm/4x8-neon-ld128.c", |
| 317 | "src/f32-igemm/4x8-neon-ld64.c", |
| 318 | "src/f32-igemm/6x8-neon-ld64.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 319 | "src/f32-pavgpool/mp9p8q-neon.c", |
| 320 | "src/f32-pavgpool/up9-neon.c", |
| 321 | "src/f32-ppmm/4x8-neon.c", |
| 322 | "src/f32-ppmm/8x8-neon.c", |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 323 | "src/f32-prelu/neon-2x4.c", |
| 324 | "src/f32-prelu/neon-2x8.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 325 | "src/f32-rmax/neon.c", |
Marat Dukhan | 49e6ee9 | 2019-11-06 15:55:29 -0800 | [diff] [blame] | 326 | "src/f32-vmulcaddc/c4-neon-2x.c", |
| 327 | "src/f32-vmulcaddc/c8-neon-2x.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 328 | "src/q8-avgpool/mp9p8q-neon.c", |
| 329 | "src/q8-avgpool/up9-neon.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 330 | "src/q8-dwconv/up8x9-neon.c", |
| 331 | "src/q8-gavgpool/mp7p7q-neon.c", |
| 332 | "src/q8-gavgpool/up7-neon.c", |
| 333 | "src/q8-gemm/4x8-neon.c", |
| 334 | "src/q8-gemm/8x8-neon.c", |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 335 | "src/q8-igemm/4x8-neon.c", |
| 336 | "src/q8-igemm/8x8-neon.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 337 | "src/q8-vadd/neon.c", |
| 338 | "src/u8-clamp/neon.c", |
| 339 | "src/u8-maxpool/9p8q-neon.c", |
| 340 | "src/u8-rmax/neon.c", |
| 341 | "src/x32-packx/x4-neon-st4.c", |
| 342 | "src/x32-pad/x2-neon.c", |
| 343 | "src/x32-zip/x2-neon.c", |
| 344 | "src/x32-zip/x3-neon.c", |
| 345 | "src/x32-zip/x4-neon.c", |
| 346 | "src/x32-zip/xm-neon.c", |
| 347 | "src/x8-zip/x2-neon.c", |
| 348 | "src/x8-zip/x3-neon.c", |
| 349 | "src/x8-zip/x4-neon.c", |
| 350 | "src/x8-zip/xm-neon.c", |
| 351 | ] |
| 352 | |
| 353 | NEONFMA_UKERNELS = [ |
Marat Dukhan | 35dacfb | 2019-11-07 19:18:16 -0800 | [diff] [blame] | 354 | "src/f32-bilinear/neonfma-c4.c", |
| 355 | "src/f32-bilinear/neonfma-c8.c", |
Frank Barchard | db45b6a | 2019-10-09 16:42:45 -0700 | [diff] [blame] | 356 | "src/f32-igemm/1x8-neonfma-ld64.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 357 | "src/f32-igemm/4x2-neonfma-ld64.c", |
| 358 | "src/f32-igemm/4x4-neonfma-ld64.c", |
| 359 | "src/f32-igemm/4x8-neonfma-ld128.c", |
| 360 | "src/f32-igemm/4x8-neonfma-ld64.c", |
| 361 | "src/f32-igemm/6x8-neonfma-ld64.c", |
| 362 | "src/f32-dwconv/up4x9-neonfma.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 363 | "src/f32-dwconv/up4x9-neonfma-acc2.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 364 | "src/f32-dwconv/up8x9-neonfma.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 365 | "src/f32-dwconv/up8x9-neonfma-acc2.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 366 | "src/f32-gemm/1x8-neonfma-ld64.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 367 | "src/f32-gemm/4x2-neonfma-ld64.c", |
| 368 | "src/f32-gemm/4x8-neonfma-ld128.c", |
| 369 | "src/f32-gemm/4x8-neonfma-ld64.c", |
| 370 | "src/f32-gemm/5x8-neonfma-ld64.c", |
| 371 | "src/f32-gemm/6x8-neonfma-ld64.c", |
| 372 | "src/f32-gemminc/1x8-neonfma-ld64.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 373 | "src/f32-gemminc/4x8-neonfma-ld128.c", |
| 374 | "src/f32-gemminc/4x8-neonfma-ld64.c", |
| 375 | "src/f32-gemminc/5x8-neonfma-ld64.c", |
| 376 | "src/f32-gemminc/6x8-neonfma-ld64.c", |
| 377 | "src/f32-hswish/neonfma.c", |
| 378 | "src/f32-ppmm/4x8-neonfma.c", |
| 379 | "src/f32-ppmm/8x8-neonfma.c", |
Marat Dukhan | 346a9e5 | 2019-11-15 09:06:30 -0800 | [diff] [blame] | 380 | "src/f32-sigmoid/neonfma-p5-x16.c", |
Marat Dukhan | 49e6ee9 | 2019-11-06 15:55:29 -0800 | [diff] [blame] | 381 | "src/f32-vmulcaddc/c4-neonfma-2x.c", |
| 382 | "src/f32-vmulcaddc/c8-neonfma-2x.c", |
Marat Dukhan | 797a8fe | 2019-11-14 20:21:57 -0800 | [diff] [blame] | 383 | "src/math/exp-neonfma-lut64-p2.c", |
| 384 | "src/math/exp-neonfma-p5.c", |
Marat Dukhan | 346a9e5 | 2019-11-15 09:06:30 -0800 | [diff] [blame] | 385 | "src/math/expminus-neonfma-p5.c", |
| 386 | "src/math/sigmoid-neonfma-p5.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 387 | ] |
| 388 | |
| 389 | AARCH64_NEONFMA_UKERNELS = [ |
| 390 | "src/f32-conv-hwc/3x3s2p1c3x4-neonfma-2x2.c", |
| 391 | "src/f32-conv-hwc/3x3s2p1c3x8-neonfma-2x2.c", |
| 392 | "src/f32-conv-hwc2spchw/3x3s2p1c3x4-neonfma-2x2.c", |
| 393 | "src/f32-dwconv-spchw/3x3p1-neonfma.c", |
| 394 | "src/f32-dwconv-spchw/5x5p2-neonfma.c", |
| 395 | "src/f32-dwconv-spchw/3x3s2p1-neonfma.c", |
| 396 | "src/f32-dwconv-spchw/5x5s2p2-neonfma.c", |
| 397 | "src/f32-spmm/12x1-neonfma.c", |
| 398 | "src/f32-spmm/12x2-neonfma.c", |
| 399 | "src/f32-spmm/12x4-neonfma.c", |
| 400 | "src/f32-spmm/16x1-neonfma-pipelined.c", |
| 401 | "src/f32-spmm/16x1-neonfma-unroll2.c", |
| 402 | "src/f32-spmm/16x1-neonfma.c", |
| 403 | "src/f32-spmm/16x2-neonfma.c", |
| 404 | "src/f32-spmm/16x4-neonfma.c", |
| 405 | "src/f32-spmm/4x1-neonfma-pipelined.c", |
| 406 | "src/f32-spmm/4x1-neonfma-unroll2.c", |
| 407 | "src/f32-spmm/4x1-neonfma.c", |
| 408 | "src/f32-spmm/4x2-neonfma.c", |
| 409 | "src/f32-spmm/4x4-neonfma.c", |
| 410 | "src/f32-spmm/8x1-neonfma-pipelined.c", |
| 411 | "src/f32-spmm/8x1-neonfma-unroll2.c", |
| 412 | "src/f32-spmm/8x1-neonfma.c", |
| 413 | "src/f32-spmm/8x2-neonfma.c", |
| 414 | "src/f32-spmm/8x4-neonfma.c", |
| 415 | ] |
| 416 | |
| 417 | AARCH64_NEONFP16ARITH_UKERNELS = [ |
| 418 | "src/f16-gemm/4x8-neonfp16arith-ld64.c", |
| 419 | "src/f16-gemm/6x8-neonfp16arith-ld64.c", |
| 420 | "src/f16-gemm/8x8-neonfp16arith-ld64.c", |
| 421 | ] |
| 422 | |
| 423 | SSE_UKERNELS = [ |
| 424 | "src/f32-avgpool/mp9p8q-sse.c", |
| 425 | "src/f32-avgpool/up9-sse.c", |
Marat Dukhan | 35dacfb | 2019-11-07 19:18:16 -0800 | [diff] [blame] | 426 | "src/f32-bilinear/sse-c4.c", |
| 427 | "src/f32-bilinear/sse-c8.c", |
Marat Dukhan | c07cb7f | 2019-11-14 15:32:05 -0800 | [diff] [blame] | 428 | "src/f32-binop/vadd-sse-x4.c", |
| 429 | "src/f32-binop/vadd-sse-x8.c", |
| 430 | "src/f32-binop/vaddc-sse-x4.c", |
| 431 | "src/f32-binop/vaddc-sse-x8.c", |
| 432 | "src/f32-binop/vmul-sse-x4.c", |
| 433 | "src/f32-binop/vmul-sse-x8.c", |
| 434 | "src/f32-binop/vmulc-sse-x4.c", |
| 435 | "src/f32-binop/vmulc-sse-x8.c", |
| 436 | "src/f32-binop/vrsubc-sse-x4.c", |
| 437 | "src/f32-binop/vrsubc-sse-x8.c", |
| 438 | "src/f32-binop/vsub-sse-x4.c", |
| 439 | "src/f32-binop/vsub-sse-x8.c", |
| 440 | "src/f32-binop/vsubc-sse-x4.c", |
| 441 | "src/f32-binop/vsubc-sse-x8.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 442 | "src/f32-clamp/sse.c", |
| 443 | "src/f32-igemm/1x8-sse-dup.c", |
| 444 | "src/f32-igemm/1x8-sse-load1.c", |
| 445 | "src/f32-igemm/1x8s4-sse.c", |
| 446 | "src/f32-igemm/4x2c4-sse.c", |
| 447 | "src/f32-igemm/4x8-sse-dup.c", |
| 448 | "src/f32-igemm/4x8-sse-load1.c", |
| 449 | "src/f32-igemm/4x8s4-sse.c", |
| 450 | "src/f32-dwconv/up4x25-sse.c", |
| 451 | "src/f32-dwconv/up4x4-sse.c", |
| 452 | "src/f32-dwconv/up4x9-sse.c", |
Marat Dukhan | 5098c3e | 2019-11-07 12:01:19 -0800 | [diff] [blame] | 453 | "src/f32-dwconv/up4x25-sse-acc2.c", |
| 454 | "src/f32-dwconv/up4x4-sse-acc2.c", |
| 455 | "src/f32-dwconv/up4x9-sse-acc2.c", |
| 456 | "src/f32-dwconv/up8x25-sse.c", |
| 457 | "src/f32-dwconv/up8x4-sse.c", |
| 458 | "src/f32-dwconv/up8x9-sse.c", |
| 459 | "src/f32-dwconv/up8x25-sse-acc2.c", |
| 460 | "src/f32-dwconv/up8x4-sse-acc2.c", |
| 461 | "src/f32-dwconv/up8x9-sse-acc2.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 462 | "src/f32-gavgpool-spchw/sse-x4.c", |
| 463 | "src/f32-gavgpool/mp7p7q-sse.c", |
| 464 | "src/f32-gavgpool/up7-sse.c", |
| 465 | "src/f32-gemm/1x8-sse-dup.c", |
| 466 | "src/f32-gemm/1x8-sse-load1.c", |
| 467 | "src/f32-gemm/1x8s4-sse.c", |
| 468 | "src/f32-gemm/4x8-sse-dup.c", |
| 469 | "src/f32-gemm/4x8-sse-load1.c", |
| 470 | "src/f32-gemm/4x8s4-sse.c", |
| 471 | "src/f32-gemminc/1x8-sse-dup.c", |
| 472 | "src/f32-gemminc/1x8-sse-load1.c", |
| 473 | "src/f32-gemminc/1x8s4-sse.c", |
| 474 | "src/f32-gemminc/4x8-sse-dup.c", |
| 475 | "src/f32-gemminc/4x8-sse-load1.c", |
| 476 | "src/f32-gemminc/4x8s4-sse.c", |
| 477 | "src/f32-hswish/sse.c", |
| 478 | "src/f32-maxpool/9p8q-sse.c", |
| 479 | "src/f32-pavgpool/mp9p8q-sse.c", |
| 480 | "src/f32-pavgpool/up9-sse.c", |
| 481 | "src/f32-dwconv-spchw/3x3p1-sse.c", |
| 482 | "src/f32-dwconv-spchw/3x3s2p1-sse.c", |
| 483 | "src/f32-ppmm/4x8-sse.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 484 | "src/f32-rmax/sse.c", |
| 485 | "src/f32-spmm/4x1-sse.c", |
| 486 | "src/f32-spmm/8x1-sse.c", |
Marat Dukhan | 49e6ee9 | 2019-11-06 15:55:29 -0800 | [diff] [blame] | 487 | "src/f32-vmulcaddc/c4-sse-2x.c", |
| 488 | "src/f32-vmulcaddc/c8-sse-2x.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 489 | "src/x32-packx/x4-sse.c", |
| 490 | ] |
| 491 | |
| 492 | SSE2_UKERNELS = [ |
| 493 | "src/f32-argmaxpool/mp9p8q-sse2.c", |
| 494 | "src/f32-argmaxpool/up4-sse2.c", |
| 495 | "src/f32-argmaxpool/up9-sse2.c", |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 496 | "src/f32-prelu/sse2-2x4.c", |
| 497 | "src/f32-prelu/sse2-2x8.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 498 | "src/q8-avgpool/mp9p8q-sse2.c", |
| 499 | "src/q8-avgpool/up9-sse2.c", |
| 500 | "src/q8-igemm/4x4c2-sse2.c", |
| 501 | "src/q8-dwconv/up8x9-sse2.c", |
| 502 | "src/q8-gavgpool/mp7p7q-sse2.c", |
| 503 | "src/q8-gavgpool/up7-sse2.c", |
| 504 | "src/q8-gemm/2x4c8-sse2.c", |
| 505 | "src/q8-gemm/4x4c2-sse2.c", |
| 506 | "src/q8-vadd/sse2.c", |
| 507 | "src/u8-clamp/sse2.c", |
| 508 | "src/u8-maxpool/9p8q-sse2.c", |
| 509 | "src/u8-rmax/sse2.c", |
| 510 | "src/x32-pad/x2-sse2.c", |
| 511 | "src/x32-zip/x2-sse2.c", |
| 512 | "src/x32-zip/x3-sse2.c", |
| 513 | "src/x32-zip/x4-sse2.c", |
| 514 | "src/x32-zip/xm-sse2.c", |
| 515 | "src/x8-zip/x2-sse2.c", |
| 516 | "src/x8-zip/x3-sse2.c", |
| 517 | "src/x8-zip/x4-sse2.c", |
| 518 | "src/x8-zip/xm-sse2.c", |
Marat Dukhan | ffd6840 | 2019-11-15 15:19:11 -0800 | [diff] [blame] | 519 | "src/math/exp-sse2-p5.c", |
| 520 | "src/math/expminus-sse2-p5.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 521 | ] |
| 522 | |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 523 | SSE41_UKERNELS = [ |
| 524 | "src/f32-prelu/sse41-2x4.c", |
| 525 | "src/f32-prelu/sse41-2x8.c", |
| 526 | ] |
| 527 | |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 528 | AVX_UKERNELS = [ |
| 529 | "src/f32-rmax/avx.c", |
Marat Dukhan | 05ac8e3 | 2019-10-21 15:39:33 -0700 | [diff] [blame] | 530 | "src/f32-vscale/avx-unroll32.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 531 | ] |
| 532 | |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 533 | AVX2_UKERNELS = [ |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 534 | "src/f32-raddexpminusmax/avx2-p5-unroll64.c", |
Marat Dukhan | 6f8d4d3 | 2019-10-25 17:07:09 -0700 | [diff] [blame] | 535 | "src/f32-raddextexp/avx2-p5-unroll64.c", |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 536 | "src/f32-raddstoreexpminusmax/avx2-p5-unroll64.c", |
| 537 | "src/f32-vscaleexpminusmax/avx2-p5-unroll64.c", |
Marat Dukhan | 6f8d4d3 | 2019-10-25 17:07:09 -0700 | [diff] [blame] | 538 | "src/f32-vscaleextexp/avx2-p5-unroll64.c", |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 539 | "src/math/exp-avx2-p5.c", |
| 540 | "src/math/exp-avx2-perm-p3.c", |
| 541 | "src/math/exp-avx2-perm-p4.c", |
Marat Dukhan | 515c977 | 2019-10-17 18:07:57 -0700 | [diff] [blame] | 542 | "src/math/expminus-avx2-p5.c", |
Marat Dukhan | 98ba441 | 2019-10-23 02:14:28 -0700 | [diff] [blame] | 543 | "src/math/extexp-avx2-p5.c", |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 544 | ] |
| 545 | |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 546 | AVX512F_UKERNELS = [ |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 547 | "src/f32-raddexpminusmax/avx512f-p5-scalef-unroll128.c", |
Marat Dukhan | 6f8d4d3 | 2019-10-25 17:07:09 -0700 | [diff] [blame] | 548 | "src/f32-raddextexp/avx512f-p5-scalef-unroll128.c", |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 549 | "src/f32-raddstoreexpminusmax/avx512f-p5-scalef-unroll128.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 550 | "src/f32-rmax/avx512f.c", |
Marat Dukhan | 05ac8e3 | 2019-10-21 15:39:33 -0700 | [diff] [blame] | 551 | "src/f32-vscale/avx512f-unroll64.c", |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 552 | "src/f32-vscaleexpminusmax/avx512f-p5-scalef-unroll128.c", |
Marat Dukhan | 6f8d4d3 | 2019-10-25 17:07:09 -0700 | [diff] [blame] | 553 | "src/f32-vscaleextexp/avx512f-p5-scalef-unroll128.c", |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 554 | "src/math/exp-avx512f-p5-scalef.c", |
| 555 | "src/math/exp-avx512f-p5.c", |
| 556 | "src/math/exp-avx512f-perm-p3.c", |
Marat Dukhan | feb4923 | 2019-10-28 11:03:31 -0700 | [diff] [blame] | 557 | "src/math/exp-avx512f-perm2-p2.c", |
Marat Dukhan | 98ba441 | 2019-10-23 02:14:28 -0700 | [diff] [blame] | 558 | "src/math/extexp-avx512f-p5.c", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 559 | ] |
| 560 | |
| 561 | AARCH32_ASM_UKERNELS = [ |
| 562 | "src/q8-dwconv/up8x9-aarch32-neon.S", |
| 563 | ] |
| 564 | |
| 565 | AARCH64_ASM_UKERNELS = [ |
| 566 | "src/f32-dwconv/up4x9-aarch64-neonfma-cortex-a55.S", |
| 567 | "src/f32-dwconv/up4x9-aarch64-neonfma.S", |
| 568 | "src/f32-gemm/1x12-aarch64-neonfma-cortex-a53.S", |
Frank Barchard | 21be34f | 2019-10-09 19:32:19 -0700 | [diff] [blame] | 569 | "src/f32-gemm/1x8-aarch64-neonfma-cortex-a53.S", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 570 | "src/f32-gemm/1x8-aarch64-neonfma-cortex-a57.S", |
| 571 | "src/f32-gemm/1x8-aarch64-neonfma-cortex-a75.S", |
| 572 | "src/f32-gemm/4x12-aarch64-neonfma-cortex-a53.S", |
Frank Barchard | 46fb807 | 2019-10-25 12:54:22 -0700 | [diff] [blame] | 573 | "src/f32-gemm/4x8-aarch64-neonfma-cortex-a53.S", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 574 | "src/f32-gemm/4x8-aarch64-neonfma-cortex-a57.S", |
| 575 | "src/f32-gemm/4x8-aarch64-neonfma-cortex-a75.S", |
| 576 | "src/f32-gemm/4x8-aarch64-neonfma-ld128.S", |
| 577 | "src/f32-gemm/4x8-aarch64-neonfma-ld64.S", |
| 578 | "src/f32-gemm/5x8-aarch64-neonfma-cortex-a75.S", |
Frank Barchard | a7fb855 | 2019-10-23 17:14:17 -0700 | [diff] [blame] | 579 | "src/f32-gemm/6x8-aarch64-neonfma-cortex-a53.S", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 580 | "src/f32-gemm/6x8-aarch64-neonfma-cortex-a57.S", |
| 581 | "src/f32-gemm/6x8-aarch64-neonfma-cortex-a73.S", |
| 582 | "src/f32-gemm/6x8-aarch64-neonfma-cortex-a75.S", |
| 583 | "src/f32-gemm/6x8-aarch64-neonfma-ld128.S", |
| 584 | "src/f32-gemm/6x8-aarch64-neonfma-ld64.S", |
| 585 | "src/f32-gemminc/1x12-aarch64-neonfma-cortex-a53.S", |
Frank Barchard | 21be34f | 2019-10-09 19:32:19 -0700 | [diff] [blame] | 586 | "src/f32-gemminc/1x8-aarch64-neonfma-cortex-a53.S", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 587 | "src/f32-gemminc/1x8-aarch64-neonfma-cortex-a57.S", |
| 588 | "src/f32-gemminc/1x8-aarch64-neonfma-cortex-a75.S", |
| 589 | "src/f32-gemminc/4x12-aarch64-neonfma-cortex-a53.S", |
Frank Barchard | 46fb807 | 2019-10-25 12:54:22 -0700 | [diff] [blame] | 590 | "src/f32-gemminc/4x8-aarch64-neonfma-cortex-a53.S", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 591 | "src/f32-gemminc/4x8-aarch64-neonfma-cortex-a57.S", |
| 592 | "src/f32-gemminc/4x8-aarch64-neonfma-cortex-a75.S", |
| 593 | "src/f32-gemminc/4x8-aarch64-neonfma-ld128.S", |
| 594 | "src/f32-gemminc/4x8-aarch64-neonfma-ld64.S", |
| 595 | "src/f32-gemminc/5x8-aarch64-neonfma-cortex-a75.S", |
Frank Barchard | a7fb855 | 2019-10-23 17:14:17 -0700 | [diff] [blame] | 596 | "src/f32-gemminc/6x8-aarch64-neonfma-cortex-a53.S", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 597 | "src/f32-gemminc/6x8-aarch64-neonfma-cortex-a57.S", |
| 598 | "src/f32-gemminc/6x8-aarch64-neonfma-cortex-a73.S", |
| 599 | "src/f32-gemminc/6x8-aarch64-neonfma-cortex-a75.S", |
| 600 | "src/f32-gemminc/6x8-aarch64-neonfma-ld128.S", |
| 601 | "src/f32-gemminc/6x8-aarch64-neonfma-ld64.S", |
| 602 | "src/f32-igemm/1x12-aarch64-neonfma-cortex-a53.S", |
Frank Barchard | 21be34f | 2019-10-09 19:32:19 -0700 | [diff] [blame] | 603 | "src/f32-igemm/1x8-aarch64-neonfma-cortex-a53.S", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 604 | "src/f32-igemm/1x8-aarch64-neonfma-cortex-a57.S", |
| 605 | "src/f32-igemm/1x8-aarch64-neonfma-cortex-a75.S", |
| 606 | "src/f32-igemm/4x12-aarch64-neonfma-cortex-a53.S", |
Frank Barchard | 46fb807 | 2019-10-25 12:54:22 -0700 | [diff] [blame] | 607 | "src/f32-igemm/4x8-aarch64-neonfma-cortex-a53.S", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 608 | "src/f32-igemm/4x8-aarch64-neonfma-cortex-a75.S", |
| 609 | "src/f32-igemm/5x8-aarch64-neonfma-cortex-a75.S", |
Frank Barchard | a7fb855 | 2019-10-23 17:14:17 -0700 | [diff] [blame] | 610 | "src/f32-igemm/6x8-aarch64-neonfma-cortex-a53.S", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 611 | "src/f32-igemm/6x8-aarch64-neonfma-cortex-a57.S", |
| 612 | "src/f32-igemm/6x8-aarch64-neonfma-cortex-a73.S", |
| 613 | "src/f32-igemm/6x8-aarch64-neonfma-cortex-a75.S", |
| 614 | ] |
| 615 | |
| 616 | INTERNAL_MICROKERNEL_HDRS = [ |
| 617 | "src/xnnpack/argmaxpool.h", |
| 618 | "src/xnnpack/avgpool.h", |
Marat Dukhan | 35dacfb | 2019-11-07 19:18:16 -0800 | [diff] [blame] | 619 | "src/xnnpack/bilinear.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 620 | "src/xnnpack/clamp.h", |
| 621 | "src/xnnpack/common.h", |
| 622 | "src/xnnpack/conv.h", |
| 623 | "src/xnnpack/dwconv.h", |
| 624 | "src/xnnpack/gavgpool.h", |
| 625 | "src/xnnpack/gemm.h", |
| 626 | "src/xnnpack/hswish.h", |
| 627 | "src/xnnpack/igemm.h", |
| 628 | "src/xnnpack/lut.h", |
| 629 | "src/xnnpack/math.h", |
| 630 | "src/xnnpack/maxpool.h", |
| 631 | "src/xnnpack/packx.h", |
| 632 | "src/xnnpack/pad.h", |
| 633 | "src/xnnpack/params.h", |
| 634 | "src/xnnpack/pavgpool.h", |
| 635 | "src/xnnpack/ppmm.h", |
| 636 | "src/xnnpack/prelu.h", |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 637 | "src/xnnpack/raddexpminusmax.h", |
Marat Dukhan | 6f8d4d3 | 2019-10-25 17:07:09 -0700 | [diff] [blame] | 638 | "src/xnnpack/raddextexp.h", |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 639 | "src/xnnpack/raddstoreexpminusmax.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 640 | "src/xnnpack/rmax.h", |
| 641 | "src/xnnpack/scalar-utils.h", |
| 642 | "src/xnnpack/spmm.h", |
| 643 | "src/xnnpack/unpool.h", |
| 644 | "src/xnnpack/vadd.h", |
Marat Dukhan | c07cb7f | 2019-11-14 15:32:05 -0800 | [diff] [blame] | 645 | "src/xnnpack/vbinop.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 646 | "src/xnnpack/vmulcaddc.h", |
Marat Dukhan | 05ac8e3 | 2019-10-21 15:39:33 -0700 | [diff] [blame] | 647 | "src/xnnpack/vscale.h", |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 648 | "src/xnnpack/vscaleexpminusmax.h", |
Marat Dukhan | 6f8d4d3 | 2019-10-25 17:07:09 -0700 | [diff] [blame] | 649 | "src/xnnpack/vscaleextexp.h", |
Marat Dukhan | 346a9e5 | 2019-11-15 09:06:30 -0800 | [diff] [blame] | 650 | "src/xnnpack/vunop.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 651 | "src/xnnpack/zip.h", |
| 652 | ] |
| 653 | |
| 654 | INTERNAL_HDRS = INTERNAL_MICROKERNEL_HDRS + [ |
| 655 | "include/xnnpack.h", |
| 656 | "src/xnnpack/allocator.h", |
| 657 | "src/xnnpack/compute.h", |
| 658 | "src/xnnpack/im2col.h", |
| 659 | "src/xnnpack/indirection.h", |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 660 | "src/xnnpack/math-stubs.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 661 | "src/xnnpack/operator.h", |
| 662 | "src/xnnpack/pack.h", |
Marat Dukhan | eeaa7bd | 2019-10-25 17:31:25 -0700 | [diff] [blame] | 663 | "src/xnnpack/params-init.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 664 | "src/xnnpack/requantization-stubs.h", |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 665 | "src/xnnpack/requantization.h", |
| 666 | ] |
| 667 | |
| 668 | ACCURACY_EVAL_HDRS = INTERNAL_MICROKERNEL_HDRS + [ |
| 669 | "src/xnnpack/math-stubs.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 670 | ] |
| 671 | |
| 672 | MICROKERNEL_BENCHMARK_HDRS = INTERNAL_MICROKERNEL_HDRS + [ |
Marat Dukhan | eeaa7bd | 2019-10-25 17:31:25 -0700 | [diff] [blame] | 673 | "src/xnnpack/params-init.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 674 | "include/xnnpack.h", |
| 675 | ] |
| 676 | |
| 677 | MICROKERNEL_TEST_HDRS = INTERNAL_MICROKERNEL_HDRS + [ |
| 678 | "src/xnnpack/isa-checks.h", |
Marat Dukhan | eeaa7bd | 2019-10-25 17:31:25 -0700 | [diff] [blame] | 679 | "src/xnnpack/params-init.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 680 | "src/xnnpack/requantization.h", |
| 681 | "include/xnnpack.h", |
| 682 | ] |
| 683 | |
| 684 | OPERATOR_TEST_PARAMS_HDRS = [ |
| 685 | "src/xnnpack/params.h", |
| 686 | "src/xnnpack/common.h", |
| 687 | ] |
| 688 | |
| 689 | WEIGHTS_PACK_HDRS = [ |
| 690 | "src/xnnpack/pack.h", |
| 691 | "src/xnnpack/operator.h", |
| 692 | "src/xnnpack/compute.h", |
| 693 | ] |
| 694 | |
Marat Dukhan | c8e00eb | 2019-10-04 14:55:26 -0700 | [diff] [blame] | 695 | LOGGING_COPTS = select({ |
| 696 | # No logging in optimized mode |
| 697 | ":optimized_build": ["-DXNN_LOG_LEVEL=0"], |
| 698 | # Full logging in debug mode |
| 699 | ":debug_build": ["-DXNN_LOG_LEVEL=5"], |
| 700 | # Error-only logging in default (fastbuild) mode |
| 701 | "//conditions:default": ["-DXNN_LOG_LEVEL=2"], |
| 702 | }) |
| 703 | |
| 704 | LOGGING_HDRS = [ |
| 705 | "src/xnnpack/log.h", |
| 706 | ] |
| 707 | |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 708 | xnnpack_cc_library( |
| 709 | name = "scalar_ukernels", |
| 710 | srcs = SCALAR_UKERNELS, |
| 711 | hdrs = INTERNAL_HDRS, |
| 712 | aarch32_copts = ["-marm"], |
| 713 | copts = xnnpack_std_copts(), |
| 714 | deps = [ |
| 715 | "@FP16", |
| 716 | "@FXdiv", |
| 717 | ], |
| 718 | ) |
| 719 | |
| 720 | xnnpack_cc_library( |
| 721 | name = "psimd_ukernels", |
| 722 | srcs = PSIMD_UKERNELS, |
| 723 | hdrs = INTERNAL_HDRS, |
| 724 | aarch32_copts = [ |
| 725 | "-marm", |
| 726 | "-mfpu=neon", |
| 727 | ], |
| 728 | copts = xnnpack_std_copts(), |
| 729 | optimized_copts = [ |
| 730 | "-O3", |
| 731 | "-ffast-math", |
| 732 | ], |
| 733 | deps = [ |
| 734 | "@FP16", |
| 735 | "@psimd", |
| 736 | ], |
| 737 | ) |
| 738 | |
| 739 | xnnpack_cc_library( |
| 740 | name = "neon_ukernels", |
| 741 | hdrs = INTERNAL_HDRS, |
| 742 | aarch32_copts = [ |
| 743 | "-marm", |
| 744 | "-mfpu=neon", |
| 745 | ], |
| 746 | aarch32_srcs = NEON_UKERNELS, |
| 747 | aarch64_srcs = NEON_UKERNELS, |
| 748 | copts = xnnpack_std_copts(), |
| 749 | deps = ["@FP16"], |
| 750 | ) |
| 751 | |
| 752 | xnnpack_cc_library( |
| 753 | name = "neonfma_ukernels", |
| 754 | hdrs = INTERNAL_HDRS, |
| 755 | aarch32_copts = [ |
| 756 | "-marm", |
| 757 | "-mfpu=neon-vfpv4", |
| 758 | ], |
| 759 | aarch32_srcs = NEONFMA_UKERNELS, |
| 760 | aarch64_srcs = NEONFMA_UKERNELS + AARCH64_NEONFMA_UKERNELS, |
| 761 | copts = xnnpack_std_copts(), |
| 762 | deps = ["@FP16"], |
| 763 | ) |
| 764 | |
| 765 | xnnpack_cc_library( |
| 766 | name = "neonfp16arith_ukernels", |
| 767 | hdrs = INTERNAL_HDRS, |
| 768 | aarch64_copts = ["-march=armv8.2-a+fp16"], |
| 769 | aarch64_srcs = AARCH64_NEONFP16ARITH_UKERNELS, |
| 770 | copts = xnnpack_std_copts(), |
| 771 | deps = ["@FP16"], |
| 772 | ) |
| 773 | |
| 774 | xnnpack_cc_library( |
| 775 | name = "sse2_ukernels", |
| 776 | hdrs = INTERNAL_HDRS, |
| 777 | copts = xnnpack_std_copts(), |
| 778 | x86_copts = ["-msse2"], |
| 779 | x86_srcs = SSE_UKERNELS + SSE2_UKERNELS, |
| 780 | deps = ["@FP16"], |
| 781 | ) |
| 782 | |
| 783 | xnnpack_cc_library( |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 784 | name = "sse41_ukernels", |
| 785 | hdrs = INTERNAL_HDRS, |
| 786 | copts = xnnpack_std_copts(), |
| 787 | x86_copts = ["-msse4.1"], |
| 788 | x86_srcs = SSE41_UKERNELS, |
| 789 | deps = ["@FP16"], |
| 790 | ) |
| 791 | |
| 792 | xnnpack_cc_library( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 793 | name = "avx_ukernels", |
| 794 | hdrs = INTERNAL_HDRS, |
| 795 | copts = xnnpack_std_copts(), |
| 796 | x86_copts = ["-mavx"], |
| 797 | x86_srcs = AVX_UKERNELS, |
| 798 | deps = ["@FP16"], |
| 799 | ) |
| 800 | |
| 801 | xnnpack_cc_library( |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 802 | name = "avx2_ukernels", |
| 803 | hdrs = INTERNAL_HDRS, |
| 804 | copts = xnnpack_std_copts(), |
| 805 | x86_copts = [ |
| 806 | "-mfma", |
| 807 | "-mavx2", |
| 808 | ], |
| 809 | x86_srcs = AVX2_UKERNELS, |
| 810 | deps = ["@FP16"], |
| 811 | ) |
| 812 | |
| 813 | xnnpack_cc_library( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 814 | name = "avx512f_ukernels", |
| 815 | hdrs = INTERNAL_HDRS, |
| 816 | copts = xnnpack_std_copts(), |
| 817 | x86_copts = ["-mavx512f"], |
| 818 | x86_srcs = AVX512F_UKERNELS, |
| 819 | deps = ["@FP16"], |
| 820 | ) |
| 821 | |
| 822 | xnnpack_cc_library( |
| 823 | name = "asm_ukernels", |
| 824 | hdrs = ["src/xnnpack/assembly.h"], |
| 825 | aarch32_srcs = AARCH32_ASM_UKERNELS, |
| 826 | aarch64_srcs = AARCH64_ASM_UKERNELS, |
| 827 | ) |
| 828 | |
| 829 | xnnpack_aggregate_library( |
| 830 | name = "ukernels", |
| 831 | aarch32_deps = [ |
| 832 | ":psimd_ukernels", |
| 833 | ":neon_ukernels", |
| 834 | ":neonfma_ukernels", |
| 835 | ":asm_ukernels", |
| 836 | ], |
| 837 | aarch64_deps = [ |
| 838 | ":psimd_ukernels", |
| 839 | ":neon_ukernels", |
| 840 | ":neonfma_ukernels", |
| 841 | ":neonfp16arith_ukernels", |
| 842 | ":asm_ukernels", |
| 843 | ], |
| 844 | generic_deps = [":scalar_ukernels"], |
| 845 | wasmsimd_deps = [ |
| 846 | ":psimd_ukernels", |
| 847 | ], |
| 848 | x86_deps = [ |
| 849 | ":psimd_ukernels", |
| 850 | ":sse2_ukernels", |
Marat Dukhan | 69c3f2c | 2019-11-06 12:30:01 -0800 | [diff] [blame] | 851 | ":sse41_ukernels", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 852 | ":avx_ukernels", |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 853 | ":avx2_ukernels", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 854 | ":avx512f_ukernels", |
| 855 | ], |
| 856 | ) |
| 857 | |
| 858 | xnnpack_cc_library( |
| 859 | name = "im2col", |
| 860 | srcs = ["src/im2col.c"], |
| 861 | hdrs = [ |
| 862 | "src/xnnpack/common.h", |
| 863 | "src/xnnpack/im2col.h", |
| 864 | ], |
| 865 | copts = xnnpack_std_copts(), |
| 866 | ) |
| 867 | |
| 868 | xnnpack_cc_library( |
| 869 | name = "indirection", |
| 870 | srcs = ["src/indirection.c"], |
| 871 | hdrs = INTERNAL_HDRS, |
| 872 | copts = xnnpack_std_copts(), |
| 873 | deps = [ |
| 874 | "@FP16", |
| 875 | "@FXdiv", |
| 876 | "@pthreadpool", |
| 877 | ], |
| 878 | ) |
| 879 | |
| 880 | xnnpack_cc_library( |
| 881 | name = "operator_run", |
| 882 | srcs = ["src/operator-run.c"], |
Marat Dukhan | c8e00eb | 2019-10-04 14:55:26 -0700 | [diff] [blame] | 883 | hdrs = INTERNAL_HDRS + LOGGING_HDRS, |
| 884 | copts = xnnpack_std_copts() + LOGGING_COPTS + [ |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 885 | # Wrappers for multi-pass microkernels use VLAs for temporary buffers. |
| 886 | "-Wno-vla", |
| 887 | ], |
| 888 | deps = [ |
| 889 | "@FP16", |
| 890 | "@FXdiv", |
| 891 | "@clog", |
| 892 | "@pthreadpool", |
| 893 | ], |
| 894 | ) |
| 895 | |
| 896 | cc_library( |
| 897 | name = "enable_assembly", |
| 898 | defines = select({ |
| 899 | ":xnn_enable_assembly_explicit_true": ["XNN_ENABLE_ASSEMBLY=1"], |
| 900 | ":xnn_enable_assembly_explicit_false": ["XNN_ENABLE_ASSEMBLY=0"], |
Frank Barchard | 810171d | 2019-10-10 10:34:51 -0700 | [diff] [blame] | 901 | "//conditions:default": ["XNN_ENABLE_ASSEMBLY=1"], |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 902 | }), |
| 903 | ) |
| 904 | |
Marat Dukhan | cf056b2 | 2019-10-07 10:26:29 -0700 | [diff] [blame] | 905 | xnnpack_cc_library( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 906 | name = "operators", |
| 907 | srcs = OPERATOR_SRCS + [ |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 908 | "src/operator-delete.c", |
Marat Dukhan | cf056b2 | 2019-10-07 10:26:29 -0700 | [diff] [blame] | 909 | ], |
| 910 | hdrs = INTERNAL_HDRS + LOGGING_HDRS, |
Marat Dukhan | c8e00eb | 2019-10-04 14:55:26 -0700 | [diff] [blame] | 911 | copts = xnnpack_std_copts() + LOGGING_COPTS + [ |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 912 | "-Isrc", |
| 913 | "-Iinclude", |
| 914 | ] + select({ |
| 915 | ":debug_build": [], |
| 916 | "//conditions:default": xnnpack_min_size_copts(), |
| 917 | }), |
Marat Dukhan | cf056b2 | 2019-10-07 10:26:29 -0700 | [diff] [blame] | 918 | wasm_srcs = ["src/wasm-stubs.c"], |
| 919 | wasmsimd_srcs = ["src/wasm-stubs.c"], |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 920 | deps = [ |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 921 | ":indirection", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 922 | "@FP16", |
| 923 | "@FXdiv", |
| 924 | "@clog", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 925 | "@pthreadpool", |
Marat Dukhan | 8fe54e4 | 2019-10-10 14:12:59 -0700 | [diff] [blame] | 926 | ], |
| 927 | ) |
| 928 | |
| 929 | cc_library( |
| 930 | name = "XNNPACK", |
| 931 | srcs = [ |
| 932 | "src/init.c", |
| 933 | ], |
| 934 | copts = xnnpack_std_copts() + LOGGING_COPTS + [ |
| 935 | "-Isrc", |
| 936 | "-Iinclude", |
| 937 | ] + select({ |
| 938 | ":debug_build": [], |
| 939 | "//conditions:default": xnnpack_min_size_copts(), |
| 940 | }), |
| 941 | includes = ["include"], |
| 942 | linkstatic = True, |
| 943 | textual_hdrs = ["include/xnnpack.h"], |
| 944 | visibility = xnnpack_visibility(), |
| 945 | deps = [ |
| 946 | ":enable_assembly", |
| 947 | ":ukernels", |
| 948 | ":operator_run", |
| 949 | ":operators", |
| 950 | "@clog", |
| 951 | "@pthreadpool", |
Marat Dukhan | d343c22 | 2019-10-07 09:22:14 -0700 | [diff] [blame] | 952 | ] + select({ |
| 953 | ":emscripten": [], |
| 954 | "//conditions:default": ["@cpuinfo"], |
| 955 | }), |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 956 | ) |
| 957 | |
| 958 | cc_library( |
Marat Dukhan | 8fe54e4 | 2019-10-10 14:12:59 -0700 | [diff] [blame] | 959 | name = "xnnpack_operators_nhwc_f32", |
| 960 | srcs = [ |
| 961 | "src/init.c", |
| 962 | ], |
| 963 | copts = xnnpack_std_copts() + LOGGING_COPTS + [ |
| 964 | "-Isrc", |
| 965 | "-Iinclude", |
| 966 | ] + select({ |
| 967 | ":debug_build": [], |
| 968 | "//conditions:default": xnnpack_min_size_copts(), |
| 969 | }), |
| 970 | defines = [ |
| 971 | "XNN_NO_Q8_OPERATORS", |
| 972 | "XNN_NO_U8_OPERATORS", |
| 973 | "XNN_NO_X8_OPERATORS", |
| 974 | "XNN_NO_SPNCHW_OPERATORS", |
| 975 | ], |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 976 | includes = ["include"], |
| 977 | linkstatic = True, |
Marat Dukhan | 8fe54e4 | 2019-10-10 14:12:59 -0700 | [diff] [blame] | 978 | textual_hdrs = ["include/xnnpack.h"], |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 979 | visibility = xnnpack_visibility(), |
| 980 | deps = [ |
Marat Dukhan | 8fe54e4 | 2019-10-10 14:12:59 -0700 | [diff] [blame] | 981 | ":enable_assembly", |
| 982 | ":ukernels", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 983 | ":operator_run", |
| 984 | ":operators", |
Marat Dukhan | 8fe54e4 | 2019-10-10 14:12:59 -0700 | [diff] [blame] | 985 | "@clog", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 986 | "@pthreadpool", |
Marat Dukhan | 8fe54e4 | 2019-10-10 14:12:59 -0700 | [diff] [blame] | 987 | ] + select({ |
| 988 | ":emscripten": [], |
| 989 | "//conditions:default": ["@cpuinfo"], |
| 990 | }), |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 991 | ) |
| 992 | |
Marat Dukhan | cf056b2 | 2019-10-07 10:26:29 -0700 | [diff] [blame] | 993 | xnnpack_cc_library( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 994 | name = "bench_utils", |
| 995 | srcs = ["bench/utils.cc"], |
| 996 | hdrs = ["bench/utils.h"], |
| 997 | copts = ["-Wno-unused-result"], |
Marat Dukhan | bad48fe | 2019-11-04 10:35:22 -0800 | [diff] [blame] | 998 | deps = [ |
| 999 | "@com_google_benchmark//:benchmark", |
| 1000 | "@cpuinfo", |
| 1001 | ], |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1002 | ) |
| 1003 | |
Frank Barchard | 7e95597 | 2019-10-11 10:34:25 -0700 | [diff] [blame] | 1004 | ######################### Benchmarks for micro-kernels ######################### |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1005 | |
| 1006 | xnnpack_benchmark( |
| 1007 | name = "q8_gemm_bench", |
| 1008 | srcs = [ |
| 1009 | "bench/gemm.h", |
| 1010 | "bench/q8-gemm.cc", |
| 1011 | "src/xnnpack/AlignedAllocator.h", |
| 1012 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_BENCHMARK_HDRS, |
| 1013 | copts = ["-Wno-unused-function"] + xnnpack_optional_ruy_copts() + xnnpack_optional_gemmlowp_copts(), |
| 1014 | deps = MICROKERNEL_BENCHMARK_DEPS + xnnpack_optional_ruy_deps() + xnnpack_optional_gemmlowp_deps(), |
| 1015 | ) |
| 1016 | |
| 1017 | xnnpack_benchmark( |
| 1018 | name = "f16_gemm_bench", |
| 1019 | srcs = [ |
| 1020 | "bench/f16-gemm.cc", |
| 1021 | "bench/gemm.h", |
| 1022 | "src/xnnpack/AlignedAllocator.h", |
| 1023 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_BENCHMARK_HDRS, |
| 1024 | copts = ["-Wno-unused-function"], |
| 1025 | deps = MICROKERNEL_BENCHMARK_DEPS, |
| 1026 | ) |
| 1027 | |
| 1028 | xnnpack_benchmark( |
| 1029 | name = "f32_igemm_bench", |
| 1030 | srcs = [ |
| 1031 | "bench/f32-igemm.cc", |
| 1032 | "bench/conv.h", |
| 1033 | "src/xnnpack/AlignedAllocator.h", |
| 1034 | ] + MICROKERNEL_BENCHMARK_HDRS, |
Frank Barchard | 7e95597 | 2019-10-11 10:34:25 -0700 | [diff] [blame] | 1035 | deps = MICROKERNEL_BENCHMARK_DEPS + [":indirection"], |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1036 | ) |
| 1037 | |
| 1038 | xnnpack_benchmark( |
| 1039 | name = "f32_conv_hwc_bench", |
| 1040 | srcs = [ |
| 1041 | "bench/f32-conv-hwc.cc", |
| 1042 | "bench/dconv.h", |
| 1043 | "src/xnnpack/AlignedAllocator.h", |
| 1044 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_BENCHMARK_HDRS, |
| 1045 | copts = ["-Wno-unused-function"], |
| 1046 | deps = MICROKERNEL_BENCHMARK_DEPS, |
| 1047 | ) |
| 1048 | |
| 1049 | xnnpack_benchmark( |
Erich Elsen | 563df5f | 2019-10-23 08:02:21 -0700 | [diff] [blame] | 1050 | name = "f32_conv_hwc2spchw_bench", |
| 1051 | srcs = [ |
| 1052 | "bench/f32-conv-hwc2spchw.cc", |
| 1053 | "bench/dconv.h", |
| 1054 | "src/xnnpack/AlignedAllocator.h", |
| 1055 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_BENCHMARK_HDRS, |
| 1056 | copts = ["-Wno-unused-function"], |
| 1057 | deps = MICROKERNEL_BENCHMARK_DEPS, |
| 1058 | ) |
| 1059 | |
| 1060 | xnnpack_benchmark( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1061 | name = "f32_dwconv_bench", |
| 1062 | srcs = [ |
| 1063 | "bench/f32-dwconv.cc", |
| 1064 | "bench/dwconv.h", |
| 1065 | "src/xnnpack/AlignedAllocator.h", |
| 1066 | ] + MICROKERNEL_BENCHMARK_HDRS, |
| 1067 | deps = MICROKERNEL_BENCHMARK_DEPS + [":indirection"], |
| 1068 | ) |
| 1069 | |
| 1070 | xnnpack_benchmark( |
| 1071 | name = "f32_dwconv_spchw_bench", |
| 1072 | srcs = [ |
| 1073 | "bench/f32-dwconv-spchw.cc", |
| 1074 | "bench/dwconv.h", |
| 1075 | "src/xnnpack/AlignedAllocator.h", |
| 1076 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_BENCHMARK_HDRS, |
| 1077 | deps = MICROKERNEL_BENCHMARK_DEPS + [":indirection"], |
| 1078 | ) |
| 1079 | |
| 1080 | xnnpack_benchmark( |
| 1081 | name = "f32_gemm_bench", |
| 1082 | srcs = [ |
| 1083 | "bench/f32-gemm.cc", |
| 1084 | "bench/gemm.h", |
| 1085 | "src/xnnpack/AlignedAllocator.h", |
| 1086 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_BENCHMARK_HDRS, |
| 1087 | copts = ["-Wno-unused-function"] + xnnpack_optional_ruy_copts(), |
Frank Barchard | 7e95597 | 2019-10-11 10:34:25 -0700 | [diff] [blame] | 1088 | deps = MICROKERNEL_BENCHMARK_DEPS + xnnpack_optional_ruy_deps(), |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1089 | ) |
| 1090 | |
| 1091 | xnnpack_benchmark( |
| 1092 | name = "f32_rmax_bench", |
| 1093 | srcs = [ |
| 1094 | "bench/f32-rmax.cc", |
| 1095 | "src/xnnpack/AlignedAllocator.h", |
| 1096 | ] + MICROKERNEL_BENCHMARK_HDRS, |
| 1097 | deps = MICROKERNEL_BENCHMARK_DEPS, |
| 1098 | ) |
| 1099 | |
| 1100 | xnnpack_benchmark( |
| 1101 | name = "f32_spmm_bench", |
| 1102 | srcs = [ |
| 1103 | "bench/f32-spmm.cc", |
| 1104 | "bench/gemm.h", |
| 1105 | "src/xnnpack/AlignedAllocator.h", |
| 1106 | ] + MICROKERNEL_BENCHMARK_HDRS, |
| 1107 | copts = ["-Wno-unused-function"], |
| 1108 | deps = MICROKERNEL_BENCHMARK_DEPS, |
| 1109 | ) |
| 1110 | |
| 1111 | xnnpack_benchmark( |
Marat Dukhan | 4a4a7fa | 2019-10-21 13:46:14 -0700 | [diff] [blame] | 1112 | name = "f32_softargmax_bench", |
| 1113 | srcs = [ |
| 1114 | "bench/f32-softargmax.cc", |
| 1115 | ] + MICROKERNEL_BENCHMARK_HDRS, |
| 1116 | copts = ["-Wno-unused-function"], |
| 1117 | deps = MICROKERNEL_BENCHMARK_DEPS, |
| 1118 | ) |
| 1119 | |
| 1120 | xnnpack_benchmark( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1121 | name = "f32_im2col_gemm_bench", |
| 1122 | srcs = [ |
| 1123 | "bench/f32-im2col-gemm.cc", |
| 1124 | "bench/conv.h", |
| 1125 | "src/xnnpack/AlignedAllocator.h", |
| 1126 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_BENCHMARK_HDRS, |
| 1127 | deps = MICROKERNEL_BENCHMARK_DEPS + [":im2col"], |
| 1128 | ) |
| 1129 | |
| 1130 | ########################### Benchmarks for operators ########################### |
| 1131 | |
| 1132 | xnnpack_benchmark( |
| 1133 | name = "add_bench", |
| 1134 | srcs = ["bench/add.cc"], |
| 1135 | deps = OPERATOR_BENCHMARK_DEPS, |
| 1136 | ) |
| 1137 | |
| 1138 | xnnpack_benchmark( |
| 1139 | name = "average_pooling_bench", |
| 1140 | srcs = ["bench/average-pooling.cc"], |
| 1141 | deps = OPERATOR_BENCHMARK_DEPS, |
| 1142 | ) |
| 1143 | |
| 1144 | xnnpack_benchmark( |
| 1145 | name = "channel_shuffle_bench", |
| 1146 | srcs = ["bench/channel-shuffle.cc"], |
| 1147 | deps = OPERATOR_BENCHMARK_DEPS, |
| 1148 | ) |
| 1149 | |
| 1150 | xnnpack_benchmark( |
| 1151 | name = "convolution_bench", |
| 1152 | srcs = ["bench/convolution.cc"], |
| 1153 | copts = xnnpack_optional_tflite_copts() + xnnpack_optional_armcl_copts(), |
| 1154 | deps = OPERATOR_BENCHMARK_DEPS + xnnpack_optional_tflite_deps() + xnnpack_optional_armcl_deps(), |
| 1155 | ) |
| 1156 | |
| 1157 | xnnpack_benchmark( |
| 1158 | name = "deconvolution_bench", |
| 1159 | srcs = ["bench/deconvolution.cc"], |
| 1160 | copts = xnnpack_optional_tflite_copts(), |
| 1161 | deps = OPERATOR_BENCHMARK_DEPS + xnnpack_optional_tflite_deps(), |
| 1162 | ) |
| 1163 | |
| 1164 | xnnpack_benchmark( |
| 1165 | name = "global_average_pooling_bench", |
| 1166 | srcs = ["bench/global-average-pooling.cc"], |
| 1167 | deps = OPERATOR_BENCHMARK_DEPS, |
| 1168 | ) |
| 1169 | |
| 1170 | xnnpack_benchmark( |
| 1171 | name = "max_pooling_bench", |
| 1172 | srcs = ["bench/max-pooling.cc"], |
| 1173 | deps = OPERATOR_BENCHMARK_DEPS, |
| 1174 | ) |
| 1175 | |
| 1176 | xnnpack_benchmark( |
| 1177 | name = "sigmoid_bench", |
| 1178 | srcs = ["bench/sigmoid.cc"], |
Marat Dukhan | c3b9e86 | 2019-11-17 13:18:54 -0800 | [diff] [blame^] | 1179 | copts = xnnpack_optional_tflite_copts(), |
| 1180 | deps = OPERATOR_BENCHMARK_DEPS + xnnpack_optional_tflite_deps(), |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1181 | ) |
| 1182 | |
| 1183 | xnnpack_benchmark( |
Marat Dukhan | 95b2243 | 2019-10-30 16:30:14 -0700 | [diff] [blame] | 1184 | name = "prelu_bench", |
| 1185 | srcs = ["bench/prelu.cc"], |
| 1186 | copts = xnnpack_optional_tflite_copts(), |
| 1187 | deps = OPERATOR_BENCHMARK_DEPS + xnnpack_optional_tflite_deps(), |
| 1188 | ) |
| 1189 | |
| 1190 | xnnpack_benchmark( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1191 | name = "softargmax_bench", |
| 1192 | srcs = ["bench/softargmax.cc"], |
| 1193 | deps = OPERATOR_BENCHMARK_DEPS, |
| 1194 | ) |
| 1195 | |
Marat Dukhan | c068bb6 | 2019-10-04 13:24:39 -0700 | [diff] [blame] | 1196 | ############################# End-to-end benchmarks ############################ |
| 1197 | |
| 1198 | cc_library( |
| 1199 | name = "mobilenet_v1", |
| 1200 | srcs = ["models/mobilenet-v1.cc"], |
| 1201 | hdrs = ["models/models.h"], |
| 1202 | linkstatic = True, |
| 1203 | deps = [ |
| 1204 | ":XNNPACK", |
| 1205 | "@pthreadpool", |
| 1206 | ], |
| 1207 | ) |
| 1208 | |
| 1209 | cc_library( |
| 1210 | name = "mobilenet_v2", |
| 1211 | srcs = ["models/mobilenet-v2.cc"], |
| 1212 | hdrs = ["models/models.h"], |
| 1213 | linkstatic = True, |
| 1214 | deps = [ |
| 1215 | ":XNNPACK", |
| 1216 | "@pthreadpool", |
| 1217 | ], |
| 1218 | ) |
| 1219 | |
| 1220 | xnnpack_benchmark( |
Marat Dukhan | ef4416e | 2019-10-31 13:44:40 -0700 | [diff] [blame] | 1221 | name = "f32_dwconv_e2e_bench", |
| 1222 | srcs = ["bench/f32-dwconv-e2e.cc"] + MICROKERNEL_BENCHMARK_HDRS, |
| 1223 | copts = ["-Wno-unused-function"], |
| 1224 | deps = MICROKERNEL_BENCHMARK_DEPS + [ |
| 1225 | ":XNNPACK", |
| 1226 | ":mobilenet_v1", |
| 1227 | ":mobilenet_v2", |
| 1228 | ], |
| 1229 | ) |
| 1230 | |
| 1231 | xnnpack_benchmark( |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 1232 | name = "f32_gemm_e2e_bench", |
| 1233 | srcs = ["bench/f32-gemm-e2e.cc"] + MICROKERNEL_BENCHMARK_HDRS, |
| 1234 | copts = ["-Wno-unused-function"], |
| 1235 | deps = MICROKERNEL_BENCHMARK_DEPS + [ |
| 1236 | ":XNNPACK", |
| 1237 | ":mobilenet_v1", |
| 1238 | ":mobilenet_v2", |
| 1239 | ], |
| 1240 | ) |
| 1241 | |
| 1242 | xnnpack_benchmark( |
Marat Dukhan | c068bb6 | 2019-10-04 13:24:39 -0700 | [diff] [blame] | 1243 | name = "end2end_bench", |
| 1244 | srcs = ["bench/end2end.cc"], |
| 1245 | deps = [ |
| 1246 | ":XNNPACK", |
Frank Barchard | c712fa4 | 2019-10-31 14:00:21 -0700 | [diff] [blame] | 1247 | ":bench_utils", |
Marat Dukhan | c068bb6 | 2019-10-04 13:24:39 -0700 | [diff] [blame] | 1248 | ":mobilenet_v1", |
| 1249 | ":mobilenet_v2", |
| 1250 | "@pthreadpool", |
| 1251 | ], |
| 1252 | ) |
| 1253 | |
Marat Dukhan | 6adff4e | 2019-10-14 18:32:07 -0700 | [diff] [blame] | 1254 | #################### Accuracy evaluation for math functions #################### |
| 1255 | |
| 1256 | xnnpack_benchmark( |
| 1257 | name = "f32_exp_eval", |
| 1258 | srcs = [ |
| 1259 | "eval/f32-exp.cc", |
| 1260 | "src/xnnpack/AlignedAllocator.h", |
| 1261 | ] + ACCURACY_EVAL_HDRS, |
| 1262 | deps = ACCURACY_EVAL_DEPS, |
| 1263 | ) |
| 1264 | |
Marat Dukhan | 515c977 | 2019-10-17 18:07:57 -0700 | [diff] [blame] | 1265 | xnnpack_benchmark( |
| 1266 | name = "f32_expminus_eval", |
| 1267 | srcs = [ |
| 1268 | "eval/f32-expminus.cc", |
| 1269 | "src/xnnpack/AlignedAllocator.h", |
| 1270 | ] + ACCURACY_EVAL_HDRS, |
| 1271 | deps = ACCURACY_EVAL_DEPS, |
| 1272 | ) |
| 1273 | |
Marat Dukhan | 98ba441 | 2019-10-23 02:14:28 -0700 | [diff] [blame] | 1274 | xnnpack_benchmark( |
| 1275 | name = "f32_extexp_eval", |
| 1276 | srcs = [ |
| 1277 | "eval/f32-extexp.cc", |
| 1278 | "src/xnnpack/AlignedAllocator.h", |
| 1279 | ] + ACCURACY_EVAL_HDRS, |
| 1280 | deps = ACCURACY_EVAL_DEPS, |
| 1281 | ) |
| 1282 | |
Marat Dukhan | 346a9e5 | 2019-11-15 09:06:30 -0800 | [diff] [blame] | 1283 | xnnpack_benchmark( |
| 1284 | name = "f32_sigmoid_eval", |
| 1285 | srcs = [ |
| 1286 | "eval/f32-sigmoid.cc", |
| 1287 | "src/xnnpack/AlignedAllocator.h", |
| 1288 | ] + ACCURACY_EVAL_HDRS, |
| 1289 | deps = ACCURACY_EVAL_DEPS, |
| 1290 | ) |
| 1291 | |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1292 | ######################### Unit tests for micro-kernels ######################### |
| 1293 | |
| 1294 | xnnpack_unit_test( |
| 1295 | name = "f16_gemm_test", |
| 1296 | srcs = [ |
| 1297 | "test/f16-gemm.cc", |
| 1298 | "test/gemm-microkernel-tester.h", |
| 1299 | "src/xnnpack/AlignedAllocator.h", |
| 1300 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1301 | deps = MICROKERNEL_TEST_DEPS, |
| 1302 | ) |
| 1303 | |
| 1304 | xnnpack_unit_test( |
| 1305 | name = "f32_argmaxpool_test", |
| 1306 | srcs = [ |
| 1307 | "test/f32-argmaxpool.cc", |
| 1308 | "test/argmaxpool-microkernel-tester.h", |
| 1309 | "src/xnnpack/AlignedAllocator.h", |
| 1310 | ] + MICROKERNEL_TEST_HDRS, |
| 1311 | deps = MICROKERNEL_TEST_DEPS, |
| 1312 | ) |
| 1313 | |
| 1314 | xnnpack_unit_test( |
| 1315 | name = "f32_avgpool_test", |
| 1316 | srcs = [ |
| 1317 | "test/f32-avgpool.cc", |
| 1318 | "test/avgpool-microkernel-tester.h", |
| 1319 | "src/xnnpack/AlignedAllocator.h", |
| 1320 | ] + MICROKERNEL_TEST_HDRS, |
| 1321 | deps = MICROKERNEL_TEST_DEPS, |
| 1322 | ) |
| 1323 | |
| 1324 | xnnpack_unit_test( |
Marat Dukhan | 35dacfb | 2019-11-07 19:18:16 -0800 | [diff] [blame] | 1325 | name = "f32_bilinear_test", |
| 1326 | srcs = [ |
| 1327 | "test/f32-bilinear.cc", |
| 1328 | "test/bilinear-microkernel-tester.h", |
| 1329 | "src/xnnpack/AlignedAllocator.h", |
| 1330 | ] + MICROKERNEL_TEST_HDRS, |
| 1331 | deps = MICROKERNEL_TEST_DEPS, |
| 1332 | ) |
| 1333 | |
| 1334 | xnnpack_unit_test( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1335 | name = "f32_clamp_test", |
| 1336 | srcs = [ |
| 1337 | "test/f32-clamp.cc", |
| 1338 | "test/clamp-microkernel-tester.h", |
| 1339 | ] + MICROKERNEL_TEST_HDRS, |
| 1340 | deps = MICROKERNEL_TEST_DEPS, |
| 1341 | ) |
| 1342 | |
| 1343 | xnnpack_unit_test( |
| 1344 | name = "f32_igemm_test", |
| 1345 | srcs = [ |
| 1346 | "test/f32-igemm.cc", |
| 1347 | "test/gemm-microkernel-tester.h", |
| 1348 | "src/xnnpack/AlignedAllocator.h", |
| 1349 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1350 | deps = MICROKERNEL_TEST_DEPS, |
| 1351 | ) |
| 1352 | |
| 1353 | xnnpack_unit_test( |
| 1354 | name = "f32_conv_hwc_test", |
| 1355 | srcs = [ |
| 1356 | "test/f32-conv-hwc.cc", |
| 1357 | "test/conv-hwc-microkernel-tester.h", |
| 1358 | "src/xnnpack/AlignedAllocator.h", |
| 1359 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1360 | deps = MICROKERNEL_TEST_DEPS, |
| 1361 | ) |
| 1362 | |
| 1363 | xnnpack_unit_test( |
| 1364 | name = "f32_conv_hwc2spchw_test", |
| 1365 | srcs = [ |
| 1366 | "test/f32-conv-hwc2spchw.cc", |
| 1367 | "test/conv-hwc2spchw-microkernel-tester.h", |
| 1368 | "src/xnnpack/AlignedAllocator.h", |
| 1369 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1370 | deps = MICROKERNEL_TEST_DEPS, |
| 1371 | ) |
| 1372 | |
| 1373 | xnnpack_unit_test( |
| 1374 | name = "f32_dwconv_test", |
| 1375 | srcs = [ |
| 1376 | "test/f32-dwconv.cc", |
| 1377 | "test/dwconv-microkernel-tester.h", |
| 1378 | "src/xnnpack/AlignedAllocator.h", |
| 1379 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1380 | deps = MICROKERNEL_TEST_DEPS, |
| 1381 | ) |
| 1382 | |
| 1383 | xnnpack_unit_test( |
| 1384 | name = "f32_dwconv_spchw_test", |
| 1385 | srcs = [ |
| 1386 | "test/f32-dwconv-spchw.cc", |
| 1387 | "test/dwconv-spchw-microkernel-tester.h", |
| 1388 | "src/xnnpack/AlignedAllocator.h", |
| 1389 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1390 | deps = MICROKERNEL_TEST_DEPS, |
| 1391 | ) |
| 1392 | |
| 1393 | xnnpack_unit_test( |
| 1394 | name = "f32_gavgpool_test", |
| 1395 | srcs = [ |
| 1396 | "test/f32-gavgpool.cc", |
| 1397 | "test/gavgpool-microkernel-tester.h", |
| 1398 | "src/xnnpack/AlignedAllocator.h", |
| 1399 | ] + MICROKERNEL_TEST_HDRS, |
| 1400 | deps = MICROKERNEL_TEST_DEPS, |
| 1401 | ) |
| 1402 | |
| 1403 | xnnpack_unit_test( |
| 1404 | name = "f32_gavgpool_spchw_test", |
| 1405 | srcs = [ |
| 1406 | "test/f32-gavgpool-spchw.cc", |
| 1407 | "test/gavgpool-spchw-microkernel-tester.h", |
| 1408 | "src/xnnpack/AlignedAllocator.h", |
| 1409 | ] + MICROKERNEL_TEST_HDRS, |
| 1410 | deps = MICROKERNEL_TEST_DEPS, |
| 1411 | ) |
| 1412 | |
| 1413 | xnnpack_unit_test( |
| 1414 | name = "f32_gemm_test", |
| 1415 | srcs = [ |
| 1416 | "test/f32-gemm.cc", |
| 1417 | "test/gemm-microkernel-tester.h", |
| 1418 | "src/xnnpack/AlignedAllocator.h", |
| 1419 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1420 | deps = MICROKERNEL_TEST_DEPS, |
| 1421 | ) |
| 1422 | |
| 1423 | xnnpack_unit_test( |
| 1424 | name = "f32_gemminc_test", |
| 1425 | srcs = [ |
| 1426 | "test/f32-gemminc.cc", |
| 1427 | "test/gemm-microkernel-tester.h", |
| 1428 | "src/xnnpack/AlignedAllocator.h", |
| 1429 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1430 | deps = MICROKERNEL_TEST_DEPS, |
| 1431 | ) |
| 1432 | |
| 1433 | xnnpack_unit_test( |
| 1434 | name = "f32_hswish_test", |
| 1435 | srcs = [ |
| 1436 | "test/f32-hswish.cc", |
| 1437 | "test/hswish-microkernel-tester.h", |
| 1438 | ] + MICROKERNEL_TEST_HDRS, |
| 1439 | deps = MICROKERNEL_TEST_DEPS, |
| 1440 | ) |
| 1441 | |
| 1442 | xnnpack_unit_test( |
| 1443 | name = "f32_maxpool_test", |
| 1444 | srcs = [ |
| 1445 | "test/f32-maxpool.cc", |
| 1446 | "test/maxpool-microkernel-tester.h", |
| 1447 | ] + MICROKERNEL_TEST_HDRS, |
| 1448 | deps = MICROKERNEL_TEST_DEPS, |
| 1449 | ) |
| 1450 | |
| 1451 | xnnpack_unit_test( |
| 1452 | name = "f32_pavgpool_test", |
| 1453 | srcs = [ |
| 1454 | "test/f32-pavgpool.cc", |
| 1455 | "test/avgpool-microkernel-tester.h", |
| 1456 | "src/xnnpack/AlignedAllocator.h", |
| 1457 | ] + MICROKERNEL_TEST_HDRS, |
| 1458 | deps = MICROKERNEL_TEST_DEPS, |
| 1459 | ) |
| 1460 | |
| 1461 | xnnpack_unit_test( |
| 1462 | name = "f32_ppmm_test", |
| 1463 | srcs = [ |
| 1464 | "test/f32-ppmm.cc", |
| 1465 | "test/gemm-microkernel-tester.h", |
| 1466 | "src/xnnpack/AlignedAllocator.h", |
| 1467 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1468 | deps = MICROKERNEL_TEST_DEPS, |
| 1469 | ) |
| 1470 | |
| 1471 | xnnpack_unit_test( |
| 1472 | name = "f32_prelu_test", |
| 1473 | srcs = [ |
| 1474 | "test/f32-prelu.cc", |
| 1475 | "test/prelu-microkernel-tester.h", |
| 1476 | "src/xnnpack/AlignedAllocator.h", |
| 1477 | ] + MICROKERNEL_TEST_HDRS, |
| 1478 | deps = MICROKERNEL_TEST_DEPS, |
| 1479 | ) |
| 1480 | |
| 1481 | xnnpack_unit_test( |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 1482 | name = "f32_raddexpminusmax_test", |
| 1483 | srcs = [ |
| 1484 | "test/f32-raddexpminusmax.cc", |
| 1485 | "test/raddexpminusmax-microkernel-tester.h", |
| 1486 | ] + MICROKERNEL_TEST_HDRS, |
| 1487 | deps = MICROKERNEL_TEST_DEPS, |
| 1488 | ) |
| 1489 | |
| 1490 | xnnpack_unit_test( |
Marat Dukhan | 6f8d4d3 | 2019-10-25 17:07:09 -0700 | [diff] [blame] | 1491 | name = "f32_raddextexp_test", |
| 1492 | srcs = [ |
| 1493 | "test/f32-raddextexp.cc", |
| 1494 | "test/raddextexp-microkernel-tester.h", |
| 1495 | ] + MICROKERNEL_TEST_HDRS, |
| 1496 | deps = MICROKERNEL_TEST_DEPS, |
| 1497 | ) |
| 1498 | |
| 1499 | xnnpack_unit_test( |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 1500 | name = "f32_raddstoreexpminusmax_test", |
| 1501 | srcs = [ |
| 1502 | "test/f32-raddstoreexpminusmax.cc", |
| 1503 | "test/raddstoreexpminusmax-microkernel-tester.h", |
| 1504 | ] + MICROKERNEL_TEST_HDRS, |
| 1505 | deps = MICROKERNEL_TEST_DEPS, |
| 1506 | ) |
| 1507 | |
| 1508 | xnnpack_unit_test( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1509 | name = "f32_rmax_test", |
| 1510 | srcs = [ |
| 1511 | "test/f32-rmax.cc", |
| 1512 | "test/rmax-microkernel-tester.h", |
| 1513 | ] + MICROKERNEL_TEST_HDRS, |
| 1514 | deps = MICROKERNEL_TEST_DEPS, |
| 1515 | ) |
| 1516 | |
| 1517 | xnnpack_unit_test( |
Marat Dukhan | 346a9e5 | 2019-11-15 09:06:30 -0800 | [diff] [blame] | 1518 | name = "f32_sigmoid_test", |
| 1519 | srcs = [ |
| 1520 | "test/f32-sigmoid.cc", |
| 1521 | "test/vunop-microkernel-tester.h", |
| 1522 | ] + MICROKERNEL_TEST_HDRS, |
| 1523 | deps = MICROKERNEL_TEST_DEPS, |
| 1524 | ) |
| 1525 | |
| 1526 | xnnpack_unit_test( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1527 | name = "f32_spmm_test", |
| 1528 | srcs = [ |
| 1529 | "test/f32-spmm.cc", |
| 1530 | "test/spmm-microkernel-tester.h", |
| 1531 | "src/xnnpack/AlignedAllocator.h", |
| 1532 | ] + MICROKERNEL_TEST_HDRS, |
| 1533 | deps = MICROKERNEL_TEST_DEPS, |
| 1534 | ) |
| 1535 | |
| 1536 | xnnpack_unit_test( |
| 1537 | name = "f32_vadd_test", |
| 1538 | srcs = [ |
| 1539 | "test/f32-vadd.cc", |
Marat Dukhan | c07cb7f | 2019-11-14 15:32:05 -0800 | [diff] [blame] | 1540 | "test/vbinop-microkernel-tester.h", |
| 1541 | ] + MICROKERNEL_TEST_HDRS, |
| 1542 | deps = MICROKERNEL_TEST_DEPS, |
| 1543 | ) |
| 1544 | |
| 1545 | xnnpack_unit_test( |
| 1546 | name = "f32_vaddc_test", |
| 1547 | srcs = [ |
| 1548 | "test/f32-vaddc.cc", |
| 1549 | "test/vbinopc-microkernel-tester.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1550 | ] + MICROKERNEL_TEST_HDRS, |
| 1551 | deps = MICROKERNEL_TEST_DEPS, |
| 1552 | ) |
| 1553 | |
| 1554 | xnnpack_unit_test( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1555 | name = "f32_vmul_test", |
| 1556 | srcs = [ |
| 1557 | "test/f32-vmul.cc", |
Marat Dukhan | c07cb7f | 2019-11-14 15:32:05 -0800 | [diff] [blame] | 1558 | "test/vbinop-microkernel-tester.h", |
| 1559 | ] + MICROKERNEL_TEST_HDRS, |
| 1560 | deps = MICROKERNEL_TEST_DEPS, |
| 1561 | ) |
| 1562 | |
| 1563 | xnnpack_unit_test( |
| 1564 | name = "f32_vmulc_test", |
| 1565 | srcs = [ |
| 1566 | "test/f32-vmulc.cc", |
| 1567 | "test/vbinopc-microkernel-tester.h", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1568 | ] + MICROKERNEL_TEST_HDRS, |
| 1569 | deps = MICROKERNEL_TEST_DEPS, |
| 1570 | ) |
| 1571 | |
| 1572 | xnnpack_unit_test( |
| 1573 | name = "f32_vmulcaddc_test", |
| 1574 | srcs = [ |
| 1575 | "test/f32-vmulcaddc.cc", |
| 1576 | "test/vmulcaddc-microkernel-tester.h", |
| 1577 | "src/xnnpack/AlignedAllocator.h", |
| 1578 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1579 | deps = MICROKERNEL_TEST_DEPS, |
| 1580 | ) |
| 1581 | |
| 1582 | xnnpack_unit_test( |
Marat Dukhan | 05ac8e3 | 2019-10-21 15:39:33 -0700 | [diff] [blame] | 1583 | name = "f32_vscale_test", |
| 1584 | srcs = [ |
| 1585 | "test/f32-vscale.cc", |
| 1586 | "test/vscale-microkernel-tester.h", |
| 1587 | ] + MICROKERNEL_TEST_HDRS, |
| 1588 | deps = MICROKERNEL_TEST_DEPS, |
| 1589 | ) |
| 1590 | |
| 1591 | xnnpack_unit_test( |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 1592 | name = "f32_vscaleexpminusmax_test", |
| 1593 | srcs = [ |
| 1594 | "test/f32-vscaleexpminusmax.cc", |
| 1595 | "test/vscaleexpminusmax-microkernel-tester.h", |
| 1596 | ] + MICROKERNEL_TEST_HDRS, |
| 1597 | deps = MICROKERNEL_TEST_DEPS, |
| 1598 | ) |
| 1599 | |
| 1600 | xnnpack_unit_test( |
Marat Dukhan | 6f8d4d3 | 2019-10-25 17:07:09 -0700 | [diff] [blame] | 1601 | name = "f32_vscaleextexp_test", |
| 1602 | srcs = [ |
| 1603 | "test/f32-vscaleextexp.cc", |
| 1604 | "test/vscaleextexp-microkernel-tester.h", |
| 1605 | ] + MICROKERNEL_TEST_HDRS, |
| 1606 | deps = MICROKERNEL_TEST_DEPS, |
| 1607 | ) |
| 1608 | |
| 1609 | xnnpack_unit_test( |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 1610 | name = "f32_vsub_test", |
| 1611 | srcs = [ |
| 1612 | "test/f32-vsub.cc", |
Marat Dukhan | c07cb7f | 2019-11-14 15:32:05 -0800 | [diff] [blame] | 1613 | "test/vbinop-microkernel-tester.h", |
| 1614 | ] + MICROKERNEL_TEST_HDRS, |
| 1615 | deps = MICROKERNEL_TEST_DEPS, |
| 1616 | ) |
| 1617 | |
| 1618 | xnnpack_unit_test( |
| 1619 | name = "f32_vsubc_test", |
| 1620 | srcs = [ |
| 1621 | "test/f32-vsubc.cc", |
| 1622 | "test/vbinopc-microkernel-tester.h", |
| 1623 | ] + MICROKERNEL_TEST_HDRS, |
| 1624 | deps = MICROKERNEL_TEST_DEPS, |
| 1625 | ) |
| 1626 | |
| 1627 | xnnpack_unit_test( |
| 1628 | name = "f32_vrsubc_test", |
| 1629 | srcs = [ |
| 1630 | "test/f32-vrsubc.cc", |
| 1631 | "test/vbinopc-microkernel-tester.h", |
Marat Dukhan | 9757953 | 2019-10-18 16:40:39 -0700 | [diff] [blame] | 1632 | ] + MICROKERNEL_TEST_HDRS, |
| 1633 | deps = MICROKERNEL_TEST_DEPS, |
| 1634 | ) |
| 1635 | |
| 1636 | xnnpack_unit_test( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1637 | name = "q8_avgpool_test", |
| 1638 | srcs = [ |
| 1639 | "test/q8-avgpool.cc", |
| 1640 | "test/avgpool-microkernel-tester.h", |
| 1641 | "src/xnnpack/AlignedAllocator.h", |
| 1642 | ] + MICROKERNEL_TEST_HDRS, |
| 1643 | deps = MICROKERNEL_TEST_DEPS, |
| 1644 | ) |
| 1645 | |
| 1646 | xnnpack_unit_test( |
| 1647 | name = "q8_igemm_test", |
| 1648 | srcs = [ |
| 1649 | "test/q8-igemm.cc", |
| 1650 | "test/gemm-microkernel-tester.h", |
| 1651 | "src/xnnpack/AlignedAllocator.h", |
| 1652 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1653 | deps = MICROKERNEL_TEST_DEPS, |
| 1654 | ) |
| 1655 | |
| 1656 | xnnpack_unit_test( |
| 1657 | name = "q8_dwconv_test", |
| 1658 | srcs = [ |
| 1659 | "test/q8-dwconv.cc", |
| 1660 | "test/dwconv-microkernel-tester.h", |
| 1661 | "src/xnnpack/AlignedAllocator.h", |
| 1662 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1663 | deps = MICROKERNEL_TEST_DEPS, |
| 1664 | ) |
| 1665 | |
| 1666 | xnnpack_unit_test( |
| 1667 | name = "q8_gavgpool_test", |
| 1668 | srcs = [ |
| 1669 | "test/q8-gavgpool.cc", |
| 1670 | "test/gavgpool-microkernel-tester.h", |
| 1671 | "src/xnnpack/AlignedAllocator.h", |
| 1672 | ] + MICROKERNEL_TEST_HDRS, |
| 1673 | deps = MICROKERNEL_TEST_DEPS, |
| 1674 | ) |
| 1675 | |
| 1676 | xnnpack_unit_test( |
| 1677 | name = "q8_gemm_test", |
| 1678 | srcs = [ |
| 1679 | "test/q8-gemm.cc", |
| 1680 | "test/gemm-microkernel-tester.h", |
| 1681 | "src/xnnpack/AlignedAllocator.h", |
| 1682 | ] + WEIGHTS_PACK_HDRS + MICROKERNEL_TEST_HDRS, |
| 1683 | deps = MICROKERNEL_TEST_DEPS, |
| 1684 | ) |
| 1685 | |
| 1686 | xnnpack_unit_test( |
| 1687 | name = "q8_vadd_test", |
| 1688 | srcs = [ |
| 1689 | "test/q8-vadd.cc", |
| 1690 | "test/vadd-microkernel-tester.h", |
| 1691 | ] + MICROKERNEL_TEST_HDRS, |
| 1692 | deps = MICROKERNEL_TEST_DEPS, |
| 1693 | ) |
| 1694 | |
| 1695 | xnnpack_unit_test( |
| 1696 | name = "u8_clamp_test", |
| 1697 | srcs = [ |
| 1698 | "test/u8-clamp.cc", |
| 1699 | "test/clamp-microkernel-tester.h", |
| 1700 | ] + MICROKERNEL_TEST_HDRS, |
| 1701 | deps = MICROKERNEL_TEST_DEPS, |
| 1702 | ) |
| 1703 | |
| 1704 | xnnpack_unit_test( |
| 1705 | name = "u8_lut32norm_test", |
| 1706 | srcs = [ |
| 1707 | "test/u8-lut32norm.cc", |
| 1708 | "test/lut-norm-microkernel-tester.h", |
| 1709 | ] + MICROKERNEL_TEST_HDRS, |
| 1710 | deps = MICROKERNEL_TEST_DEPS, |
| 1711 | ) |
| 1712 | |
| 1713 | xnnpack_unit_test( |
| 1714 | name = "u8_maxpool_test", |
| 1715 | srcs = [ |
| 1716 | "test/u8-maxpool.cc", |
| 1717 | "test/maxpool-microkernel-tester.h", |
| 1718 | ] + MICROKERNEL_TEST_HDRS, |
| 1719 | deps = MICROKERNEL_TEST_DEPS, |
| 1720 | ) |
| 1721 | |
| 1722 | xnnpack_unit_test( |
| 1723 | name = "u8_rmax_test", |
| 1724 | srcs = [ |
| 1725 | "test/u8-rmax.cc", |
| 1726 | "test/rmax-microkernel-tester.h", |
| 1727 | ] + MICROKERNEL_TEST_HDRS, |
| 1728 | deps = MICROKERNEL_TEST_DEPS, |
| 1729 | ) |
| 1730 | |
| 1731 | xnnpack_unit_test( |
| 1732 | name = "x32_packx_test", |
| 1733 | srcs = [ |
| 1734 | "test/x32-packx.cc", |
| 1735 | "test/pack-microkernel-tester.h", |
| 1736 | "src/xnnpack/AlignedAllocator.h", |
| 1737 | ] + MICROKERNEL_TEST_HDRS, |
| 1738 | deps = MICROKERNEL_TEST_DEPS, |
| 1739 | ) |
| 1740 | |
| 1741 | xnnpack_unit_test( |
| 1742 | name = "x32_pad_test", |
| 1743 | srcs = [ |
| 1744 | "test/x32-pad.cc", |
| 1745 | "test/pad-microkernel-tester.h", |
| 1746 | ] + MICROKERNEL_TEST_HDRS, |
| 1747 | deps = MICROKERNEL_TEST_DEPS, |
| 1748 | ) |
| 1749 | |
| 1750 | xnnpack_unit_test( |
| 1751 | name = "x32_unpool_test", |
| 1752 | srcs = [ |
| 1753 | "test/x32-unpool.cc", |
| 1754 | "test/unpool-microkernel-tester.h", |
| 1755 | ] + MICROKERNEL_TEST_HDRS, |
| 1756 | deps = MICROKERNEL_TEST_DEPS, |
| 1757 | ) |
| 1758 | |
| 1759 | xnnpack_unit_test( |
| 1760 | name = "x32_zip_test", |
| 1761 | srcs = [ |
| 1762 | "test/x32-zip.cc", |
| 1763 | "test/zip-microkernel-tester.h", |
| 1764 | ] + MICROKERNEL_TEST_HDRS, |
| 1765 | deps = MICROKERNEL_TEST_DEPS, |
| 1766 | ) |
| 1767 | |
| 1768 | xnnpack_unit_test( |
| 1769 | name = "x8_lut_test", |
| 1770 | srcs = [ |
| 1771 | "test/x8-lut.cc", |
| 1772 | "test/lut-microkernel-tester.h", |
| 1773 | ] + MICROKERNEL_TEST_HDRS, |
| 1774 | deps = MICROKERNEL_TEST_DEPS, |
| 1775 | ) |
| 1776 | |
| 1777 | xnnpack_unit_test( |
| 1778 | name = "x8_zip_test", |
| 1779 | srcs = [ |
| 1780 | "test/x8-zip.cc", |
| 1781 | "test/zip-microkernel-tester.h", |
| 1782 | ] + MICROKERNEL_TEST_HDRS, |
| 1783 | deps = MICROKERNEL_TEST_DEPS, |
| 1784 | ) |
| 1785 | |
| 1786 | ########################### Size test for the library ########################## |
| 1787 | |
| 1788 | xnnpack_binary( |
| 1789 | name = "size_test", |
| 1790 | srcs = ["test/size.c"], |
Marat Dukhan | 8fe54e4 | 2019-10-10 14:12:59 -0700 | [diff] [blame] | 1791 | deps = [":xnnpack_operators_nhwc_f32"], |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1792 | ) |
| 1793 | |
| 1794 | ########################### Unit tests for operators ########################### |
| 1795 | |
| 1796 | xnnpack_unit_test( |
| 1797 | name = "add_test", |
| 1798 | srcs = [ |
| 1799 | "test/add.cc", |
| 1800 | "test/add-operator-tester.h", |
| 1801 | ], |
| 1802 | deps = OPERATOR_TEST_DEPS, |
| 1803 | ) |
| 1804 | |
| 1805 | xnnpack_unit_test( |
| 1806 | name = "argmax_pooling_test", |
| 1807 | srcs = [ |
| 1808 | "test/argmax-pooling.cc", |
| 1809 | "test/argmax-pooling-operator-tester.h", |
| 1810 | ] + OPERATOR_TEST_PARAMS_HDRS, |
| 1811 | deps = OPERATOR_TEST_DEPS, |
| 1812 | ) |
| 1813 | |
| 1814 | xnnpack_unit_test( |
| 1815 | name = "average_pooling_test", |
| 1816 | srcs = [ |
| 1817 | "test/average-pooling.cc", |
| 1818 | "test/average-pooling-operator-tester.h", |
| 1819 | ] + OPERATOR_TEST_PARAMS_HDRS, |
| 1820 | deps = OPERATOR_TEST_DEPS, |
| 1821 | ) |
| 1822 | |
| 1823 | xnnpack_unit_test( |
| 1824 | name = "channel_pad_test", |
| 1825 | srcs = [ |
| 1826 | "test/channel-pad.cc", |
| 1827 | "test/channel-pad-operator-tester.h", |
| 1828 | ] + OPERATOR_TEST_PARAMS_HDRS, |
| 1829 | deps = OPERATOR_TEST_DEPS, |
| 1830 | ) |
| 1831 | |
| 1832 | xnnpack_unit_test( |
| 1833 | name = "channel_shuffle_test", |
| 1834 | srcs = [ |
| 1835 | "test/channel-shuffle.cc", |
| 1836 | "test/channel-shuffle-operator-tester.h", |
| 1837 | ], |
| 1838 | deps = OPERATOR_TEST_DEPS, |
| 1839 | ) |
| 1840 | |
| 1841 | xnnpack_unit_test( |
| 1842 | name = "clamp_test", |
| 1843 | srcs = [ |
| 1844 | "test/clamp.cc", |
| 1845 | "test/clamp-operator-tester.h", |
| 1846 | ], |
| 1847 | deps = OPERATOR_TEST_DEPS, |
| 1848 | ) |
| 1849 | |
| 1850 | xnnpack_unit_test( |
| 1851 | name = "convolution_test", |
| 1852 | srcs = [ |
| 1853 | "test/convolution.cc", |
| 1854 | "test/convolution-operator-tester.h", |
| 1855 | ], |
| 1856 | deps = OPERATOR_TEST_DEPS, |
| 1857 | ) |
| 1858 | |
| 1859 | xnnpack_unit_test( |
| 1860 | name = "convolution_spnchw_test", |
| 1861 | srcs = [ |
| 1862 | "test/convolution-spnchw.cc", |
| 1863 | "test/convolution-spnchw-operator-tester.h", |
| 1864 | ], |
| 1865 | deps = OPERATOR_TEST_DEPS, |
| 1866 | ) |
| 1867 | |
| 1868 | xnnpack_unit_test( |
| 1869 | name = "deconvolution_test", |
| 1870 | srcs = [ |
| 1871 | "test/deconvolution.cc", |
| 1872 | "test/deconvolution-operator-tester.h", |
| 1873 | ] + OPERATOR_TEST_PARAMS_HDRS, |
| 1874 | deps = OPERATOR_TEST_DEPS, |
| 1875 | ) |
| 1876 | |
| 1877 | xnnpack_unit_test( |
| 1878 | name = "fully_connected_test", |
| 1879 | srcs = [ |
| 1880 | "test/fully-connected.cc", |
| 1881 | "test/fully-connected-operator-tester.h", |
| 1882 | ], |
| 1883 | deps = OPERATOR_TEST_DEPS, |
| 1884 | ) |
| 1885 | |
| 1886 | xnnpack_unit_test( |
| 1887 | name = "global_average_pooling_test", |
| 1888 | srcs = [ |
| 1889 | "test/global-average-pooling.cc", |
| 1890 | "test/global-average-pooling-operator-tester.h", |
| 1891 | ] + OPERATOR_TEST_PARAMS_HDRS, |
| 1892 | deps = OPERATOR_TEST_DEPS, |
| 1893 | ) |
| 1894 | |
| 1895 | xnnpack_unit_test( |
| 1896 | name = "global_average_pooling_spnchw_test", |
| 1897 | srcs = [ |
| 1898 | "test/global-average-pooling-spnchw.cc", |
| 1899 | "test/global-average-pooling-spnchw-operator-tester.h", |
| 1900 | ], |
| 1901 | deps = OPERATOR_TEST_DEPS, |
| 1902 | ) |
| 1903 | |
| 1904 | xnnpack_unit_test( |
| 1905 | name = "hardswish_test", |
| 1906 | srcs = [ |
| 1907 | "test/hardswish.cc", |
| 1908 | "test/hardswish-operator-tester.h", |
| 1909 | ], |
| 1910 | deps = OPERATOR_TEST_DEPS, |
| 1911 | ) |
| 1912 | |
| 1913 | xnnpack_unit_test( |
| 1914 | name = "leaky_relu_test", |
| 1915 | srcs = [ |
| 1916 | "test/leaky-relu.cc", |
| 1917 | "test/leaky-relu-operator-tester.h", |
| 1918 | ], |
| 1919 | deps = OPERATOR_TEST_DEPS, |
| 1920 | ) |
| 1921 | |
| 1922 | xnnpack_unit_test( |
| 1923 | name = "max_pooling_test", |
| 1924 | srcs = [ |
| 1925 | "test/max-pooling.cc", |
| 1926 | "test/max-pooling-operator-tester.h", |
| 1927 | ] + OPERATOR_TEST_PARAMS_HDRS, |
| 1928 | deps = OPERATOR_TEST_DEPS, |
| 1929 | ) |
| 1930 | |
| 1931 | xnnpack_unit_test( |
Marat Dukhan | ca2733c | 2019-11-15 23:21:17 -0800 | [diff] [blame] | 1932 | name = "multiply_test", |
| 1933 | srcs = [ |
| 1934 | "test/multiply.cc", |
| 1935 | "test/multiply-operator-tester.h", |
| 1936 | ], |
| 1937 | deps = OPERATOR_TEST_DEPS, |
| 1938 | ) |
| 1939 | |
| 1940 | xnnpack_unit_test( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1941 | name = "prelu_test", |
| 1942 | srcs = [ |
| 1943 | "test/prelu.cc", |
| 1944 | "test/prelu-operator-tester.h", |
| 1945 | ] + OPERATOR_TEST_PARAMS_HDRS, |
| 1946 | deps = OPERATOR_TEST_DEPS, |
| 1947 | ) |
| 1948 | |
| 1949 | xnnpack_unit_test( |
Marat Dukhan | 6972249 | 2019-11-11 19:55:50 -0800 | [diff] [blame] | 1950 | name = "resize_bilinear_test", |
| 1951 | srcs = [ |
| 1952 | "test/resize-bilinear.cc", |
| 1953 | "test/resize-bilinear-operator-tester.h", |
| 1954 | ] + OPERATOR_TEST_PARAMS_HDRS, |
| 1955 | deps = OPERATOR_TEST_DEPS, |
| 1956 | ) |
| 1957 | |
| 1958 | xnnpack_unit_test( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1959 | name = "sigmoid_test", |
| 1960 | srcs = [ |
| 1961 | "test/sigmoid.cc", |
| 1962 | "test/sigmoid-operator-tester.h", |
| 1963 | ], |
| 1964 | deps = OPERATOR_TEST_DEPS, |
| 1965 | ) |
| 1966 | |
| 1967 | xnnpack_unit_test( |
| 1968 | name = "softargmax_test", |
| 1969 | srcs = [ |
| 1970 | "test/softargmax.cc", |
| 1971 | "test/softargmax-operator-tester.h", |
| 1972 | ], |
| 1973 | deps = OPERATOR_TEST_DEPS, |
| 1974 | ) |
| 1975 | |
| 1976 | xnnpack_unit_test( |
| 1977 | name = "unpooling_test", |
| 1978 | srcs = [ |
| 1979 | "test/unpooling.cc", |
| 1980 | "test/unpooling-operator-tester.h", |
| 1981 | ], |
| 1982 | deps = OPERATOR_TEST_DEPS, |
| 1983 | ) |
| 1984 | |
| 1985 | ############################# Build configurations ############################# |
| 1986 | |
Marat Dukhan | b864235 | 2019-10-30 15:43:02 -0700 | [diff] [blame] | 1987 | # Enables usage of assembly kernels. |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 1988 | config_setting( |
Marat Dukhan | b864235 | 2019-10-30 15:43:02 -0700 | [diff] [blame] | 1989 | name = "xnn_enable_assembly_explicit_true", |
| 1990 | define_values = {"xnn_enable_assembly": "true"}, |
| 1991 | ) |
| 1992 | |
| 1993 | # Disables usage of assembly kernels. |
| 1994 | config_setting( |
| 1995 | name = "xnn_enable_assembly_explicit_false", |
| 1996 | define_values = {"xnn_enable_assembly": "false"}, |
| 1997 | ) |
| 1998 | |
| 1999 | # Builds with -c dbg |
| 2000 | config_setting( |
| 2001 | name = "debug_build", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 2002 | values = { |
Marat Dukhan | b864235 | 2019-10-30 15:43:02 -0700 | [diff] [blame] | 2003 | "compilation_mode": "dbg", |
| 2004 | }, |
| 2005 | ) |
| 2006 | |
| 2007 | # Builds with -c opt |
| 2008 | config_setting( |
| 2009 | name = "optimized_build", |
| 2010 | values = { |
| 2011 | "compilation_mode": "opt", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 2012 | }, |
| 2013 | ) |
| 2014 | |
| 2015 | config_setting( |
Marat Dukhan | b864235 | 2019-10-30 15:43:02 -0700 | [diff] [blame] | 2016 | name = "linux_k8", |
| 2017 | values = {"cpu": "k8"}, |
| 2018 | ) |
| 2019 | |
| 2020 | config_setting( |
Marat Dukhan | 4e45e66 | 2019-10-03 15:40:24 -0700 | [diff] [blame] | 2021 | name = "linux_aarch64", |
Marat Dukhan | b864235 | 2019-10-30 15:43:02 -0700 | [diff] [blame] | 2022 | values = {"cpu": "aarch64"}, |
Marat Dukhan | 4e45e66 | 2019-10-03 15:40:24 -0700 | [diff] [blame] | 2023 | ) |
| 2024 | |
| 2025 | config_setting( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 2026 | name = "android", |
| 2027 | values = {"crosstool_top": "//external:android/crosstool"}, |
| 2028 | ) |
| 2029 | |
| 2030 | config_setting( |
| 2031 | name = "android_armv7", |
| 2032 | values = { |
| 2033 | "crosstool_top": "//external:android/crosstool", |
| 2034 | "cpu": "armeabi-v7a", |
| 2035 | }, |
| 2036 | ) |
| 2037 | |
| 2038 | config_setting( |
| 2039 | name = "android_arm64", |
| 2040 | values = { |
| 2041 | "crosstool_top": "//external:android/crosstool", |
| 2042 | "cpu": "arm64-v8a", |
| 2043 | }, |
| 2044 | ) |
| 2045 | |
| 2046 | config_setting( |
| 2047 | name = "android_x86", |
| 2048 | values = { |
| 2049 | "crosstool_top": "//external:android/crosstool", |
| 2050 | "cpu": "x86", |
| 2051 | }, |
| 2052 | ) |
| 2053 | |
| 2054 | config_setting( |
| 2055 | name = "android_x86_64", |
| 2056 | values = { |
| 2057 | "crosstool_top": "//external:android/crosstool", |
| 2058 | "cpu": "x86_64", |
| 2059 | }, |
| 2060 | ) |
| 2061 | |
| 2062 | config_setting( |
Marat Dukhan | 885ca24 | 2019-10-07 09:17:32 -0700 | [diff] [blame] | 2063 | name = "macos_x86_64", |
| 2064 | values = { |
| 2065 | "apple_platform_type": "macos", |
| 2066 | "cpu": "darwin", |
| 2067 | }, |
| 2068 | ) |
| 2069 | |
| 2070 | config_setting( |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 2071 | name = "emscripten", |
Marat Dukhan | 1a729ec | 2019-10-07 09:31:44 -0700 | [diff] [blame] | 2072 | values = {"crosstool_top": "//toolchain:emscripten"}, |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 2073 | ) |
| 2074 | |
| 2075 | config_setting( |
| 2076 | name = "emscripten_wasm", |
| 2077 | values = { |
Marat Dukhan | 1a729ec | 2019-10-07 09:31:44 -0700 | [diff] [blame] | 2078 | "crosstool_top": "//toolchain:emscripten", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 2079 | "cpu": "wasm", |
| 2080 | }, |
| 2081 | ) |
| 2082 | |
| 2083 | config_setting( |
| 2084 | name = "emscripten_wasmsimd", |
| 2085 | values = { |
Marat Dukhan | 1a729ec | 2019-10-07 09:31:44 -0700 | [diff] [blame] | 2086 | "crosstool_top": "//toolchain:emscripten", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 2087 | "cpu": "wasm", |
Marat Dukhan | 8c19e3c | 2019-10-30 12:14:58 -0700 | [diff] [blame] | 2088 | "features": "wasm_simd", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 2089 | }, |
| 2090 | ) |
| 2091 | |
| 2092 | config_setting( |
| 2093 | name = "emscripten_asmjs", |
| 2094 | values = { |
Marat Dukhan | 1a729ec | 2019-10-07 09:31:44 -0700 | [diff] [blame] | 2095 | "crosstool_top": "//toolchain:emscripten", |
Marat Dukhan | 08c4a43 | 2019-10-03 09:29:21 -0700 | [diff] [blame] | 2096 | "cpu": "asmjs", |
| 2097 | }, |
| 2098 | ) |