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