XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -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 | #include <algorithm> |
| 7 | #include <cfloat> |
| 8 | #include <cmath> |
| 9 | #include <functional> |
| 10 | #include <random> |
| 11 | #include <vector> |
| 12 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 13 | #include <benchmark/benchmark.h> |
| 14 | #include "bench/conv.h" |
| 15 | #include "bench/utils.h" |
| 16 | #include <xnnpack/AlignedAllocator.h> |
Marat Dukhan | 1dadbf7 | 2019-10-01 10:46:20 -0700 | [diff] [blame] | 17 | #include <xnnpack/common.h> |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 18 | #include <xnnpack/igemm.h> |
| 19 | #include <xnnpack/indirection.h> |
| 20 | #include <xnnpack/operator.h> |
| 21 | #include <xnnpack/pack.h> |
Marat Dukhan | eeaa7bd | 2019-10-25 17:31:25 -0700 | [diff] [blame] | 22 | #include <xnnpack/params-init.h> |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 23 | #include <xnnpack/params.h> |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 24 | |
| 25 | |
| 26 | static void IGEMMBenchmark(benchmark::State& state, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 27 | xnn_f32_igemm_minmax_ukernel_function f32_igemm, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 28 | uint32_t mr, uint32_t nr, uint32_t kr, uint32_t sr, |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 29 | xnn_init_f32_minmax_params_fn init_params, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 30 | benchmark::utils::IsaCheckFunction isa_check = nullptr) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 31 | { |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 32 | if (isa_check && !isa_check(state)) { |
| 33 | return; |
| 34 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 35 | |
| 36 | const size_t input_height = state.range(0); |
| 37 | const size_t input_width = state.range(1); |
| 38 | const size_t kernel_height = state.range(2); |
| 39 | const size_t kernel_width = state.range(3); |
| 40 | const size_t kernel_size = kernel_height * kernel_width; |
| 41 | const size_t padding_height = state.range(4); |
| 42 | const size_t padding_width = state.range(5); |
| 43 | const size_t subsampling = state.range(6); |
| 44 | const size_t dilation = state.range(7); |
| 45 | const size_t group_input_channels = state.range(8); |
| 46 | const size_t group_output_channels = state.range(9); |
| 47 | |
| 48 | std::random_device random_device; |
| 49 | auto rng = std::mt19937(random_device()); |
Marat Dukhan | 44f0ca7 | 2020-08-02 21:46:58 -0700 | [diff] [blame] | 50 | auto f32rng = std::bind(std::uniform_real_distribution<float>(0.0f, 1.0f), std::ref(rng)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 51 | |
| 52 | const size_t output_pixel_stride = group_output_channels; |
| 53 | const size_t input_pixel_stride = group_input_channels; |
| 54 | const size_t effective_kernel_height = (kernel_height - 1) * dilation + 1; |
| 55 | const size_t effective_kernel_width = (kernel_width - 1) * dilation + 1; |
| 56 | const size_t padding_left = padding_width / 2; |
| 57 | const size_t padding_top = padding_height / 2; |
| 58 | const size_t output_height = (input_height + padding_height - effective_kernel_height) / subsampling + 1; |
| 59 | const size_t output_width = (input_width + padding_width - effective_kernel_width) / subsampling + 1; |
| 60 | const size_t output_size = output_height * output_width; |
| 61 | |
Marat Dukhan | 4232323 | 2019-10-23 02:09:02 -0700 | [diff] [blame] | 62 | const size_t mc_stride = benchmark::utils::RoundUp<size_t>(output_size, mr); |
| 63 | const size_t nc_stride = benchmark::utils::RoundUp<size_t>(group_output_channels, nr); |
| 64 | const size_t kc_stride = benchmark::utils::RoundUp<size_t>(group_input_channels, kr); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 65 | |
| 66 | std::vector<float> a(input_height * input_width * input_pixel_stride); |
| 67 | std::generate(a.begin(), a.end(), std::ref(f32rng)); |
| 68 | std::vector<float> k(group_output_channels * kernel_height * kernel_width * group_input_channels); |
| 69 | std::generate(k.begin(), k.end(), std::ref(f32rng)); |
| 70 | std::vector<float> b(group_output_channels); |
| 71 | std::generate(b.begin(), b.end(), std::ref(f32rng)); |
| 72 | |
| 73 | std::vector<float> z(group_input_channels); |
| 74 | |
| 75 | const size_t w_elements = (kernel_size * kc_stride + 1) * nc_stride; |
| 76 | const size_t i_elements = mc_stride * kernel_size; |
| 77 | const size_t c_elements = output_height * output_width * output_pixel_stride; |
| 78 | const size_t num_buffers = 1 + |
Marat Dukhan | 4232323 | 2019-10-23 02:09:02 -0700 | [diff] [blame] | 79 | benchmark::utils::DivideRoundUp<size_t>(benchmark::utils::GetMaxCacheSize(), |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 80 | sizeof(float) * (w_elements + c_elements) + sizeof(void*) * i_elements); |
| 81 | |
Marat Dukhan | e13e639 | 2021-07-26 22:22:35 -0700 | [diff] [blame] | 82 | std::vector<float, AlignedAllocator<float, 64>> w(w_elements * num_buffers); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 83 | std::fill(w.begin(), w.end(), 0.0f); |
| 84 | xnn_pack_f32_conv_goki_w( |
| 85 | 1 /* groups */, group_output_channels, kernel_size, group_input_channels, |
Marat Dukhan | e06c813 | 2021-06-03 08:59:11 -0700 | [diff] [blame] | 86 | nr, kr, sr, k.data(), b.data(), w.data(), 0 /* extra bytes */, nullptr); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 87 | for (size_t n = 1; n < num_buffers; n++) { |
| 88 | std::copy(w.cbegin(), w.cbegin() + w_elements, w.begin() + n * w_elements); |
| 89 | } |
| 90 | |
| 91 | std::vector<const float*> i(i_elements * num_buffers); |
| 92 | xnn_operator convolution_op = { }; |
| 93 | convolution_op.indirection_buffer = reinterpret_cast<const void**>(i.data()); |
| 94 | convolution_op.input = a.data(); |
| 95 | convolution_op.input_pixel_stride = input_pixel_stride; |
| 96 | convolution_op.zero_buffer = z.data(); |
| 97 | convolution_op.groups = 1; |
| 98 | convolution_op.group_input_channels = group_input_channels; |
| 99 | convolution_op.batch_size = 1; |
| 100 | convolution_op.input_height = input_height; |
| 101 | convolution_op.input_width = input_width; |
| 102 | convolution_op.output_height = output_height; |
| 103 | convolution_op.output_width = output_width; |
| 104 | convolution_op.kernel_height = kernel_height; |
| 105 | convolution_op.kernel_width = kernel_width; |
| 106 | convolution_op.stride_height = subsampling; |
| 107 | convolution_op.stride_width = subsampling; |
| 108 | convolution_op.dilation_height = dilation; |
| 109 | convolution_op.dilation_width = dilation; |
| 110 | convolution_op.padding_top = padding_top; |
| 111 | convolution_op.padding_left = padding_left; |
| 112 | xnn_indirection_init_conv2d(&convolution_op, mr, 2 /* log2(sizeof(float)) */); |
| 113 | for (size_t n = 1; n < num_buffers; n++) { |
| 114 | std::copy(i.cbegin(), i.cbegin() + i_elements, i.begin() + n * i_elements); |
| 115 | } |
| 116 | |
| 117 | std::vector<float> c(c_elements * num_buffers); |
| 118 | std::fill(c.begin(), c.end(), std::nanf("")); |
| 119 | |
Marat Dukhan | f56f4c4 | 2021-05-17 01:47:20 -0700 | [diff] [blame] | 120 | xnn_f32_minmax_params params; |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 121 | init_params(¶ms, |
| 122 | -std::numeric_limits<float>::infinity(), +std::numeric_limits<float>::infinity()); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 123 | |
| 124 | size_t buffer_index = 0; |
| 125 | for (auto _ : state) { |
| 126 | state.PauseTiming(); |
Marat Dukhan | 4232323 | 2019-10-23 02:09:02 -0700 | [diff] [blame] | 127 | benchmark::utils::PrefetchToL1(a.data(), a.size() * sizeof(float)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 128 | buffer_index = (buffer_index + 1) % num_buffers; |
| 129 | state.ResumeTiming(); |
| 130 | |
| 131 | for (uint32_t m = 0; m < output_size; m += mr) { |
| 132 | const uint32_t mb = min(output_size - m, mr); |
| 133 | for (uint32_t n = 0; n < group_output_channels; n += nr) { |
| 134 | const uint32_t nb = min(group_output_channels - n, nr); |
| 135 | f32_igemm( |
| 136 | mb, nb, group_input_channels * sizeof(float), kernel_size * mr * sizeof(void*), |
| 137 | i.data() + buffer_index * i_elements + m, |
| 138 | w.data() + buffer_index * w_elements + n * (kc_stride * kernel_size + 1), |
| 139 | c.data() + buffer_index * c_elements + m * group_output_channels + n, group_output_channels * sizeof(float), nr * sizeof(float), |
Frank Barchard | e70dbeb | 2020-05-01 15:46:41 -0700 | [diff] [blame] | 140 | 0, z.data(), ¶ms); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 141 | } |
| 142 | } |
| 143 | } |
| 144 | |
Marat Dukhan | d713e8a | 2020-12-04 14:23:12 -0800 | [diff] [blame] | 145 | const uint64_t cpu_frequency = benchmark::utils::GetCurrentCpuFrequency(); |
| 146 | if (cpu_frequency != 0) { |
| 147 | state.counters["cpufreq"] = cpu_frequency; |
| 148 | } |
| 149 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 150 | state.counters["FLOPS"] = benchmark::Counter( |
| 151 | uint64_t(state.iterations()) * 2 * |
| 152 | output_height * output_width * |
| 153 | group_input_channels * group_output_channels * |
| 154 | kernel_height * kernel_width, |
| 155 | benchmark::Counter::kIsRate); |
| 156 | } |
| 157 | |
Zhi An Ng | 665cb23 | 2022-01-07 15:56:41 -0800 | [diff] [blame^] | 158 | #if XNN_ARCH_ARM && XNN_PLATFORM_JIT && XNN_ENABLE_JIT |
| 159 | static void IGEMMBenchmark(benchmark::State& state, |
| 160 | xnn_jit_code_generator_function generator, |
| 161 | size_t mr, size_t nr, size_t kr, size_t sr, |
| 162 | xnn_init_f32_minmax_params_fn init_params, |
| 163 | benchmark::utils::IsaCheckFunction isa_check = nullptr) |
| 164 | { |
| 165 | xnn_code_buffer code_buffer; |
| 166 | xnn_allocate_code_memory(&code_buffer, XNN_DEFAULT_CODE_BUFFER_SIZE); |
| 167 | generator(&code_buffer); |
| 168 | IGEMMBenchmark( |
| 169 | state, |
| 170 | reinterpret_cast<xnn_f32_igemm_minmax_ukernel_function>(code_buffer.code), |
| 171 | mr, nr, kr, sr, init_params); |
| 172 | xnn_release_code_memory(&code_buffer); |
| 173 | } |
| 174 | |
| 175 | static void jit_f32_igemm_4x8__aarch32_neon_ld64(benchmark::State& state, const char* net) { |
| 176 | IGEMMBenchmark(state, xnn_generate_f32_igemm_ukernel_4x8__aarch32_neon_ld64, 4, 8, 1, 1, |
| 177 | xnn_init_f32_minmax_scalar_params); |
| 178 | } |
| 179 | static void jit_f32_igemm_4x8__aarch32_neon_cortex_a7(benchmark::State& state, const char* net) { |
| 180 | IGEMMBenchmark(state, xnn_generate_f32_igemm_ukernel_4x8__aarch32_neon_cortex_a7, 4, 8, 1, 1, |
| 181 | xnn_init_f32_minmax_scalar_params); |
| 182 | } |
| 183 | static void jit_f32_igemm_4x8__aarch32_neon_cortex_a53(benchmark::State& state, const char* net) { |
| 184 | IGEMMBenchmark(state, xnn_generate_f32_igemm_ukernel_4x8__aarch32_neon_cortex_a53, 4, 8, 1, 1, |
| 185 | xnn_init_f32_minmax_scalar_params); |
| 186 | } |
| 187 | static void jit_f32_igemm_4x8__aarch32_neon_cortex_a55(benchmark::State& state, const char* net) { |
| 188 | IGEMMBenchmark(state, xnn_generate_f32_igemm_ukernel_4x8__aarch32_neon_cortex_a55, 4, 8, 1, 1, |
| 189 | xnn_init_f32_minmax_scalar_params); |
| 190 | } |
| 191 | static void jit_f32_igemm_4x8__aarch32_neon_prfm_cortex_a75(benchmark::State& state, const char* net) { |
| 192 | IGEMMBenchmark(state, xnn_generate_f32_igemm_ukernel_4x8__aarch32_neon_prfm_cortex_a75, 4, 8, 1, 1, |
| 193 | xnn_init_f32_minmax_scalar_params); |
| 194 | } |
| 195 | static void jit_f32_igemm_4x8__aarch32_neon_cortex_a75(benchmark::State& state, const char* net) { |
| 196 | IGEMMBenchmark(state, xnn_generate_f32_igemm_ukernel_4x8__aarch32_neon_cortex_a75, 4, 8, 1, 1, |
| 197 | xnn_init_f32_minmax_scalar_params); |
| 198 | } |
| 199 | |
| 200 | BENCHMARK_CONV(jit_f32_igemm_4x8__aarch32_neon_ld64) |
| 201 | BENCHMARK_CONV(jit_f32_igemm_4x8__aarch32_neon_cortex_a7) |
| 202 | BENCHMARK_CONV(jit_f32_igemm_4x8__aarch32_neon_cortex_a53) |
| 203 | BENCHMARK_CONV(jit_f32_igemm_4x8__aarch32_neon_cortex_a55) |
| 204 | BENCHMARK_CONV(jit_f32_igemm_4x8__aarch32_neon_prfm_cortex_a75) |
| 205 | BENCHMARK_CONV(jit_f32_igemm_4x8__aarch32_neon_cortex_a75) |
| 206 | #endif // XNN_ARCH_ARM && XNN_PLATFORM_JIT && XNN_ENABLE_JIT |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 207 | |
Frank Barchard | dc38f07 | 2020-02-10 13:21:42 -0800 | [diff] [blame] | 208 | #if XNN_ARCH_ARM && XNN_ENABLE_ASSEMBLY |
| 209 | static void f32_igemm_4x8__aarch32_neon_ld64(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 210 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_ld64, 4, 8, 1, 1, |
| 211 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | dc38f07 | 2020-02-10 13:21:42 -0800 | [diff] [blame] | 212 | } |
Frank Barchard | 490febe | 2020-07-16 18:42:17 -0700 | [diff] [blame] | 213 | static void f32_igemm_4x8__aarch32_neon_cortex_a7(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 214 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_cortex_a7, 4, 8, 1, 1, |
| 215 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 569561d | 2020-06-17 13:11:12 -0700 | [diff] [blame] | 216 | } |
Frank Barchard | b7dd29e | 2020-03-11 12:37:10 -0700 | [diff] [blame] | 217 | static void f32_igemm_4x8__aarch32_neon_cortex_a53(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 218 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_cortex_a53, 4, 8, 1, 1, |
| 219 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | b7dd29e | 2020-03-11 12:37:10 -0700 | [diff] [blame] | 220 | } |
| 221 | static void f32_igemm_4x8__aarch32_neon_cortex_a55(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 222 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_cortex_a55, 4, 8, 1, 1, |
| 223 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | b7dd29e | 2020-03-11 12:37:10 -0700 | [diff] [blame] | 224 | } |
Frank Barchard | 7873586 | 2022-01-04 16:47:44 -0800 | [diff] [blame] | 225 | static void f32_igemm_4x8__aarch32_neon_prfm_cortex_a75(benchmark::State& state, const char* net) { |
| 226 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_prfm_cortex_a75, 4, 8, 1, 1, |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 227 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | b7dd29e | 2020-03-11 12:37:10 -0700 | [diff] [blame] | 228 | } |
| 229 | static void f32_igemm_4x8__aarch32_neon_cortex_a75(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 230 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_cortex_a75, 4, 8, 1, 1, |
| 231 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | b7dd29e | 2020-03-11 12:37:10 -0700 | [diff] [blame] | 232 | } |
Frank Barchard | dc38f07 | 2020-02-10 13:21:42 -0800 | [diff] [blame] | 233 | |
| 234 | BENCHMARK_CONV(f32_igemm_4x8__aarch32_neon_ld64) |
Frank Barchard | 490febe | 2020-07-16 18:42:17 -0700 | [diff] [blame] | 235 | BENCHMARK_CONV(f32_igemm_4x8__aarch32_neon_cortex_a7) |
Frank Barchard | b7dd29e | 2020-03-11 12:37:10 -0700 | [diff] [blame] | 236 | BENCHMARK_CONV(f32_igemm_4x8__aarch32_neon_cortex_a53) |
| 237 | BENCHMARK_CONV(f32_igemm_4x8__aarch32_neon_cortex_a55) |
Frank Barchard | 7873586 | 2022-01-04 16:47:44 -0800 | [diff] [blame] | 238 | BENCHMARK_CONV(f32_igemm_4x8__aarch32_neon_prfm_cortex_a75) |
Frank Barchard | b7dd29e | 2020-03-11 12:37:10 -0700 | [diff] [blame] | 239 | BENCHMARK_CONV(f32_igemm_4x8__aarch32_neon_cortex_a75) |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 240 | #endif // XNN_ARCH_ARM && XNN_ENABLE_ASSEMBLY |
| 241 | |
Frank Barchard | dc38f07 | 2020-02-10 13:21:42 -0800 | [diff] [blame] | 242 | |
Frank Barchard | dbafc58 | 2019-10-09 16:30:48 -0700 | [diff] [blame] | 243 | #if XNN_ARCH_ARM64 && XNN_ENABLE_ASSEMBLY |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 244 | static void f32_igemm_1x12__aarch64_neonfma_cortex_a53(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 245 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x12__aarch64_neonfma_cortex_a53, 1, 12, 1, 1, |
| 246 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 247 | } |
Frank Barchard | 21be34f | 2019-10-09 19:32:19 -0700 | [diff] [blame] | 248 | static void f32_igemm_1x8__aarch64_neonfma_cortex_a53(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 249 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a53, 1, 8, 1, 1, |
| 250 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 21be34f | 2019-10-09 19:32:19 -0700 | [diff] [blame] | 251 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 252 | static void f32_igemm_1x8__aarch64_neonfma_cortex_a75(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 253 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a75, 1, 8, 1, 1, |
| 254 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 255 | } |
Frank Barchard | 143a110 | 2021-06-15 09:15:34 -0700 | [diff] [blame] | 256 | static void f32_igemm_1x8__aarch64_neonfma_prfm_cortex_a75(benchmark::State& state, const char* net) { |
| 257 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_prfm_cortex_a75, 1, 8, 1, 1, |
| 258 | xnn_init_f32_minmax_scalar_params); |
| 259 | } |
Frank Barchard | 46fb807 | 2019-10-25 12:54:22 -0700 | [diff] [blame] | 260 | static void f32_igemm_4x8__aarch64_neonfma_cortex_a53(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 261 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a53, 4, 8, 1, 1, |
| 262 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 46fb807 | 2019-10-25 12:54:22 -0700 | [diff] [blame] | 263 | } |
Frank Barchard | 8fb9055 | 2020-03-16 11:36:09 -0700 | [diff] [blame] | 264 | static void f32_igemm_4x8__aarch64_neonfma_cortex_a55(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 265 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a55, 4, 8, 1, 1, |
| 266 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 8fb9055 | 2020-03-16 11:36:09 -0700 | [diff] [blame] | 267 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 268 | static void f32_igemm_4x8__aarch64_neonfma_cortex_a75(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 269 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a75, 4, 8, 1, 1, |
| 270 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 271 | } |
Frank Barchard | 143a110 | 2021-06-15 09:15:34 -0700 | [diff] [blame] | 272 | static void f32_igemm_4x8__aarch64_neonfma_prfm_cortex_a75(benchmark::State& state, const char* net) { |
| 273 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_prfm_cortex_a75, 4, 8, 1, 1, |
| 274 | xnn_init_f32_minmax_scalar_params); |
| 275 | } |
Frank Barchard | e349124 | 2021-06-11 14:04:57 -0700 | [diff] [blame] | 276 | static void f32_igemm_4x8__aarch64_neonfma_ld64(benchmark::State& state, const char* net) { |
| 277 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_ld64, 4, 8, 1, 1, |
| 278 | xnn_init_f32_minmax_scalar_params); |
| 279 | } |
Frank Barchard | 79cd5f9 | 2021-06-21 17:34:59 -0700 | [diff] [blame] | 280 | static void f32_igemm_4x8__aarch64_neonfma_ld128(benchmark::State& state, const char* net) { |
| 281 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_ld128, 4, 8, 1, 1, |
| 282 | xnn_init_f32_minmax_scalar_params); |
| 283 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 284 | static void f32_igemm_5x8__aarch64_neonfma_cortex_a75(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 285 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__aarch64_neonfma_cortex_a75, 5, 8, 1, 1, |
| 286 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 287 | } |
Frank Barchard | 143a110 | 2021-06-15 09:15:34 -0700 | [diff] [blame] | 288 | static void f32_igemm_5x8__aarch64_neonfma_prfm_cortex_a75(benchmark::State& state, const char* net) { |
| 289 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__aarch64_neonfma_prfm_cortex_a75, 5, 8, 1, 1, |
| 290 | xnn_init_f32_minmax_scalar_params); |
| 291 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 292 | static void f32_igemm_4x12__aarch64_neonfma_cortex_a53(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 293 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x12__aarch64_neonfma_cortex_a53, 4, 12, 1, 1, |
| 294 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 295 | } |
Frank Barchard | a7fb855 | 2019-10-23 17:14:17 -0700 | [diff] [blame] | 296 | static void f32_igemm_6x8__aarch64_neonfma_cortex_a53(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 297 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a53, 6, 8, 1, 1, |
| 298 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | a7fb855 | 2019-10-23 17:14:17 -0700 | [diff] [blame] | 299 | } |
Frank Barchard | 91e1999 | 2020-03-09 18:46:14 -0700 | [diff] [blame] | 300 | static void f32_igemm_6x8__aarch64_neonfma_cortex_a55(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 301 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a55, 6, 8, 1, 1, |
| 302 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 91e1999 | 2020-03-09 18:46:14 -0700 | [diff] [blame] | 303 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 304 | static void f32_igemm_6x8__aarch64_neonfma_cortex_a73(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 305 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a73, 6, 8, 1, 1, |
| 306 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 307 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 308 | static void f32_igemm_6x8__aarch64_neonfma_cortex_a75(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 309 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a75, 6, 8, 1, 1, |
| 310 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 311 | } |
Frank Barchard | 143a110 | 2021-06-15 09:15:34 -0700 | [diff] [blame] | 312 | static void f32_igemm_6x8__aarch64_neonfma_prfm_cortex_a75(benchmark::State& state, const char* net) { |
| 313 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_prfm_cortex_a75, 6, 8, 1, 1, |
| 314 | xnn_init_f32_minmax_scalar_params); |
| 315 | } |
Frank Barchard | e349124 | 2021-06-11 14:04:57 -0700 | [diff] [blame] | 316 | static void f32_igemm_6x8__aarch64_neonfma_ld64(benchmark::State& state, const char* net) { |
| 317 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_ld64, 6, 8, 1, 1, |
| 318 | xnn_init_f32_minmax_scalar_params); |
| 319 | } |
Frank Barchard | 79cd5f9 | 2021-06-21 17:34:59 -0700 | [diff] [blame] | 320 | static void f32_igemm_6x8__aarch64_neonfma_ld128(benchmark::State& state, const char* net) { |
| 321 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_ld128, 6, 8, 1, 1, |
| 322 | xnn_init_f32_minmax_scalar_params); |
| 323 | } |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 324 | static void f32_igemm_1x8__neonfma_lane_ld64(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 325 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__neonfma_lane_ld64, 1, 8, 1, 1, |
| 326 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 327 | } |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 328 | static void f32_igemm_4x2__neonfma_lane_ld64(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 329 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x2__neonfma_lane_ld64, 4, 2, 1, 1, |
| 330 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 331 | } |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 332 | static void f32_igemm_4x4__neonfma_lane_ld64(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 333 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x4__neonfma_lane_ld64, 4, 4, 1, 1, |
| 334 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 335 | } |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 336 | static void f32_igemm_4x8__neonfma_lane_ld128(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 337 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__neonfma_lane_ld128, 4, 8, 1, 1, |
| 338 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 339 | } |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 340 | static void f32_igemm_4x8__neonfma_lane_ld64(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 341 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__neonfma_lane_ld64, 4, 8, 1, 1, |
| 342 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 343 | } |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 344 | static void f32_igemm_6x8__neonfma_lane_ld64(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 345 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__neonfma_lane_ld64, 6, 8, 1, 1, |
| 346 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 347 | } |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 348 | static void f32_igemm_6x8__neonfma_lane_ld128(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 349 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__neonfma_lane_ld128, 6, 8, 1, 1, |
| 350 | xnn_init_f32_minmax_scalar_params); |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 351 | } |
| 352 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 353 | BENCHMARK_CONV(f32_igemm_1x12__aarch64_neonfma_cortex_a53) |
Frank Barchard | 21be34f | 2019-10-09 19:32:19 -0700 | [diff] [blame] | 354 | BENCHMARK_CONV(f32_igemm_1x8__aarch64_neonfma_cortex_a53) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 355 | BENCHMARK_CONV(f32_igemm_1x8__aarch64_neonfma_cortex_a75) |
Frank Barchard | 143a110 | 2021-06-15 09:15:34 -0700 | [diff] [blame] | 356 | BENCHMARK_CONV(f32_igemm_1x8__aarch64_neonfma_prfm_cortex_a75) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 357 | BENCHMARK_CONV(f32_igemm_4x12__aarch64_neonfma_cortex_a53) |
Frank Barchard | 46fb807 | 2019-10-25 12:54:22 -0700 | [diff] [blame] | 358 | BENCHMARK_CONV(f32_igemm_4x8__aarch64_neonfma_cortex_a53) |
Frank Barchard | 8fb9055 | 2020-03-16 11:36:09 -0700 | [diff] [blame] | 359 | BENCHMARK_CONV(f32_igemm_4x8__aarch64_neonfma_cortex_a55) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 360 | BENCHMARK_CONV(f32_igemm_4x8__aarch64_neonfma_cortex_a75) |
Frank Barchard | 143a110 | 2021-06-15 09:15:34 -0700 | [diff] [blame] | 361 | BENCHMARK_CONV(f32_igemm_4x8__aarch64_neonfma_prfm_cortex_a75) |
Frank Barchard | e349124 | 2021-06-11 14:04:57 -0700 | [diff] [blame] | 362 | BENCHMARK_CONV(f32_igemm_4x8__aarch64_neonfma_ld64) |
Frank Barchard | 79cd5f9 | 2021-06-21 17:34:59 -0700 | [diff] [blame] | 363 | BENCHMARK_CONV(f32_igemm_4x8__aarch64_neonfma_ld128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 364 | BENCHMARK_CONV(f32_igemm_5x8__aarch64_neonfma_cortex_a75) |
Frank Barchard | 143a110 | 2021-06-15 09:15:34 -0700 | [diff] [blame] | 365 | BENCHMARK_CONV(f32_igemm_5x8__aarch64_neonfma_prfm_cortex_a75) |
Frank Barchard | a7fb855 | 2019-10-23 17:14:17 -0700 | [diff] [blame] | 366 | BENCHMARK_CONV(f32_igemm_6x8__aarch64_neonfma_cortex_a53) |
Frank Barchard | 91e1999 | 2020-03-09 18:46:14 -0700 | [diff] [blame] | 367 | BENCHMARK_CONV(f32_igemm_6x8__aarch64_neonfma_cortex_a55) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 368 | BENCHMARK_CONV(f32_igemm_6x8__aarch64_neonfma_cortex_a73) |
| 369 | BENCHMARK_CONV(f32_igemm_6x8__aarch64_neonfma_cortex_a75) |
Frank Barchard | 143a110 | 2021-06-15 09:15:34 -0700 | [diff] [blame] | 370 | BENCHMARK_CONV(f32_igemm_6x8__aarch64_neonfma_prfm_cortex_a75) |
Frank Barchard | e349124 | 2021-06-11 14:04:57 -0700 | [diff] [blame] | 371 | BENCHMARK_CONV(f32_igemm_6x8__aarch64_neonfma_ld64) |
Frank Barchard | 79cd5f9 | 2021-06-21 17:34:59 -0700 | [diff] [blame] | 372 | BENCHMARK_CONV(f32_igemm_6x8__aarch64_neonfma_ld128) |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 373 | BENCHMARK_CONV(f32_igemm_1x8__neonfma_lane_ld64) |
| 374 | BENCHMARK_CONV(f32_igemm_4x2__neonfma_lane_ld64) |
| 375 | BENCHMARK_CONV(f32_igemm_4x4__neonfma_lane_ld64) |
| 376 | BENCHMARK_CONV(f32_igemm_4x8__neonfma_lane_ld128) |
| 377 | BENCHMARK_CONV(f32_igemm_4x8__neonfma_lane_ld64) |
| 378 | BENCHMARK_CONV(f32_igemm_6x8__neonfma_lane_ld64) |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 379 | BENCHMARK_CONV(f32_igemm_6x8__neonfma_lane_ld128) |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 380 | #endif // XNN_ARCH_ARM64 && XNN_ENABLE_ASSEMBLY |
| 381 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 382 | |
Frank Barchard | 4c3e5a9 | 2021-08-16 19:17:39 -0700 | [diff] [blame] | 383 | #if XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 384 | static void f32_igemm_1x8__neon_lane_ld64(benchmark::State& state, const char* net) { |
| 385 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, 1, 8, 1, 1, |
| 386 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 387 | } |
| 388 | static void f32_igemm_4x2__neon_lane_ld64(benchmark::State& state, const char* net) { |
| 389 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x2__neon_lane_ld64, 4, 2, 1, 1, |
| 390 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 391 | } |
| 392 | static void f32_igemm_4x4__neon_lane_ld64(benchmark::State& state, const char* net) { |
| 393 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x4__neon_lane_ld64, 4, 4, 1, 1, |
| 394 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 395 | } |
| 396 | static void f32_igemm_4x8__neon_lane_ld64(benchmark::State& state, const char* net) { |
| 397 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__neon_lane_ld64, 4, 8, 1, 1, |
| 398 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 399 | } |
| 400 | static void f32_igemm_4x8__neon_lane_ld128(benchmark::State& state, const char* net) { |
| 401 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__neon_lane_ld128, 4, 8, 1, 1, |
| 402 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 403 | } |
| 404 | static void f32_igemm_6x8__neon_lane_ld64(benchmark::State& state, const char* net) { |
| 405 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__neon_lane_ld64, 6, 8, 1, 1, |
| 406 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 407 | } |
| 408 | static void f32_igemm_6x8__neon_lane_ld128(benchmark::State& state, const char* net) { |
| 409 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__neon_lane_ld128, 6, 8, 1, 1, |
| 410 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 411 | } |
| 412 | static void f32_igemm_1x8__neon_dup_ld64(benchmark::State& state, const char* net) { |
| 413 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__neon_dup_ld64, 1, 8, 1, 1, |
| 414 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 415 | } |
| 416 | static void f32_igemm_4x8__neon_dup_ld128(benchmark::State& state, const char* net) { |
| 417 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__neon_dup_ld128, 4, 8, 1, 1, |
| 418 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 419 | } |
| 420 | static void f32_igemm_4x8__neon_dup_ld64(benchmark::State& state, const char* net) { |
| 421 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__neon_dup_ld64, 4, 8, 1, 1, |
| 422 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 423 | } |
| 424 | static void f32_igemm_6x8__neon_dup_ld64(benchmark::State& state, const char* net) { |
| 425 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__neon_dup_ld64, 6, 8, 1, 1, |
| 426 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 427 | } |
| 428 | static void f32_igemm_6x8__neon_dup_ld128(benchmark::State& state, const char* net) { |
| 429 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__neon_dup_ld128, 6, 8, 1, 1, |
| 430 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 431 | } |
| 432 | static void f32_igemm_1x8__neonfma_dup_ld64(benchmark::State& state, const char* net) { |
| 433 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__neonfma_dup_ld64, 1, 8, 1, 1, |
| 434 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEONFMA); |
| 435 | } |
| 436 | static void f32_igemm_4x8__neonfma_dup_ld128(benchmark::State& state, const char* net) { |
| 437 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__neonfma_dup_ld128, 4, 8, 1, 1, |
| 438 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEONFMA); |
| 439 | } |
| 440 | static void f32_igemm_4x8__neonfma_dup_ld64(benchmark::State& state, const char* net) { |
| 441 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__neonfma_dup_ld64, 4, 8, 1, 1, |
| 442 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEONFMA); |
| 443 | } |
| 444 | static void f32_igemm_6x8__neonfma_dup_ld64(benchmark::State& state, const char* net) { |
| 445 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__neonfma_dup_ld64, 6, 8, 1, 1, |
| 446 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEONFMA); |
| 447 | } |
| 448 | static void f32_igemm_6x8__neonfma_dup_ld128(benchmark::State& state, const char* net) { |
| 449 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__neonfma_dup_ld128, 6, 8, 1, 1, |
| 450 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEONFMA); |
| 451 | } |
| 452 | static void f32_igemm_1x8s4__neon(benchmark::State& state, const char* net) { |
| 453 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8s4__neon, 1, 8, 1, 4, |
| 454 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 455 | } |
| 456 | static void f32_igemm_4x8s4__neon(benchmark::State& state, const char* net) { |
| 457 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8s4__neon, 4, 8, 1, 4, |
| 458 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 459 | } |
| 460 | static void f32_igemm_6x8s4__neon(benchmark::State& state, const char* net) { |
| 461 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8s4__neon, 6, 8, 1, 4, |
| 462 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 463 | } |
| 464 | static void f32_igemm_8x8s4__neon(benchmark::State& state, const char* net) { |
| 465 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_8x8s4__neon, 8, 8, 1, 4, |
| 466 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEON); |
| 467 | } |
| 468 | static void f32_igemm_1x8s4__neonfma(benchmark::State& state, const char* net) { |
| 469 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8s4__neonfma, 1, 8, 1, 4, |
| 470 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEONFMA); |
| 471 | } |
| 472 | static void f32_igemm_4x8s4__neonfma(benchmark::State& state, const char* net) { |
| 473 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8s4__neonfma, 4, 8, 1, 4, |
| 474 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEONFMA); |
| 475 | } |
| 476 | static void f32_igemm_6x8s4__neonfma(benchmark::State& state, const char* net) { |
| 477 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8s4__neonfma, 6, 8, 1, 4, |
| 478 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEONFMA); |
| 479 | } |
| 480 | static void f32_igemm_8x8s4__neonfma(benchmark::State& state, const char* net) { |
| 481 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_8x8s4__neonfma, 8, 8, 1, 4, |
| 482 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckNEONFMA); |
| 483 | } |
| 484 | |
| 485 | BENCHMARK_CONV(f32_igemm_1x8__neon_lane_ld64) |
| 486 | BENCHMARK_CONV(f32_igemm_4x2__neon_lane_ld64) |
| 487 | BENCHMARK_CONV(f32_igemm_4x4__neon_lane_ld64) |
| 488 | BENCHMARK_CONV(f32_igemm_4x8__neon_lane_ld128) |
| 489 | BENCHMARK_CONV(f32_igemm_4x8__neon_lane_ld64) |
| 490 | BENCHMARK_CONV(f32_igemm_6x8__neon_lane_ld64) |
| 491 | BENCHMARK_CONV(f32_igemm_6x8__neon_lane_ld128) |
| 492 | BENCHMARK_CONV(f32_igemm_1x8__neon_dup_ld64) |
| 493 | BENCHMARK_CONV(f32_igemm_4x8__neon_dup_ld128) |
| 494 | BENCHMARK_CONV(f32_igemm_4x8__neon_dup_ld64) |
| 495 | BENCHMARK_CONV(f32_igemm_6x8__neon_dup_ld64) |
| 496 | BENCHMARK_CONV(f32_igemm_6x8__neon_dup_ld128) |
| 497 | BENCHMARK_CONV(f32_igemm_1x8__neonfma_dup_ld64) |
| 498 | BENCHMARK_CONV(f32_igemm_4x8__neonfma_dup_ld128) |
| 499 | BENCHMARK_CONV(f32_igemm_4x8__neonfma_dup_ld64) |
| 500 | BENCHMARK_CONV(f32_igemm_6x8__neonfma_dup_ld64) |
| 501 | BENCHMARK_CONV(f32_igemm_6x8__neonfma_dup_ld128) |
| 502 | BENCHMARK_CONV(f32_igemm_1x8s4__neon) |
| 503 | BENCHMARK_CONV(f32_igemm_4x8s4__neon) |
| 504 | BENCHMARK_CONV(f32_igemm_6x8s4__neon) |
| 505 | BENCHMARK_CONV(f32_igemm_8x8s4__neon) |
| 506 | BENCHMARK_CONV(f32_igemm_1x8s4__neonfma) |
| 507 | BENCHMARK_CONV(f32_igemm_4x8s4__neonfma) |
| 508 | BENCHMARK_CONV(f32_igemm_6x8s4__neonfma) |
| 509 | BENCHMARK_CONV(f32_igemm_8x8s4__neonfma) |
| 510 | #endif // XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 511 | |
| 512 | |
Marat Dukhan | 1dadbf7 | 2019-10-01 10:46:20 -0700 | [diff] [blame] | 513 | #if XNN_ARCH_X86 || XNN_ARCH_X86_64 |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 514 | static void f32_igemm_1x8__sse_load1(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 515 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__sse_load1, 1, 8, 1, 1, |
| 516 | xnn_init_f32_minmax_sse_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 517 | } |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 518 | static void f32_igemm_3x8__sse_load1(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 519 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8__sse_load1, 3, 8, 1, 1, |
| 520 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 521 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 522 | static void f32_igemm_4x8__sse_load1(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 523 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__sse_load1, 4, 8, 1, 1, |
| 524 | xnn_init_f32_minmax_sse_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 525 | } |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 526 | static void f32_igemm_5x8__sse_load1(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 527 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__sse_load1, 5, 8, 1, 1, |
| 528 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 529 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 530 | |
| 531 | static void f32_igemm_1x8__sse_dup(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 532 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__sse_dup, 1, 8, 1, 1, |
| 533 | xnn_init_f32_minmax_sse_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 534 | } |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 535 | static void f32_igemm_3x8__sse_dup(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 536 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8__sse_dup, 3, 8, 1, 1, |
| 537 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 538 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 539 | static void f32_igemm_4x8__sse_dup(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 540 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__sse_dup, 4, 8, 1, 1, |
| 541 | xnn_init_f32_minmax_sse_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 542 | } |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 543 | static void f32_igemm_5x8__sse_dup(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 544 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__sse_dup, 5, 8, 1, 1, |
| 545 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 546 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 547 | |
| 548 | static void f32_igemm_1x8s4__sse(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 549 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8s4__sse, 1, 8, 1, 4, |
| 550 | xnn_init_f32_minmax_sse_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 551 | } |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 552 | static void f32_igemm_3x8s4__sse(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 553 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8s4__sse, 3, 8, 1, 4, |
| 554 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 555 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 556 | static void f32_igemm_4x8s4__sse(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 557 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8s4__sse, 4, 8, 1, 4, |
| 558 | xnn_init_f32_minmax_sse_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 559 | } |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 560 | static void f32_igemm_5x8s4__sse(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 561 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8s4__sse, 5, 8, 1, 4, |
| 562 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 563 | } |
| 564 | |
| 565 | static void f32_igemm_1x8__sse2_dup(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 566 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__sse2_dup, 1, 8, 1, 1, |
| 567 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 568 | } |
| 569 | static void f32_igemm_3x8__sse2_dup(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 570 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8__sse2_dup, 3, 8, 1, 1, |
| 571 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 572 | } |
| 573 | static void f32_igemm_4x8__sse2_dup(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 574 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__sse2_dup, 4, 8, 1, 1, |
| 575 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 576 | } |
| 577 | static void f32_igemm_5x8__sse2_dup(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 578 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__sse2_dup, 5, 8, 1, 1, |
| 579 | xnn_init_f32_minmax_sse_params); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 580 | } |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 581 | |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 582 | static void f32_igemm_1x8__avx_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 583 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__avx_broadcast, 1, 8, 1, 1, |
| 584 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckAVX); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 585 | } |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 586 | static void f32_igemm_4x8__avx_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 587 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__avx_broadcast, 4, 8, 1, 1, |
| 588 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckAVX); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 589 | } |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 590 | static void f32_igemm_5x8__avx_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 591 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__avx_broadcast, 5, 8, 1, 1, |
| 592 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckAVX); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 593 | } |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 594 | static void f32_igemm_6x8__avx_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 595 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__avx_broadcast, 6, 8, 1, 1, |
| 596 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckAVX); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 597 | } |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 598 | static void f32_igemm_7x8__avx_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 599 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_7x8__avx_broadcast, 7, 8, 1, 1, |
| 600 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckAVX); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 601 | } |
| 602 | |
| 603 | static void f32_igemm_1x8__fma3_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 604 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x8__fma3_broadcast, 1, 8, 1, 1, |
| 605 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 606 | } |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 607 | static void f32_igemm_4x8__fma3_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 608 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__fma3_broadcast, 4, 8, 1, 1, |
| 609 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 610 | } |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 611 | static void f32_igemm_5x8__fma3_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 612 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__fma3_broadcast, 5, 8, 1, 1, |
| 613 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 614 | } |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 615 | static void f32_igemm_6x8__fma3_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 616 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__fma3_broadcast, 6, 8, 1, 1, |
| 617 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 618 | } |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 619 | static void f32_igemm_7x8__fma3_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 620 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_7x8__fma3_broadcast, 7, 8, 1, 1, |
| 621 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 622 | } |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 623 | static void f32_igemm_8x8__fma3_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 624 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_8x8__fma3_broadcast, 8, 8, 1, 1, |
| 625 | xnn_init_f32_minmax_avx_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 626 | } |
| 627 | |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 628 | static void f32_igemm_1x16__avx512f_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 629 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x16__avx512f_broadcast, 1, 16, 1, 1, |
| 630 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 631 | } |
| 632 | static void f32_igemm_4x16__avx512f_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 633 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x16__avx512f_broadcast, 4, 16, 1, 1, |
| 634 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 635 | } |
| 636 | static void f32_igemm_5x16__avx512f_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 637 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x16__avx512f_broadcast, 5, 16, 1, 1, |
| 638 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 639 | } |
| 640 | static void f32_igemm_6x16__avx512f_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 641 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x16__avx512f_broadcast, 6, 16, 1, 1, |
| 642 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 643 | } |
| 644 | static void f32_igemm_7x16__avx512f_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 645 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_7x16__avx512f_broadcast, 7, 16, 1, 1, |
| 646 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 647 | } |
| 648 | static void f32_igemm_8x16__avx512f_broadcast(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 649 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_8x16__avx512f_broadcast, 8, 16, 1, 1, |
| 650 | xnn_init_f32_minmax_scalar_params, benchmark::utils::CheckFMA3); |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 651 | } |
| 652 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 653 | BENCHMARK_CONV(f32_igemm_1x8__sse_load1) |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 654 | BENCHMARK_CONV(f32_igemm_3x8__sse_load1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 655 | BENCHMARK_CONV(f32_igemm_4x8__sse_load1) |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 656 | BENCHMARK_CONV(f32_igemm_5x8__sse_load1) |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 657 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 658 | BENCHMARK_CONV(f32_igemm_1x8__sse_dup) |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 659 | BENCHMARK_CONV(f32_igemm_3x8__sse_dup) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 660 | BENCHMARK_CONV(f32_igemm_4x8__sse_dup) |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 661 | BENCHMARK_CONV(f32_igemm_5x8__sse_dup) |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 662 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 663 | BENCHMARK_CONV(f32_igemm_1x8s4__sse) |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 664 | BENCHMARK_CONV(f32_igemm_3x8s4__sse) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 665 | BENCHMARK_CONV(f32_igemm_4x8s4__sse) |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 666 | BENCHMARK_CONV(f32_igemm_5x8s4__sse) |
| 667 | |
| 668 | BENCHMARK_CONV(f32_igemm_1x8__sse2_dup) |
| 669 | BENCHMARK_CONV(f32_igemm_3x8__sse2_dup) |
| 670 | BENCHMARK_CONV(f32_igemm_4x8__sse2_dup) |
| 671 | BENCHMARK_CONV(f32_igemm_5x8__sse2_dup) |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 672 | |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 673 | BENCHMARK_CONV(f32_igemm_1x8__avx_broadcast) |
| 674 | BENCHMARK_CONV(f32_igemm_4x8__avx_broadcast) |
| 675 | BENCHMARK_CONV(f32_igemm_5x8__avx_broadcast) |
| 676 | BENCHMARK_CONV(f32_igemm_6x8__avx_broadcast) |
| 677 | BENCHMARK_CONV(f32_igemm_7x8__avx_broadcast) |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 678 | |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 679 | BENCHMARK_CONV(f32_igemm_1x8__fma3_broadcast) |
| 680 | BENCHMARK_CONV(f32_igemm_4x8__fma3_broadcast) |
| 681 | BENCHMARK_CONV(f32_igemm_5x8__fma3_broadcast) |
| 682 | BENCHMARK_CONV(f32_igemm_6x8__fma3_broadcast) |
| 683 | BENCHMARK_CONV(f32_igemm_7x8__fma3_broadcast) |
| 684 | BENCHMARK_CONV(f32_igemm_8x8__fma3_broadcast) |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 685 | |
| 686 | BENCHMARK_CONV(f32_igemm_1x16__avx512f_broadcast) |
| 687 | BENCHMARK_CONV(f32_igemm_4x16__avx512f_broadcast) |
| 688 | BENCHMARK_CONV(f32_igemm_5x16__avx512f_broadcast) |
| 689 | BENCHMARK_CONV(f32_igemm_6x16__avx512f_broadcast) |
| 690 | BENCHMARK_CONV(f32_igemm_7x16__avx512f_broadcast) |
| 691 | BENCHMARK_CONV(f32_igemm_8x16__avx512f_broadcast) |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 692 | #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64 |
| 693 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 694 | |
Marat Dukhan | 4c61779 | 2021-12-21 15:47:58 -0800 | [diff] [blame] | 695 | #if XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 696 | static void f32_igemm_3x8__wasmsimd_arm_loadsplat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 697 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8__wasmsimd_arm_loadsplat, 3, 8, 1, 1, |
| 698 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 699 | } |
| 700 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 701 | static void f32_igemm_4x8__wasmsimd_arm_loadsplat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 702 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__wasmsimd_arm_loadsplat, 4, 8, 1, 1, |
| 703 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 704 | } |
| 705 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 706 | static void f32_igemm_5x8__wasmsimd_arm_loadsplat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 707 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__wasmsimd_arm_loadsplat, 5, 8, 1, 1, |
| 708 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 709 | } |
| 710 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 711 | static void f32_igemm_6x8__wasmsimd_arm_loadsplat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 712 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__wasmsimd_arm_loadsplat, 6, 8, 1, 1, |
| 713 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 714 | } |
| 715 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 716 | static void f32_igemm_3x8__wasmsimd_x86_loadsplat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 717 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8__wasmsimd_x86_loadsplat, 3, 8, 1, 1, |
| 718 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 719 | } |
| 720 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 721 | static void f32_igemm_4x8__wasmsimd_x86_loadsplat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 722 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__wasmsimd_x86_loadsplat, 4, 8, 1, 1, |
| 723 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 724 | } |
| 725 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 726 | static void f32_igemm_5x8__wasmsimd_x86_loadsplat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 727 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__wasmsimd_x86_loadsplat, 5, 8, 1, 1, |
| 728 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 729 | } |
| 730 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 731 | static void f32_igemm_6x8__wasmsimd_x86_loadsplat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 732 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__wasmsimd_x86_loadsplat, 6, 8, 1, 1, |
| 733 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 734 | } |
| 735 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 736 | static void f32_igemm_3x8__wasmsimd_arm_splat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 737 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8__wasmsimd_arm_splat, 3, 8, 1, 1, |
| 738 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 739 | } |
| 740 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 741 | static void f32_igemm_4x8__wasmsimd_arm_splat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 742 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__wasmsimd_arm_splat, 4, 8, 1, 1, |
| 743 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 744 | } |
| 745 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 746 | static void f32_igemm_5x8__wasmsimd_arm_splat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 747 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__wasmsimd_arm_splat, 5, 8, 1, 1, |
| 748 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 749 | } |
| 750 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 751 | static void f32_igemm_6x8__wasmsimd_arm_splat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 752 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__wasmsimd_arm_splat, 6, 8, 1, 1, |
| 753 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 754 | } |
| 755 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 756 | static void f32_igemm_3x8__wasmsimd_x86_splat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 757 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8__wasmsimd_x86_splat, 3, 8, 1, 1, |
| 758 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 759 | } |
| 760 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 761 | static void f32_igemm_4x8__wasmsimd_x86_splat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 762 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8__wasmsimd_x86_splat, 4, 8, 1, 1, |
| 763 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 764 | } |
| 765 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 766 | static void f32_igemm_5x8__wasmsimd_x86_splat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 767 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8__wasmsimd_x86_splat, 5, 8, 1, 1, |
| 768 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 769 | } |
| 770 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 771 | static void f32_igemm_6x8__wasmsimd_x86_splat(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 772 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8__wasmsimd_x86_splat, 6, 8, 1, 1, |
| 773 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 774 | } |
| 775 | |
| 776 | static void f32_igemm_3x8s4__wasmsimd_arm(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 777 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8s4__wasmsimd_arm, 3, 8, 1, 4, |
| 778 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 779 | } |
| 780 | |
| 781 | static void f32_igemm_4x8s4__wasmsimd_arm(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 782 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8s4__wasmsimd_arm, 4, 8, 1, 4, |
| 783 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 784 | } |
| 785 | |
| 786 | static void f32_igemm_5x8s4__wasmsimd_arm(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 787 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8s4__wasmsimd_arm, 5, 8, 1, 4, |
| 788 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 789 | } |
| 790 | |
| 791 | static void f32_igemm_6x8s4__wasmsimd_arm(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 792 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8s4__wasmsimd_arm, 6, 8, 1, 4, |
| 793 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 794 | } |
| 795 | |
| 796 | static void f32_igemm_3x8s4__wasmsimd_x86(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 797 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_3x8s4__wasmsimd_x86, 3, 8, 1, 4, |
| 798 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 799 | } |
| 800 | |
| 801 | static void f32_igemm_4x8s4__wasmsimd_x86(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 802 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x8s4__wasmsimd_x86, 4, 8, 1, 4, |
| 803 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 804 | } |
| 805 | |
| 806 | static void f32_igemm_5x8s4__wasmsimd_x86(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 807 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_5x8s4__wasmsimd_x86, 5, 8, 1, 4, |
| 808 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 809 | } |
| 810 | |
| 811 | static void f32_igemm_6x8s4__wasmsimd_x86(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 812 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_6x8s4__wasmsimd_x86, 6, 8, 1, 4, |
| 813 | xnn_init_f32_minmax_scalar_params); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 814 | } |
| 815 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 816 | BENCHMARK_CONV(f32_igemm_3x8__wasmsimd_arm_loadsplat) |
| 817 | BENCHMARK_CONV(f32_igemm_4x8__wasmsimd_arm_loadsplat) |
| 818 | BENCHMARK_CONV(f32_igemm_5x8__wasmsimd_arm_loadsplat) |
| 819 | BENCHMARK_CONV(f32_igemm_6x8__wasmsimd_arm_loadsplat) |
| 820 | BENCHMARK_CONV(f32_igemm_3x8__wasmsimd_x86_loadsplat) |
| 821 | BENCHMARK_CONV(f32_igemm_4x8__wasmsimd_x86_loadsplat) |
| 822 | BENCHMARK_CONV(f32_igemm_5x8__wasmsimd_x86_loadsplat) |
| 823 | BENCHMARK_CONV(f32_igemm_6x8__wasmsimd_x86_loadsplat) |
| 824 | BENCHMARK_CONV(f32_igemm_3x8__wasmsimd_arm_splat) |
| 825 | BENCHMARK_CONV(f32_igemm_4x8__wasmsimd_arm_splat) |
| 826 | BENCHMARK_CONV(f32_igemm_5x8__wasmsimd_arm_splat) |
| 827 | BENCHMARK_CONV(f32_igemm_6x8__wasmsimd_arm_splat) |
| 828 | BENCHMARK_CONV(f32_igemm_3x8__wasmsimd_x86_splat) |
| 829 | BENCHMARK_CONV(f32_igemm_4x8__wasmsimd_x86_splat) |
| 830 | BENCHMARK_CONV(f32_igemm_5x8__wasmsimd_x86_splat) |
| 831 | BENCHMARK_CONV(f32_igemm_6x8__wasmsimd_x86_splat) |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 832 | BENCHMARK_CONV(f32_igemm_3x8s4__wasmsimd_arm) |
| 833 | BENCHMARK_CONV(f32_igemm_4x8s4__wasmsimd_arm) |
| 834 | BENCHMARK_CONV(f32_igemm_5x8s4__wasmsimd_arm) |
| 835 | BENCHMARK_CONV(f32_igemm_6x8s4__wasmsimd_arm) |
| 836 | BENCHMARK_CONV(f32_igemm_3x8s4__wasmsimd_x86) |
| 837 | BENCHMARK_CONV(f32_igemm_4x8s4__wasmsimd_x86) |
| 838 | BENCHMARK_CONV(f32_igemm_5x8s4__wasmsimd_x86) |
| 839 | BENCHMARK_CONV(f32_igemm_6x8s4__wasmsimd_x86) |
Marat Dukhan | 4c61779 | 2021-12-21 15:47:58 -0800 | [diff] [blame] | 840 | #endif // XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 841 | |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 842 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 843 | static void f32_igemm_1x4__scalar(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 844 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_1x4__scalar, 1, 4, 1, 1, |
| 845 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 846 | } |
| 847 | |
| 848 | static void f32_igemm_2x4__scalar(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 849 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_2x4__scalar, 2, 4, 1, 1, |
| 850 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 851 | } |
| 852 | |
| 853 | static void f32_igemm_4x4__scalar(benchmark::State& state, const char* net) { |
Marat Dukhan | 104ae5e | 2021-05-24 13:41:57 -0700 | [diff] [blame] | 854 | IGEMMBenchmark(state, xnn_f32_igemm_minmax_ukernel_4x4__scalar, 4, 4, 1, 1, |
| 855 | xnn_init_f32_minmax_scalar_params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 856 | } |
| 857 | |
| 858 | BENCHMARK_CONV(f32_igemm_1x4__scalar) |
| 859 | BENCHMARK_CONV(f32_igemm_2x4__scalar) |
| 860 | BENCHMARK_CONV(f32_igemm_4x4__scalar) |
| 861 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 862 | #ifndef XNNPACK_BENCHMARK_NO_MAIN |
| 863 | BENCHMARK_MAIN(); |
| 864 | #endif |