Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -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 <cmath> |
| 8 | #include <functional> |
| 9 | #include <random> |
| 10 | #include <vector> |
| 11 | |
| 12 | #include <xnnpack.h> |
| 13 | |
| 14 | #include <benchmark/benchmark.h> |
| 15 | |
Marat Dukhan | c08cdf5 | 2019-12-09 09:17:51 -0800 | [diff] [blame] | 16 | #include "bench/end2end.h" |
Frank Barchard | e72e287 | 2019-10-31 11:12:15 -0700 | [diff] [blame] | 17 | #include "bench/utils.h" |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 18 | #include "models/models.h" |
| 19 | #include <xnnpack/gemm.h> |
| 20 | #include <xnnpack/igemm.h> |
| 21 | #include <xnnpack/params.h> |
| 22 | |
| 23 | |
| 24 | static void GEMMEnd2EndBenchmark( |
| 25 | benchmark::State& state, |
Frank Barchard | e72e287 | 2019-10-31 11:12:15 -0700 | [diff] [blame] | 26 | models::ExecutionPlanFactory model_factory, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 27 | xnn_f32_gemm_minmax_ukernel_function gemm, |
| 28 | xnn_f32_igemm_minmax_ukernel_function igemm, |
| 29 | xnn_f32_gemm_minmax_ukernel_function gemm1, |
| 30 | xnn_f32_igemm_minmax_ukernel_function igemm1, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 31 | uint8_t mr, uint8_t nr, uint8_t log2_kr = 0, uint8_t log2_sr = 0, |
| 32 | benchmark::utils::IsaCheckFunction isa_check = nullptr) |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 33 | { |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 34 | if (isa_check && !isa_check(state)) { |
| 35 | return; |
| 36 | } |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 37 | if (xnn_initialize(nullptr /* allocator */) != xnn_status_success) { |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 38 | state.SkipWithError("failed to initialize XNNPACK"); |
| 39 | return; |
| 40 | } |
| 41 | |
| 42 | // Override microkernels chosen in xnn_initialize |
Marat Dukhan | 99103dc | 2020-03-13 00:16:53 -0700 | [diff] [blame] | 43 | // Note: do not directly assign to xnn_params.f32.gemm because it breaks older gcc. |
Marat Dukhan | aefaef3 | 2020-04-09 07:09:34 -0700 | [diff] [blame] | 44 | xnn_params.f32.gemm.minmax.gemm = xnn_init_hmp_gemm_ukernel(xnn_gemm_ukernel_function(gemm)); |
| 45 | xnn_params.f32.gemm.minmax.igemm = xnn_init_hmp_igemm_ukernel(xnn_igemm_ukernel_function(igemm)); |
| 46 | xnn_params.f32.gemm.minmax.gemm1 = xnn_init_hmp_gemm_ukernel(xnn_gemm_ukernel_function(gemm1)); |
| 47 | xnn_params.f32.gemm.minmax.igemm1 = xnn_init_hmp_igemm_ukernel(xnn_igemm_ukernel_function(igemm1)); |
| 48 | xnn_params.f32.gemm.mr = mr; |
| 49 | xnn_params.f32.gemm.nr = nr; |
| 50 | xnn_params.f32.gemm.log2_kr = log2_kr; |
| 51 | xnn_params.f32.gemm.log2_sr = log2_sr; |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 52 | |
| 53 | auto execution_plan = model_factory(nullptr); |
| 54 | if (execution_plan.empty()) { |
| 55 | state.SkipWithError("failed to create a model"); |
| 56 | return; |
| 57 | } |
| 58 | |
| 59 | for (auto _ : state) { |
| 60 | for (const std::unique_ptr<xnn_operator, decltype(&xnn_delete_operator)>& op : execution_plan) { |
| 61 | xnn_status status = xnn_run_operator(op.get(), nullptr); |
| 62 | if (status != xnn_status_success) { |
| 63 | state.SkipWithError("failed to run a model"); |
| 64 | return; |
| 65 | } |
| 66 | } |
| 67 | } |
Marat Dukhan | d713e8a | 2020-12-04 14:23:12 -0800 | [diff] [blame] | 68 | |
| 69 | const uint64_t cpu_frequency = benchmark::utils::GetCurrentCpuFrequency(); |
| 70 | if (cpu_frequency != 0) { |
| 71 | state.counters["cpufreq"] = cpu_frequency; |
| 72 | } |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | #if XNN_ARCH_ARM64 && XNN_ENABLE_ASSEMBLY |
| 76 | static void f32_gemm_4x12__aarch64_neonfma_cortex_a53(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 77 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 78 | xnn_f32_gemm_minmax_ukernel_4x12__aarch64_neonfma_cortex_a53, |
| 79 | xnn_f32_igemm_minmax_ukernel_4x12__aarch64_neonfma_cortex_a53, |
| 80 | xnn_f32_gemm_minmax_ukernel_1x12__aarch64_neonfma_cortex_a53, |
| 81 | xnn_f32_igemm_minmax_ukernel_1x12__aarch64_neonfma_cortex_a53, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 82 | 4 /* mr */, 12 /* nr */); |
| 83 | } |
| 84 | |
| 85 | static void f32_gemm_4x8__aarch64_neonfma_cortex_a53(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 86 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 87 | xnn_f32_gemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a53, |
| 88 | xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a53, |
| 89 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a53, |
| 90 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a53, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 91 | 4 /* mr */, 8 /* nr */); |
| 92 | } |
| 93 | |
Frank Barchard | 8fb9055 | 2020-03-16 11:36:09 -0700 | [diff] [blame] | 94 | static void f32_gemm_4x8__aarch64_neonfma_cortex_a55(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 95 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 96 | xnn_f32_gemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a55, |
| 97 | xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a55, |
| 98 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a53, |
| 99 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a53, |
Frank Barchard | 8fb9055 | 2020-03-16 11:36:09 -0700 | [diff] [blame] | 100 | 4 /* mr */, 8 /* nr */); |
| 101 | } |
| 102 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 103 | static void f32_gemm_4x8__aarch64_neonfma_cortex_a57(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 104 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 105 | xnn_f32_gemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a57, |
| 106 | xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a57, |
| 107 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a57, |
| 108 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a57, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 109 | 4 /* mr */, 8 /* nr */); |
| 110 | } |
| 111 | |
| 112 | static void f32_gemm_4x8__aarch64_neonfma_cortex_a75(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 113 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 114 | xnn_f32_gemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a75, |
| 115 | xnn_f32_igemm_minmax_ukernel_4x8__aarch64_neonfma_cortex_a75, |
| 116 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a75, |
| 117 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a75, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 118 | 4 /* mr */, 8 /* nr */); |
| 119 | } |
| 120 | |
| 121 | static void f32_gemm_4x8__aarch64_neonfma_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 122 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 123 | xnn_f32_gemm_minmax_ukernel_4x8__aarch64_neonfma_ld64, |
| 124 | xnn_f32_igemm_minmax_ukernel_4x8__neonfma_lane_ld64, |
Frank Barchard | 3cb54f9 | 2020-04-10 10:46:08 -0700 | [diff] [blame] | 125 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_ld64, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 126 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 127 | 4 /* mr */, 8 /* nr */); |
| 128 | } |
| 129 | |
| 130 | static void f32_gemm_4x8__aarch64_neonfma_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 131 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 132 | xnn_f32_gemm_minmax_ukernel_4x8__aarch64_neonfma_ld128, |
| 133 | xnn_f32_igemm_minmax_ukernel_4x8__neonfma_lane_ld128, |
Frank Barchard | 3cb54f9 | 2020-04-10 10:46:08 -0700 | [diff] [blame] | 134 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_ld64, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 135 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 136 | 4 /* mr */, 8 /* nr */); |
| 137 | } |
| 138 | |
Frank Barchard | 387c2d1 | 2019-12-16 19:14:07 -0800 | [diff] [blame] | 139 | static void f32_gemm_5x8__aarch64_neonfma_cortex_a57(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 140 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 141 | xnn_f32_gemm_minmax_ukernel_5x8__aarch64_neonfma_cortex_a57, |
| 142 | xnn_f32_igemm_minmax_ukernel_5x8__aarch64_neonfma_cortex_a57, |
| 143 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a57, |
| 144 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a57, |
Frank Barchard | 387c2d1 | 2019-12-16 19:14:07 -0800 | [diff] [blame] | 145 | 5 /* mr */, 8 /* nr */); |
| 146 | } |
| 147 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 148 | static void f32_gemm_5x8__aarch64_neonfma_cortex_a75(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 149 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 150 | xnn_f32_gemm_minmax_ukernel_5x8__aarch64_neonfma_cortex_a75, |
| 151 | xnn_f32_igemm_minmax_ukernel_5x8__aarch64_neonfma_cortex_a75, |
| 152 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a75, |
| 153 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a75, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 154 | 5 /* mr */, 8 /* nr */); |
| 155 | } |
| 156 | |
| 157 | static void f32_gemm_6x8__aarch64_neonfma_cortex_a53(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 158 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 159 | xnn_f32_gemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a53, |
| 160 | xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a53, |
| 161 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a53, |
| 162 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a53, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 163 | 6 /* mr */, 8 /* nr */); |
| 164 | } |
| 165 | |
Frank Barchard | 91e1999 | 2020-03-09 18:46:14 -0700 | [diff] [blame] | 166 | static void f32_gemm_6x8__aarch64_neonfma_cortex_a55(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 167 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 168 | xnn_f32_gemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a55, |
| 169 | xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a55, |
| 170 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a53, |
| 171 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a53, |
Frank Barchard | 91e1999 | 2020-03-09 18:46:14 -0700 | [diff] [blame] | 172 | 6 /* mr */, 8 /* nr */); |
| 173 | } |
| 174 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 175 | static void f32_gemm_6x8__aarch64_neonfma_cortex_a73(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 176 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 177 | xnn_f32_gemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a73, |
| 178 | xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a73, |
| 179 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a75, |
| 180 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a75, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 181 | 6 /* mr */, 8 /* nr */); |
| 182 | } |
| 183 | |
Frank Barchard | 387c2d1 | 2019-12-16 19:14:07 -0800 | [diff] [blame] | 184 | static void f32_gemm_6x8__aarch64_neonfma_cortex_a57(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 185 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 186 | xnn_f32_gemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a57, |
| 187 | xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a57, |
| 188 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a57, |
| 189 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a57, |
Frank Barchard | 387c2d1 | 2019-12-16 19:14:07 -0800 | [diff] [blame] | 190 | 6 /* mr */, 8 /* nr */); |
| 191 | } |
| 192 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 193 | static void f32_gemm_6x8__aarch64_neonfma_cortex_a75(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 194 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 195 | xnn_f32_gemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a75, |
| 196 | xnn_f32_igemm_minmax_ukernel_6x8__aarch64_neonfma_cortex_a75, |
| 197 | xnn_f32_gemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a75, |
| 198 | xnn_f32_igemm_minmax_ukernel_1x8__aarch64_neonfma_cortex_a75, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 199 | 6 /* mr */, 8 /* nr */); |
| 200 | } |
| 201 | |
| 202 | static void f32_gemm_6x8__aarch64_neonfma_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 203 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 204 | xnn_f32_gemm_minmax_ukernel_6x8__aarch64_neonfma_ld64, |
| 205 | xnn_f32_igemm_minmax_ukernel_6x8__neonfma_lane_ld64, |
| 206 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
| 207 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 208 | 6 /* mr */, 8 /* nr */); |
| 209 | } |
| 210 | |
| 211 | static void f32_gemm_6x8__aarch64_neonfma_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 212 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 213 | xnn_f32_gemm_minmax_ukernel_6x8__aarch64_neonfma_ld128, |
| 214 | xnn_f32_igemm_minmax_ukernel_6x8__neonfma_lane_ld64, |
| 215 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
| 216 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 217 | 6 /* mr */, 8 /* nr */); |
| 218 | } |
| 219 | |
| 220 | static void f32_gemm_4x8__neonfma_lane_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 221 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 222 | xnn_f32_gemm_minmax_ukernel_4x8__neonfma_lane_ld64, |
| 223 | xnn_f32_igemm_minmax_ukernel_4x8__neonfma_lane_ld64, |
| 224 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
| 225 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 226 | 4 /* mr */, 8 /* nr */); |
| 227 | } |
| 228 | |
| 229 | static void f32_gemm_4x8__neonfma_lane_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 230 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 231 | xnn_f32_gemm_minmax_ukernel_4x8__neonfma_lane_ld128, |
| 232 | xnn_f32_igemm_minmax_ukernel_4x8__neonfma_lane_ld128, |
| 233 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
| 234 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 235 | 4 /* mr */, 8 /* nr */); |
| 236 | } |
| 237 | |
| 238 | static void f32_gemm_6x8__neonfma_lane_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 239 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 240 | xnn_f32_gemm_minmax_ukernel_6x8__neonfma_lane_ld64, |
| 241 | xnn_f32_igemm_minmax_ukernel_6x8__neonfma_lane_ld64, |
| 242 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
| 243 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 244 | 6 /* mr */, 8 /* nr */); |
| 245 | } |
| 246 | |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 247 | static void f32_gemm_6x8__neonfma_lane_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 248 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 249 | xnn_f32_gemm_minmax_ukernel_6x8__neonfma_lane_ld128, |
| 250 | xnn_f32_igemm_minmax_ukernel_6x8__neonfma_lane_ld128, |
| 251 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
| 252 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_lane_ld64, |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 253 | 6 /* mr */, 8 /* nr */); |
| 254 | } |
| 255 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 256 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch64_neonfma_ld64) |
| 257 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch64_neonfma_ld128); |
| 258 | BENCHMARK_FP32_END2END(f32_gemm_6x8__aarch64_neonfma_ld64); |
| 259 | BENCHMARK_FP32_END2END(f32_gemm_6x8__aarch64_neonfma_ld128); |
| 260 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch64_neonfma_cortex_a53) |
| 261 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch64_neonfma_cortex_a55) |
| 262 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch64_neonfma_cortex_a57) |
| 263 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch64_neonfma_cortex_a75) |
| 264 | BENCHMARK_FP32_END2END(f32_gemm_5x8__aarch64_neonfma_cortex_a57); |
| 265 | BENCHMARK_FP32_END2END(f32_gemm_5x8__aarch64_neonfma_cortex_a75); |
| 266 | BENCHMARK_FP32_END2END(f32_gemm_6x8__aarch64_neonfma_cortex_a53); |
| 267 | BENCHMARK_FP32_END2END(f32_gemm_6x8__aarch64_neonfma_cortex_a55); |
| 268 | BENCHMARK_FP32_END2END(f32_gemm_6x8__aarch64_neonfma_cortex_a73); |
| 269 | BENCHMARK_FP32_END2END(f32_gemm_6x8__aarch64_neonfma_cortex_a57); |
| 270 | BENCHMARK_FP32_END2END(f32_gemm_6x8__aarch64_neonfma_cortex_a75); |
| 271 | BENCHMARK_FP32_END2END(f32_gemm_4x12__aarch64_neonfma_cortex_a53) |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 272 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 273 | BENCHMARK_FP32_END2END(f32_gemm_4x8__neonfma_lane_ld64); |
| 274 | BENCHMARK_FP32_END2END(f32_gemm_4x8__neonfma_lane_ld128); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 275 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 276 | BENCHMARK_FP32_END2END(f32_gemm_6x8__neonfma_lane_ld64); |
| 277 | BENCHMARK_FP32_END2END(f32_gemm_6x8__neonfma_lane_ld128); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 278 | #endif // XNN_ARCH_ARM64 && XNN_ENABLE_ASSEMBLY |
| 279 | |
Frank Barchard | cab9493 | 2019-12-03 10:48:54 -0800 | [diff] [blame] | 280 | #if XNN_ARCH_ARM && XNN_ENABLE_ASSEMBLY |
| 281 | static void f32_gemm_4x8__aarch32_neon_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 282 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 283 | xnn_f32_gemm_minmax_ukernel_4x8__aarch32_neon_ld64, |
| 284 | xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_ld64, |
| 285 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 286 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
Frank Barchard | cab9493 | 2019-12-03 10:48:54 -0800 | [diff] [blame] | 287 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 288 | benchmark::utils::CheckNEON); |
| 289 | } |
Frank Barchard | 490febe | 2020-07-16 18:42:17 -0700 | [diff] [blame] | 290 | static void f32_gemm_4x8__aarch32_neon_cortex_a7(benchmark::State& state, models::ExecutionPlanFactory model) { |
Frank Barchard | 569561d | 2020-06-17 13:11:12 -0700 | [diff] [blame] | 291 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 490febe | 2020-07-16 18:42:17 -0700 | [diff] [blame] | 292 | xnn_f32_gemm_minmax_ukernel_4x8__aarch32_neon_cortex_a7, |
| 293 | xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_cortex_a7, |
Frank Barchard | 569561d | 2020-06-17 13:11:12 -0700 | [diff] [blame] | 294 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 295 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 296 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 297 | benchmark::utils::CheckNEON); |
| 298 | } |
Frank Barchard | 1391604 | 2019-12-11 10:56:34 -0800 | [diff] [blame] | 299 | static void f32_gemm_4x8__aarch32_neon_cortex_a53(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 300 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 301 | xnn_f32_gemm_minmax_ukernel_4x8__aarch32_neon_cortex_a53, |
| 302 | xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_cortex_a53, |
| 303 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 304 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
Frank Barchard | 1391604 | 2019-12-11 10:56:34 -0800 | [diff] [blame] | 305 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 306 | benchmark::utils::CheckNEON); |
| 307 | } |
Frank Barchard | b7dd29e | 2020-03-11 12:37:10 -0700 | [diff] [blame] | 308 | static void f32_gemm_4x8__aarch32_neon_cortex_a55(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 309 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 310 | xnn_f32_gemm_minmax_ukernel_4x8__aarch32_neon_cortex_a55, |
| 311 | xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_cortex_a55, |
| 312 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 313 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
Frank Barchard | b7dd29e | 2020-03-11 12:37:10 -0700 | [diff] [blame] | 314 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 315 | benchmark::utils::CheckNEON); |
| 316 | } |
Frank Barchard | 3e237f2 | 2019-12-04 23:08:51 -0800 | [diff] [blame] | 317 | static void f32_gemm_4x8__aarch32_neon_cortex_a75(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 318 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 319 | xnn_f32_gemm_minmax_ukernel_4x8__aarch32_neon_cortex_a75, |
| 320 | xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_cortex_a75, |
| 321 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 322 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
Frank Barchard | 3e237f2 | 2019-12-04 23:08:51 -0800 | [diff] [blame] | 323 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 324 | benchmark::utils::CheckNEON); |
| 325 | } |
Frank Barchard | 9f7d555 | 2019-12-12 10:58:10 -0800 | [diff] [blame] | 326 | static void f32_gemm_4x8__aarch32_neon_pld_cortex_a75(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 327 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 328 | xnn_f32_gemm_minmax_ukernel_4x8__aarch32_neon_pld_cortex_a75, |
| 329 | xnn_f32_igemm_minmax_ukernel_4x8__aarch32_neon_pld_cortex_a75, |
| 330 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 331 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
Frank Barchard | 9f7d555 | 2019-12-12 10:58:10 -0800 | [diff] [blame] | 332 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 333 | benchmark::utils::CheckNEON); |
| 334 | } |
Frank Barchard | cab9493 | 2019-12-03 10:48:54 -0800 | [diff] [blame] | 335 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 336 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch32_neon_ld64); |
Frank Barchard | 490febe | 2020-07-16 18:42:17 -0700 | [diff] [blame] | 337 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch32_neon_cortex_a7); |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 338 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch32_neon_cortex_a53); |
| 339 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch32_neon_cortex_a55); |
| 340 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch32_neon_cortex_a75); |
| 341 | BENCHMARK_FP32_END2END(f32_gemm_4x8__aarch32_neon_pld_cortex_a75); |
Frank Barchard | cab9493 | 2019-12-03 10:48:54 -0800 | [diff] [blame] | 342 | #endif // XNN_ARCH_ARM && XNN_ENABLE_ASSEMBLY |
| 343 | |
| 344 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 345 | #if XNN_ARCH_ARM || XNN_ARCH_ARM64 |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 346 | static void f32_gemm_4x8__neon_lane_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 347 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 348 | xnn_f32_gemm_minmax_ukernel_4x8__neon_lane_ld64, |
| 349 | xnn_f32_igemm_minmax_ukernel_4x8__neon_lane_ld64, |
| 350 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 351 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 352 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 353 | benchmark::utils::CheckNEON); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 354 | } |
| 355 | |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 356 | static void f32_gemm_4x8__neon_lane_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 357 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 358 | xnn_f32_gemm_minmax_ukernel_4x8__neon_lane_ld128, |
| 359 | xnn_f32_igemm_minmax_ukernel_4x8__neon_lane_ld128, |
| 360 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 361 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 362 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 363 | benchmark::utils::CheckNEON); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 364 | } |
| 365 | |
Frank Barchard | 91317c5 | 2019-11-22 10:54:35 -0800 | [diff] [blame] | 366 | static void f32_gemm_6x8__neon_lane_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 367 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 368 | xnn_f32_gemm_minmax_ukernel_6x8__neon_lane_ld64, |
| 369 | xnn_f32_igemm_minmax_ukernel_6x8__neon_lane_ld64, |
| 370 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 371 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 372 | 6 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 373 | benchmark::utils::CheckNEON); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 374 | } |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 375 | |
| 376 | static void f32_gemm_6x8__neon_lane_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 377 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 378 | xnn_f32_gemm_minmax_ukernel_6x8__neon_lane_ld128, |
| 379 | xnn_f32_igemm_minmax_ukernel_6x8__neon_lane_ld128, |
| 380 | xnn_f32_gemm_minmax_ukernel_1x8__neon_lane_ld64, |
| 381 | xnn_f32_igemm_minmax_ukernel_1x8__neon_lane_ld64, |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 382 | 6 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 383 | benchmark::utils::CheckNEON); |
| 384 | } |
| 385 | |
Frank Barchard | 5243bb0 | 2019-11-22 16:37:50 -0800 | [diff] [blame] | 386 | static void f32_gemm_4x8__neon_dup_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 387 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 388 | xnn_f32_gemm_minmax_ukernel_4x8__neon_dup_ld64, |
| 389 | xnn_f32_igemm_minmax_ukernel_4x8__neon_dup_ld64, |
| 390 | xnn_f32_gemm_minmax_ukernel_1x8__neon_dup_ld64, |
| 391 | xnn_f32_igemm_minmax_ukernel_1x8__neon_dup_ld64, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 392 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 393 | benchmark::utils::CheckNEON); |
Frank Barchard | 5243bb0 | 2019-11-22 16:37:50 -0800 | [diff] [blame] | 394 | } |
| 395 | |
| 396 | static void f32_gemm_4x8__neon_dup_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 397 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 398 | xnn_f32_gemm_minmax_ukernel_4x8__neon_dup_ld128, |
| 399 | xnn_f32_igemm_minmax_ukernel_4x8__neon_dup_ld128, |
| 400 | xnn_f32_gemm_minmax_ukernel_1x8__neon_dup_ld64, |
| 401 | xnn_f32_igemm_minmax_ukernel_1x8__neon_dup_ld64, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 402 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 403 | benchmark::utils::CheckNEON); |
Frank Barchard | 5243bb0 | 2019-11-22 16:37:50 -0800 | [diff] [blame] | 404 | } |
| 405 | |
| 406 | static void f32_gemm_6x8__neon_dup_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 407 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 408 | xnn_f32_gemm_minmax_ukernel_6x8__neon_dup_ld64, |
| 409 | xnn_f32_igemm_minmax_ukernel_6x8__neon_dup_ld64, |
| 410 | xnn_f32_gemm_minmax_ukernel_1x8__neon_dup_ld64, |
| 411 | xnn_f32_igemm_minmax_ukernel_1x8__neon_dup_ld64, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 412 | 6 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 413 | benchmark::utils::CheckNEON); |
Frank Barchard | 5243bb0 | 2019-11-22 16:37:50 -0800 | [diff] [blame] | 414 | } |
| 415 | |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 416 | static void f32_gemm_6x8__neon_dup_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 417 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 418 | xnn_f32_gemm_minmax_ukernel_6x8__neon_dup_ld128, |
| 419 | xnn_f32_igemm_minmax_ukernel_6x8__neon_dup_ld128, |
| 420 | xnn_f32_gemm_minmax_ukernel_1x8__neon_dup_ld64, |
| 421 | xnn_f32_igemm_minmax_ukernel_1x8__neon_dup_ld64, |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 422 | 6 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 423 | benchmark::utils::CheckNEON); |
| 424 | } |
| 425 | |
Frank Barchard | 5243bb0 | 2019-11-22 16:37:50 -0800 | [diff] [blame] | 426 | static void f32_gemm_4x8__neonfma_dup_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 427 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 428 | xnn_f32_gemm_minmax_ukernel_4x8__neonfma_dup_ld64, |
| 429 | xnn_f32_igemm_minmax_ukernel_4x8__neonfma_dup_ld64, |
| 430 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_dup_ld64, |
| 431 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_dup_ld64, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 432 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 433 | benchmark::utils::CheckNEONFMA); |
Frank Barchard | 5243bb0 | 2019-11-22 16:37:50 -0800 | [diff] [blame] | 434 | } |
| 435 | |
| 436 | static void f32_gemm_4x8__neonfma_dup_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 437 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 438 | xnn_f32_gemm_minmax_ukernel_4x8__neonfma_dup_ld128, |
| 439 | xnn_f32_igemm_minmax_ukernel_4x8__neonfma_dup_ld128, |
| 440 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_dup_ld64, |
| 441 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_dup_ld64, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 442 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 443 | benchmark::utils::CheckNEONFMA); |
Frank Barchard | 5243bb0 | 2019-11-22 16:37:50 -0800 | [diff] [blame] | 444 | } |
| 445 | |
| 446 | static void f32_gemm_6x8__neonfma_dup_ld64(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 447 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 448 | xnn_f32_gemm_minmax_ukernel_6x8__neonfma_dup_ld64, |
| 449 | xnn_f32_igemm_minmax_ukernel_6x8__neonfma_dup_ld64, |
| 450 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_dup_ld64, |
| 451 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_dup_ld64, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 452 | 6 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 453 | benchmark::utils::CheckNEONFMA); |
Frank Barchard | 5243bb0 | 2019-11-22 16:37:50 -0800 | [diff] [blame] | 454 | } |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 455 | |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 456 | static void f32_gemm_6x8__neonfma_dup_ld128(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 457 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 458 | xnn_f32_gemm_minmax_ukernel_6x8__neonfma_dup_ld128, |
| 459 | xnn_f32_igemm_minmax_ukernel_6x8__neonfma_dup_ld128, |
| 460 | xnn_f32_gemm_minmax_ukernel_1x8__neonfma_dup_ld64, |
| 461 | xnn_f32_igemm_minmax_ukernel_1x8__neonfma_dup_ld64, |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 462 | 6 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 463 | benchmark::utils::CheckNEONFMA); |
| 464 | } |
| 465 | |
Frank Barchard | df06d80 | 2019-11-20 15:53:46 -0800 | [diff] [blame] | 466 | static void f32_gemm_4x8s4__neon(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 467 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 468 | xnn_f32_gemm_minmax_ukernel_4x8s4__neon, |
| 469 | xnn_f32_igemm_minmax_ukernel_4x8s4__neon, |
| 470 | xnn_f32_gemm_minmax_ukernel_1x8s4__neon, |
| 471 | xnn_f32_igemm_minmax_ukernel_1x8s4__neon, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 472 | 4 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */, |
| 473 | benchmark::utils::CheckNEON); |
Frank Barchard | df06d80 | 2019-11-20 15:53:46 -0800 | [diff] [blame] | 474 | } |
| 475 | |
| 476 | static void f32_gemm_4x8s4__neonfma(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 477 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 478 | xnn_f32_gemm_minmax_ukernel_4x8s4__neonfma, |
| 479 | xnn_f32_igemm_minmax_ukernel_4x8s4__neonfma, |
| 480 | xnn_f32_gemm_minmax_ukernel_1x8s4__neonfma, |
| 481 | xnn_f32_igemm_minmax_ukernel_1x8s4__neonfma, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 482 | 4 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */, |
| 483 | benchmark::utils::CheckNEONFMA); |
Frank Barchard | df06d80 | 2019-11-20 15:53:46 -0800 | [diff] [blame] | 484 | } |
| 485 | |
| 486 | static void f32_gemm_6x8s4__neon(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 487 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 488 | xnn_f32_gemm_minmax_ukernel_6x8s4__neon, |
| 489 | xnn_f32_igemm_minmax_ukernel_6x8s4__neon, |
| 490 | xnn_f32_gemm_minmax_ukernel_1x8s4__neon, |
| 491 | xnn_f32_igemm_minmax_ukernel_1x8s4__neon, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 492 | 6 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */, |
| 493 | benchmark::utils::CheckNEON); |
Frank Barchard | df06d80 | 2019-11-20 15:53:46 -0800 | [diff] [blame] | 494 | } |
| 495 | |
| 496 | static void f32_gemm_6x8s4__neonfma(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 497 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 498 | xnn_f32_gemm_minmax_ukernel_6x8s4__neonfma, |
| 499 | xnn_f32_igemm_minmax_ukernel_6x8s4__neonfma, |
| 500 | xnn_f32_gemm_minmax_ukernel_1x8s4__neonfma, |
| 501 | xnn_f32_igemm_minmax_ukernel_1x8s4__neonfma, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 502 | 6 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */, |
| 503 | benchmark::utils::CheckNEONFMA); |
Frank Barchard | df06d80 | 2019-11-20 15:53:46 -0800 | [diff] [blame] | 504 | } |
| 505 | |
| 506 | static void f32_gemm_8x8s4__neon(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 507 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 508 | xnn_f32_gemm_minmax_ukernel_8x8s4__neon, |
| 509 | xnn_f32_igemm_minmax_ukernel_8x8s4__neon, |
| 510 | xnn_f32_gemm_minmax_ukernel_1x8s4__neon, |
| 511 | xnn_f32_igemm_minmax_ukernel_1x8s4__neon, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 512 | 8 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */, |
| 513 | benchmark::utils::CheckNEON); |
Frank Barchard | df06d80 | 2019-11-20 15:53:46 -0800 | [diff] [blame] | 514 | } |
| 515 | |
| 516 | static void f32_gemm_8x8s4__neonfma(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 517 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 518 | xnn_f32_gemm_minmax_ukernel_8x8s4__neonfma, |
| 519 | xnn_f32_igemm_minmax_ukernel_8x8s4__neonfma, |
| 520 | xnn_f32_gemm_minmax_ukernel_1x8s4__neonfma, |
| 521 | xnn_f32_igemm_minmax_ukernel_1x8s4__neonfma, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 522 | 8 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */, |
| 523 | benchmark::utils::CheckNEONFMA); |
Frank Barchard | df06d80 | 2019-11-20 15:53:46 -0800 | [diff] [blame] | 524 | } |
| 525 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 526 | BENCHMARK_FP32_END2END(f32_gemm_4x8__neon_lane_ld64); |
| 527 | BENCHMARK_FP32_END2END(f32_gemm_4x8__neon_lane_ld128); |
| 528 | BENCHMARK_FP32_END2END(f32_gemm_6x8__neon_lane_ld64); |
| 529 | BENCHMARK_FP32_END2END(f32_gemm_6x8__neon_lane_ld128); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 530 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 531 | BENCHMARK_FP32_END2END(f32_gemm_4x8__neon_dup_ld64); |
| 532 | BENCHMARK_FP32_END2END(f32_gemm_4x8__neon_dup_ld128); |
| 533 | BENCHMARK_FP32_END2END(f32_gemm_6x8__neon_dup_ld64); |
| 534 | BENCHMARK_FP32_END2END(f32_gemm_6x8__neon_dup_ld128); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 535 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 536 | BENCHMARK_FP32_END2END(f32_gemm_4x8__neonfma_dup_ld64); |
| 537 | BENCHMARK_FP32_END2END(f32_gemm_4x8__neonfma_dup_ld128); |
| 538 | BENCHMARK_FP32_END2END(f32_gemm_6x8__neonfma_dup_ld64); |
| 539 | BENCHMARK_FP32_END2END(f32_gemm_6x8__neonfma_dup_ld128); |
Frank Barchard | df06d80 | 2019-11-20 15:53:46 -0800 | [diff] [blame] | 540 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 541 | BENCHMARK_FP32_END2END(f32_gemm_4x8s4__neon); |
| 542 | BENCHMARK_FP32_END2END(f32_gemm_6x8s4__neon); |
| 543 | BENCHMARK_FP32_END2END(f32_gemm_8x8s4__neon); |
Frank Barchard | 69172d9 | 2019-11-26 16:22:39 -0800 | [diff] [blame] | 544 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 545 | BENCHMARK_FP32_END2END(f32_gemm_4x8s4__neonfma); |
| 546 | BENCHMARK_FP32_END2END(f32_gemm_6x8s4__neonfma); |
| 547 | BENCHMARK_FP32_END2END(f32_gemm_8x8s4__neonfma); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 548 | #endif // XNN_ARCH_ARM || XNN_ARCH_ARM64 |
| 549 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 550 | #if XNN_ARCH_X86 || XNN_ARCH_X86_64 |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 551 | static void f32_gemm_3x8__sse_load1(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 552 | GEMMEnd2EndBenchmark(state, model, |
| 553 | xnn_f32_gemm_minmax_ukernel_3x8__sse_load1, |
| 554 | xnn_f32_igemm_minmax_ukernel_3x8__sse_load1, |
| 555 | xnn_f32_gemm_minmax_ukernel_1x8__sse_load1, |
| 556 | xnn_f32_igemm_minmax_ukernel_1x8__sse_load1, |
| 557 | 3 /* mr */, 8 /* nr */); |
| 558 | } |
| 559 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 560 | static void f32_gemm_4x8__sse_load1(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 561 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 562 | xnn_f32_gemm_minmax_ukernel_4x8__sse_load1, |
| 563 | xnn_f32_igemm_minmax_ukernel_4x8__sse_load1, |
| 564 | xnn_f32_gemm_minmax_ukernel_1x8__sse_load1, |
| 565 | xnn_f32_igemm_minmax_ukernel_1x8__sse_load1, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 566 | 4 /* mr */, 8 /* nr */); |
| 567 | } |
| 568 | |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 569 | static void f32_gemm_5x8__sse_load1(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 570 | GEMMEnd2EndBenchmark(state, model, |
| 571 | xnn_f32_gemm_minmax_ukernel_5x8__sse_load1, |
| 572 | xnn_f32_igemm_minmax_ukernel_5x8__sse_load1, |
| 573 | xnn_f32_gemm_minmax_ukernel_1x8__sse_load1, |
| 574 | xnn_f32_igemm_minmax_ukernel_1x8__sse_load1, |
| 575 | 5 /* mr */, 8 /* nr */); |
| 576 | } |
| 577 | |
| 578 | static void f32_gemm_3x8__sse_dup(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 579 | GEMMEnd2EndBenchmark(state, model, |
| 580 | xnn_f32_gemm_minmax_ukernel_3x8__sse_dup, |
| 581 | xnn_f32_igemm_minmax_ukernel_3x8__sse_dup, |
| 582 | xnn_f32_gemm_minmax_ukernel_1x8__sse_dup, |
| 583 | xnn_f32_igemm_minmax_ukernel_1x8__sse_dup, |
| 584 | 3 /* mr */, 8 /* nr */); |
| 585 | } |
| 586 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 587 | static void f32_gemm_4x8__sse_dup(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 588 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 589 | xnn_f32_gemm_minmax_ukernel_4x8__sse_dup, |
| 590 | xnn_f32_igemm_minmax_ukernel_4x8__sse_dup, |
| 591 | xnn_f32_gemm_minmax_ukernel_1x8__sse_dup, |
| 592 | xnn_f32_igemm_minmax_ukernel_1x8__sse_dup, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 593 | 4 /* mr */, 8 /* nr */); |
| 594 | } |
| 595 | |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 596 | static void f32_gemm_5x8__sse_dup(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 597 | GEMMEnd2EndBenchmark(state, model, |
| 598 | xnn_f32_gemm_minmax_ukernel_5x8__sse_dup, |
| 599 | xnn_f32_igemm_minmax_ukernel_5x8__sse_dup, |
| 600 | xnn_f32_gemm_minmax_ukernel_1x8__sse_dup, |
| 601 | xnn_f32_igemm_minmax_ukernel_1x8__sse_dup, |
| 602 | 5 /* mr */, 8 /* nr */); |
| 603 | } |
| 604 | |
| 605 | static void f32_gemm_3x8s4__sse(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 606 | GEMMEnd2EndBenchmark(state, model, |
| 607 | xnn_f32_gemm_minmax_ukernel_3x8s4__sse, |
| 608 | xnn_f32_igemm_minmax_ukernel_3x8s4__sse, |
| 609 | xnn_f32_gemm_minmax_ukernel_1x8s4__sse, |
| 610 | xnn_f32_igemm_minmax_ukernel_1x8s4__sse, |
| 611 | 3 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 612 | } |
| 613 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 614 | static void f32_gemm_4x8s4__sse(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 615 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 616 | xnn_f32_gemm_minmax_ukernel_4x8s4__sse, |
| 617 | xnn_f32_igemm_minmax_ukernel_4x8s4__sse, |
| 618 | xnn_f32_gemm_minmax_ukernel_1x8s4__sse, |
| 619 | xnn_f32_igemm_minmax_ukernel_1x8s4__sse, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 620 | 4 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 621 | } |
| 622 | |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 623 | static void f32_gemm_5x8s4__sse(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 624 | GEMMEnd2EndBenchmark(state, model, |
| 625 | xnn_f32_gemm_minmax_ukernel_5x8s4__sse, |
| 626 | xnn_f32_igemm_minmax_ukernel_5x8s4__sse, |
| 627 | xnn_f32_gemm_minmax_ukernel_1x8s4__sse, |
| 628 | xnn_f32_igemm_minmax_ukernel_1x8s4__sse, |
| 629 | 5 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 630 | } |
| 631 | |
| 632 | static void f32_gemm_3x8__sse2_dup(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 633 | GEMMEnd2EndBenchmark(state, model, |
| 634 | xnn_f32_gemm_minmax_ukernel_3x8__sse2_dup, |
| 635 | xnn_f32_igemm_minmax_ukernel_3x8__sse2_dup, |
| 636 | xnn_f32_gemm_minmax_ukernel_1x8__sse2_dup, |
| 637 | xnn_f32_igemm_minmax_ukernel_1x8__sse2_dup, |
| 638 | 3 /* mr */, 8 /* nr */); |
| 639 | } |
| 640 | |
| 641 | static void f32_gemm_4x8__sse2_dup(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 642 | GEMMEnd2EndBenchmark(state, model, |
| 643 | xnn_f32_gemm_minmax_ukernel_4x8__sse2_dup, |
| 644 | xnn_f32_igemm_minmax_ukernel_4x8__sse2_dup, |
| 645 | xnn_f32_gemm_minmax_ukernel_1x8__sse2_dup, |
| 646 | xnn_f32_igemm_minmax_ukernel_1x8__sse2_dup, |
| 647 | 4 /* mr */, 8 /* nr */); |
| 648 | } |
| 649 | |
| 650 | static void f32_gemm_5x8__sse2_dup(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 651 | GEMMEnd2EndBenchmark(state, model, |
| 652 | xnn_f32_gemm_minmax_ukernel_5x8__sse2_dup, |
| 653 | xnn_f32_igemm_minmax_ukernel_5x8__sse2_dup, |
| 654 | xnn_f32_gemm_minmax_ukernel_1x8__sse2_dup, |
| 655 | xnn_f32_igemm_minmax_ukernel_1x8__sse2_dup, |
| 656 | 5 /* mr */, 8 /* nr */); |
| 657 | } |
| 658 | |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 659 | static void f32_gemm_4x8__avx_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 660 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 661 | xnn_f32_gemm_minmax_ukernel_4x8__avx_broadcast, |
| 662 | xnn_f32_igemm_minmax_ukernel_4x8__avx_broadcast, |
| 663 | xnn_f32_gemm_minmax_ukernel_1x8__avx_broadcast, |
| 664 | xnn_f32_igemm_minmax_ukernel_1x8__avx_broadcast, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 665 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 666 | benchmark::utils::CheckAVX); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 667 | } |
| 668 | |
| 669 | static void f32_gemm_5x8__avx_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 670 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 671 | xnn_f32_gemm_minmax_ukernel_5x8__avx_broadcast, |
| 672 | xnn_f32_igemm_minmax_ukernel_5x8__avx_broadcast, |
| 673 | xnn_f32_gemm_minmax_ukernel_1x8__avx_broadcast, |
| 674 | xnn_f32_igemm_minmax_ukernel_1x8__avx_broadcast, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 675 | 5 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 676 | benchmark::utils::CheckAVX); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 677 | } |
| 678 | |
| 679 | static void f32_gemm_6x8__avx_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 680 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 681 | xnn_f32_gemm_minmax_ukernel_6x8__avx_broadcast, |
| 682 | xnn_f32_igemm_minmax_ukernel_6x8__avx_broadcast, |
| 683 | xnn_f32_gemm_minmax_ukernel_1x8__avx_broadcast, |
| 684 | xnn_f32_igemm_minmax_ukernel_1x8__avx_broadcast, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 685 | 6 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 686 | benchmark::utils::CheckAVX); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 687 | } |
| 688 | |
| 689 | static void f32_gemm_7x8__avx_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 690 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 691 | xnn_f32_gemm_minmax_ukernel_7x8__avx_broadcast, |
| 692 | xnn_f32_igemm_minmax_ukernel_7x8__avx_broadcast, |
| 693 | xnn_f32_gemm_minmax_ukernel_1x8__avx_broadcast, |
| 694 | xnn_f32_igemm_minmax_ukernel_1x8__avx_broadcast, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 695 | 7 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 696 | benchmark::utils::CheckAVX); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 697 | } |
| 698 | |
Marat Dukhan | eccfd71 | 2019-12-08 16:49:27 -0800 | [diff] [blame] | 699 | static void f32_gemm_3x16__avx_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 700 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 701 | xnn_f32_gemm_minmax_ukernel_3x16__avx_broadcast, |
| 702 | xnn_f32_igemm_minmax_ukernel_3x16__avx_broadcast, |
| 703 | xnn_f32_gemm_minmax_ukernel_1x16__avx_broadcast, |
| 704 | xnn_f32_igemm_minmax_ukernel_1x16__avx_broadcast, |
Marat Dukhan | eccfd71 | 2019-12-08 16:49:27 -0800 | [diff] [blame] | 705 | 3 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 706 | benchmark::utils::CheckAVX); |
| 707 | } |
| 708 | |
| 709 | static void f32_gemm_4x16__avx_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 710 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 711 | xnn_f32_gemm_minmax_ukernel_4x16__avx_broadcast, |
| 712 | xnn_f32_igemm_minmax_ukernel_4x16__avx_broadcast, |
| 713 | xnn_f32_gemm_minmax_ukernel_1x16__avx_broadcast, |
| 714 | xnn_f32_igemm_minmax_ukernel_1x16__avx_broadcast, |
Marat Dukhan | eccfd71 | 2019-12-08 16:49:27 -0800 | [diff] [blame] | 715 | 4 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 716 | benchmark::utils::CheckAVX); |
| 717 | } |
| 718 | |
| 719 | static void f32_gemm_5x16__avx_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 720 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 721 | xnn_f32_gemm_minmax_ukernel_5x16__avx_broadcast, |
| 722 | xnn_f32_igemm_minmax_ukernel_5x16__avx_broadcast, |
| 723 | xnn_f32_gemm_minmax_ukernel_1x16__avx_broadcast, |
| 724 | xnn_f32_igemm_minmax_ukernel_1x16__avx_broadcast, |
Marat Dukhan | eccfd71 | 2019-12-08 16:49:27 -0800 | [diff] [blame] | 725 | 5 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 726 | benchmark::utils::CheckAVX); |
| 727 | } |
| 728 | |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 729 | static void f32_gemm_4x8__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 730 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 731 | xnn_f32_gemm_minmax_ukernel_4x8__fma3_broadcast, |
| 732 | xnn_f32_igemm_minmax_ukernel_4x8__fma3_broadcast, |
| 733 | xnn_f32_gemm_minmax_ukernel_1x8__fma3_broadcast, |
| 734 | xnn_f32_igemm_minmax_ukernel_1x8__fma3_broadcast, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 735 | 4 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 736 | benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 737 | } |
| 738 | |
| 739 | static void f32_gemm_5x8__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 740 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 741 | xnn_f32_gemm_minmax_ukernel_5x8__fma3_broadcast, |
| 742 | xnn_f32_igemm_minmax_ukernel_5x8__fma3_broadcast, |
| 743 | xnn_f32_gemm_minmax_ukernel_1x8__fma3_broadcast, |
| 744 | xnn_f32_igemm_minmax_ukernel_1x8__fma3_broadcast, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 745 | 5 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 746 | benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 747 | } |
| 748 | |
| 749 | static void f32_gemm_6x8__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 750 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 751 | xnn_f32_gemm_minmax_ukernel_6x8__fma3_broadcast, |
| 752 | xnn_f32_igemm_minmax_ukernel_6x8__fma3_broadcast, |
| 753 | xnn_f32_gemm_minmax_ukernel_1x8__fma3_broadcast, |
| 754 | xnn_f32_igemm_minmax_ukernel_1x8__fma3_broadcast, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 755 | 6 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 756 | benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 757 | } |
| 758 | |
| 759 | static void f32_gemm_7x8__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 760 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 761 | xnn_f32_gemm_minmax_ukernel_7x8__fma3_broadcast, |
| 762 | xnn_f32_igemm_minmax_ukernel_7x8__fma3_broadcast, |
| 763 | xnn_f32_gemm_minmax_ukernel_1x8__fma3_broadcast, |
| 764 | xnn_f32_igemm_minmax_ukernel_1x8__fma3_broadcast, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 765 | 7 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 766 | benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 767 | } |
| 768 | |
| 769 | static void f32_gemm_8x8__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 770 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 771 | xnn_f32_gemm_minmax_ukernel_8x8__fma3_broadcast, |
| 772 | xnn_f32_igemm_minmax_ukernel_8x8__fma3_broadcast, |
| 773 | xnn_f32_gemm_minmax_ukernel_1x8__fma3_broadcast, |
| 774 | xnn_f32_igemm_minmax_ukernel_1x8__fma3_broadcast, |
Marat Dukhan | c8466f5 | 2019-11-25 18:01:10 -0800 | [diff] [blame] | 775 | 8 /* mr */, 8 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 776 | benchmark::utils::CheckFMA3); |
Marat Dukhan | fda12b8 | 2019-11-21 12:27:59 -0800 | [diff] [blame] | 777 | } |
| 778 | |
Marat Dukhan | eccfd71 | 2019-12-08 16:49:27 -0800 | [diff] [blame] | 779 | static void f32_gemm_3x16__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 780 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 781 | xnn_f32_gemm_minmax_ukernel_3x16__fma3_broadcast, |
| 782 | xnn_f32_igemm_minmax_ukernel_3x16__fma3_broadcast, |
| 783 | xnn_f32_gemm_minmax_ukernel_1x16__fma3_broadcast, |
| 784 | xnn_f32_igemm_minmax_ukernel_1x16__fma3_broadcast, |
Marat Dukhan | eccfd71 | 2019-12-08 16:49:27 -0800 | [diff] [blame] | 785 | 3 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 786 | benchmark::utils::CheckFMA3); |
| 787 | } |
| 788 | |
| 789 | static void f32_gemm_4x16__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 790 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 791 | xnn_f32_gemm_minmax_ukernel_4x16__fma3_broadcast, |
| 792 | xnn_f32_igemm_minmax_ukernel_4x16__fma3_broadcast, |
| 793 | xnn_f32_gemm_minmax_ukernel_1x16__fma3_broadcast, |
| 794 | xnn_f32_igemm_minmax_ukernel_1x16__fma3_broadcast, |
Marat Dukhan | eccfd71 | 2019-12-08 16:49:27 -0800 | [diff] [blame] | 795 | 4 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 796 | benchmark::utils::CheckFMA3); |
| 797 | } |
| 798 | |
| 799 | static void f32_gemm_5x16__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 800 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 801 | xnn_f32_gemm_minmax_ukernel_5x16__fma3_broadcast, |
| 802 | xnn_f32_igemm_minmax_ukernel_5x16__fma3_broadcast, |
| 803 | xnn_f32_gemm_minmax_ukernel_1x16__fma3_broadcast, |
| 804 | xnn_f32_igemm_minmax_ukernel_1x16__fma3_broadcast, |
Marat Dukhan | eccfd71 | 2019-12-08 16:49:27 -0800 | [diff] [blame] | 805 | 5 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 806 | benchmark::utils::CheckFMA3); |
| 807 | } |
| 808 | |
Marat Dukhan | 2712132 | 2019-12-09 14:57:40 -0800 | [diff] [blame] | 809 | static void f32_gemm_3x16s4__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 810 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 811 | xnn_f32_gemm_minmax_ukernel_3x16s4__fma3_broadcast, |
| 812 | xnn_f32_igemm_minmax_ukernel_3x16s4__fma3_broadcast, |
| 813 | xnn_f32_gemm_minmax_ukernel_1x16s4__fma3_broadcast, |
| 814 | xnn_f32_igemm_minmax_ukernel_1x16s4__fma3_broadcast, |
Marat Dukhan | 2712132 | 2019-12-09 14:57:40 -0800 | [diff] [blame] | 815 | 3 /* mr */, 16 /* nr */, 0 /* log2_kr */, 2 /* log2_sr */, |
| 816 | benchmark::utils::CheckFMA3); |
| 817 | } |
| 818 | |
| 819 | static void f32_gemm_4x16s4__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 820 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 821 | xnn_f32_gemm_minmax_ukernel_4x16s4__fma3_broadcast, |
| 822 | xnn_f32_igemm_minmax_ukernel_4x16s4__fma3_broadcast, |
| 823 | xnn_f32_gemm_minmax_ukernel_1x16s4__fma3_broadcast, |
| 824 | xnn_f32_igemm_minmax_ukernel_1x16s4__fma3_broadcast, |
Marat Dukhan | 2712132 | 2019-12-09 14:57:40 -0800 | [diff] [blame] | 825 | 4 /* mr */, 16 /* nr */, 0 /* log2_kr */, 2 /* log2_sr */, |
| 826 | benchmark::utils::CheckFMA3); |
| 827 | } |
| 828 | |
| 829 | static void f32_gemm_5x16s4__fma3_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 830 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 831 | xnn_f32_gemm_minmax_ukernel_5x16s4__fma3_broadcast, |
| 832 | xnn_f32_igemm_minmax_ukernel_5x16s4__fma3_broadcast, |
| 833 | xnn_f32_gemm_minmax_ukernel_1x16s4__fma3_broadcast, |
| 834 | xnn_f32_igemm_minmax_ukernel_1x16s4__fma3_broadcast, |
Marat Dukhan | 2712132 | 2019-12-09 14:57:40 -0800 | [diff] [blame] | 835 | 5 /* mr */, 16 /* nr */, 0 /* log2_kr */, 2 /* log2_sr */, |
| 836 | benchmark::utils::CheckFMA3); |
| 837 | } |
| 838 | |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 839 | static void f32_gemm_4x16__avx512f_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 840 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 841 | xnn_f32_gemm_minmax_ukernel_4x16__avx512f_broadcast, |
| 842 | xnn_f32_igemm_minmax_ukernel_4x16__avx512f_broadcast, |
| 843 | xnn_f32_gemm_minmax_ukernel_1x16__avx512f_broadcast, |
| 844 | xnn_f32_igemm_minmax_ukernel_1x16__avx512f_broadcast, |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 845 | 4 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 846 | benchmark::utils::CheckAVX512F); |
| 847 | } |
| 848 | |
| 849 | static void f32_gemm_5x16__avx512f_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 850 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 851 | xnn_f32_gemm_minmax_ukernel_5x16__avx512f_broadcast, |
| 852 | xnn_f32_igemm_minmax_ukernel_5x16__avx512f_broadcast, |
| 853 | xnn_f32_gemm_minmax_ukernel_1x16__avx512f_broadcast, |
| 854 | xnn_f32_igemm_minmax_ukernel_1x16__avx512f_broadcast, |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 855 | 5 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 856 | benchmark::utils::CheckAVX512F); |
| 857 | } |
| 858 | |
| 859 | static void f32_gemm_6x16__avx512f_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 860 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 861 | xnn_f32_gemm_minmax_ukernel_6x16__avx512f_broadcast, |
| 862 | xnn_f32_igemm_minmax_ukernel_6x16__avx512f_broadcast, |
| 863 | xnn_f32_gemm_minmax_ukernel_1x16__avx512f_broadcast, |
| 864 | xnn_f32_igemm_minmax_ukernel_1x16__avx512f_broadcast, |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 865 | 6 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 866 | benchmark::utils::CheckAVX512F); |
| 867 | } |
| 868 | |
| 869 | static void f32_gemm_7x16__avx512f_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 870 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 871 | xnn_f32_gemm_minmax_ukernel_7x16__avx512f_broadcast, |
| 872 | xnn_f32_igemm_minmax_ukernel_7x16__avx512f_broadcast, |
| 873 | xnn_f32_gemm_minmax_ukernel_1x16__avx512f_broadcast, |
| 874 | xnn_f32_igemm_minmax_ukernel_1x16__avx512f_broadcast, |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 875 | 7 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 876 | benchmark::utils::CheckAVX512F); |
| 877 | } |
| 878 | |
| 879 | static void f32_gemm_8x16__avx512f_broadcast(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 880 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 881 | xnn_f32_gemm_minmax_ukernel_8x16__avx512f_broadcast, |
| 882 | xnn_f32_igemm_minmax_ukernel_8x16__avx512f_broadcast, |
| 883 | xnn_f32_gemm_minmax_ukernel_1x16__avx512f_broadcast, |
| 884 | xnn_f32_igemm_minmax_ukernel_1x16__avx512f_broadcast, |
Marat Dukhan | 0f349c4 | 2019-11-27 11:58:54 -0800 | [diff] [blame] | 885 | 8 /* mr */, 16 /* nr */, 0 /* log2_kr */, 0 /* log2_sr */, |
| 886 | benchmark::utils::CheckAVX512F); |
| 887 | } |
| 888 | |
Frank Barchard | 4c032f3 | 2021-02-10 15:18:49 -0800 | [diff] [blame] | 889 | BENCHMARK_FP32_END2END(f32_gemm_4x16__avx512f_broadcast); |
| 890 | BENCHMARK_FP32_END2END(f32_gemm_5x16__avx512f_broadcast); |
| 891 | BENCHMARK_FP32_END2END(f32_gemm_6x16__avx512f_broadcast); |
| 892 | BENCHMARK_FP32_END2END(f32_gemm_7x16__avx512f_broadcast); |
| 893 | BENCHMARK_FP32_END2END(f32_gemm_8x16__avx512f_broadcast); |
| 894 | |
| 895 | BENCHMARK_FP32_END2END(f32_gemm_3x16s4__fma3_broadcast); |
| 896 | BENCHMARK_FP32_END2END(f32_gemm_4x16s4__fma3_broadcast); |
| 897 | BENCHMARK_FP32_END2END(f32_gemm_5x16s4__fma3_broadcast); |
| 898 | |
| 899 | BENCHMARK_FP32_END2END(f32_gemm_4x8__fma3_broadcast); |
| 900 | BENCHMARK_FP32_END2END(f32_gemm_5x8__fma3_broadcast); |
| 901 | BENCHMARK_FP32_END2END(f32_gemm_6x8__fma3_broadcast); |
| 902 | BENCHMARK_FP32_END2END(f32_gemm_7x8__fma3_broadcast); |
| 903 | BENCHMARK_FP32_END2END(f32_gemm_8x8__fma3_broadcast); |
| 904 | BENCHMARK_FP32_END2END(f32_gemm_3x16__fma3_broadcast); |
| 905 | BENCHMARK_FP32_END2END(f32_gemm_4x16__fma3_broadcast); |
| 906 | BENCHMARK_FP32_END2END(f32_gemm_5x16__fma3_broadcast); |
| 907 | |
| 908 | BENCHMARK_FP32_END2END(f32_gemm_4x8__avx_broadcast); |
| 909 | BENCHMARK_FP32_END2END(f32_gemm_5x8__avx_broadcast); |
| 910 | BENCHMARK_FP32_END2END(f32_gemm_6x8__avx_broadcast); |
| 911 | BENCHMARK_FP32_END2END(f32_gemm_7x8__avx_broadcast); |
| 912 | BENCHMARK_FP32_END2END(f32_gemm_3x16__avx_broadcast); |
| 913 | BENCHMARK_FP32_END2END(f32_gemm_4x16__avx_broadcast); |
| 914 | BENCHMARK_FP32_END2END(f32_gemm_5x16__avx_broadcast); |
| 915 | |
| 916 | BENCHMARK_FP32_END2END(f32_gemm_3x8__sse2_dup); |
| 917 | BENCHMARK_FP32_END2END(f32_gemm_4x8__sse2_dup); |
| 918 | BENCHMARK_FP32_END2END(f32_gemm_5x8__sse2_dup); |
| 919 | |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 920 | BENCHMARK_FP32_END2END(f32_gemm_3x8__sse_load1); |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 921 | BENCHMARK_FP32_END2END(f32_gemm_4x8__sse_load1); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 922 | BENCHMARK_FP32_END2END(f32_gemm_5x8__sse_load1); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 923 | |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 924 | BENCHMARK_FP32_END2END(f32_gemm_3x8__sse_dup); |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 925 | BENCHMARK_FP32_END2END(f32_gemm_4x8__sse_dup); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 926 | BENCHMARK_FP32_END2END(f32_gemm_5x8__sse_dup); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 927 | |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 928 | BENCHMARK_FP32_END2END(f32_gemm_3x8s4__sse); |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 929 | BENCHMARK_FP32_END2END(f32_gemm_4x8s4__sse); |
Marat Dukhan | 802fcae | 2020-12-11 14:37:25 -0800 | [diff] [blame] | 930 | BENCHMARK_FP32_END2END(f32_gemm_5x8s4__sse); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 931 | #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64 |
| 932 | |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 933 | #if XNN_ARCH_WASMSIMD |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 934 | static void f32_gemm_3x8__wasmsimd_arm_loadsplat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 935 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 936 | xnn_f32_gemm_minmax_ukernel_3x8__wasmsimd_arm_loadsplat, |
| 937 | xnn_f32_igemm_minmax_ukernel_3x8__wasmsimd_arm_loadsplat, |
| 938 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_arm_loadsplat, |
| 939 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_arm_loadsplat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 940 | 3 /* mr */, 8 /* nr */); |
| 941 | } |
| 942 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 943 | static void f32_gemm_4x8__wasmsimd_arm_loadsplat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 944 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 945 | xnn_f32_gemm_minmax_ukernel_4x8__wasmsimd_arm_loadsplat, |
| 946 | xnn_f32_igemm_minmax_ukernel_4x8__wasmsimd_arm_loadsplat, |
| 947 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_arm_loadsplat, |
| 948 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_arm_loadsplat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 949 | 4 /* mr */, 8 /* nr */); |
| 950 | } |
| 951 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 952 | static void f32_gemm_5x8__wasmsimd_arm_loadsplat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 953 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 954 | xnn_f32_gemm_minmax_ukernel_5x8__wasmsimd_arm_loadsplat, |
| 955 | xnn_f32_igemm_minmax_ukernel_5x8__wasmsimd_arm_loadsplat, |
| 956 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_arm_loadsplat, |
| 957 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_arm_loadsplat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 958 | 5 /* mr */, 8 /* nr */); |
| 959 | } |
| 960 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 961 | static void f32_gemm_6x8__wasmsimd_arm_loadsplat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 962 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 963 | xnn_f32_gemm_minmax_ukernel_6x8__wasmsimd_arm_loadsplat, |
| 964 | xnn_f32_igemm_minmax_ukernel_6x8__wasmsimd_arm_loadsplat, |
| 965 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_arm_loadsplat, |
| 966 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_arm_loadsplat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 967 | 6 /* mr */, 8 /* nr */); |
| 968 | } |
| 969 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 970 | static void f32_gemm_3x8__wasmsimd_x86_loadsplat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 971 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 972 | xnn_f32_gemm_minmax_ukernel_3x8__wasmsimd_x86_loadsplat, |
| 973 | xnn_f32_igemm_minmax_ukernel_3x8__wasmsimd_x86_loadsplat, |
| 974 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_x86_loadsplat, |
| 975 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_x86_loadsplat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 976 | 3 /* mr */, 8 /* nr */); |
| 977 | } |
| 978 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 979 | static void f32_gemm_4x8__wasmsimd_x86_loadsplat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 980 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 981 | xnn_f32_gemm_minmax_ukernel_4x8__wasmsimd_x86_loadsplat, |
| 982 | xnn_f32_igemm_minmax_ukernel_4x8__wasmsimd_x86_loadsplat, |
| 983 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_x86_loadsplat, |
| 984 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_x86_loadsplat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 985 | 4 /* mr */, 8 /* nr */); |
| 986 | } |
| 987 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 988 | static void f32_gemm_5x8__wasmsimd_x86_loadsplat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 989 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 990 | xnn_f32_gemm_minmax_ukernel_5x8__wasmsimd_x86_loadsplat, |
| 991 | xnn_f32_igemm_minmax_ukernel_5x8__wasmsimd_x86_loadsplat, |
| 992 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_x86_loadsplat, |
| 993 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_x86_loadsplat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 994 | 5 /* mr */, 8 /* nr */); |
| 995 | } |
| 996 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 997 | static void f32_gemm_6x8__wasmsimd_x86_loadsplat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 998 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 999 | xnn_f32_gemm_minmax_ukernel_6x8__wasmsimd_x86_loadsplat, |
| 1000 | xnn_f32_igemm_minmax_ukernel_6x8__wasmsimd_x86_loadsplat, |
| 1001 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_x86_loadsplat, |
| 1002 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_x86_loadsplat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1003 | 6 /* mr */, 8 /* nr */); |
| 1004 | } |
| 1005 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1006 | static void f32_gemm_3x8__wasmsimd_arm_splat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1007 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1008 | xnn_f32_gemm_minmax_ukernel_3x8__wasmsimd_arm_splat, |
| 1009 | xnn_f32_igemm_minmax_ukernel_3x8__wasmsimd_arm_splat, |
| 1010 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_arm_splat, |
| 1011 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_arm_splat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1012 | 3 /* mr */, 8 /* nr */); |
| 1013 | } |
| 1014 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1015 | static void f32_gemm_4x8__wasmsimd_arm_splat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1016 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1017 | xnn_f32_gemm_minmax_ukernel_4x8__wasmsimd_arm_splat, |
| 1018 | xnn_f32_igemm_minmax_ukernel_4x8__wasmsimd_arm_splat, |
| 1019 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_arm_splat, |
| 1020 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_arm_splat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1021 | 4 /* mr */, 8 /* nr */); |
| 1022 | } |
| 1023 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1024 | static void f32_gemm_5x8__wasmsimd_arm_splat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1025 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1026 | xnn_f32_gemm_minmax_ukernel_5x8__wasmsimd_arm_splat, |
| 1027 | xnn_f32_igemm_minmax_ukernel_5x8__wasmsimd_arm_splat, |
| 1028 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_arm_splat, |
| 1029 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_arm_splat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1030 | 5 /* mr */, 8 /* nr */); |
| 1031 | } |
| 1032 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1033 | static void f32_gemm_6x8__wasmsimd_arm_splat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1034 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1035 | xnn_f32_gemm_minmax_ukernel_6x8__wasmsimd_arm_splat, |
| 1036 | xnn_f32_igemm_minmax_ukernel_6x8__wasmsimd_arm_splat, |
| 1037 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_arm_splat, |
| 1038 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_arm_splat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1039 | 6 /* mr */, 8 /* nr */); |
| 1040 | } |
| 1041 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1042 | static void f32_gemm_3x8__wasmsimd_x86_splat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1043 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1044 | xnn_f32_gemm_minmax_ukernel_3x8__wasmsimd_x86_splat, |
| 1045 | xnn_f32_igemm_minmax_ukernel_3x8__wasmsimd_x86_splat, |
| 1046 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_x86_splat, |
| 1047 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_x86_splat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1048 | 3 /* mr */, 8 /* nr */); |
| 1049 | } |
| 1050 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1051 | static void f32_gemm_4x8__wasmsimd_x86_splat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1052 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1053 | xnn_f32_gemm_minmax_ukernel_4x8__wasmsimd_x86_splat, |
| 1054 | xnn_f32_igemm_minmax_ukernel_4x8__wasmsimd_x86_splat, |
| 1055 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_x86_splat, |
| 1056 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_x86_splat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1057 | 4 /* mr */, 8 /* nr */); |
| 1058 | } |
| 1059 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1060 | static void f32_gemm_5x8__wasmsimd_x86_splat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1061 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1062 | xnn_f32_gemm_minmax_ukernel_5x8__wasmsimd_x86_splat, |
| 1063 | xnn_f32_igemm_minmax_ukernel_5x8__wasmsimd_x86_splat, |
| 1064 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_x86_splat, |
| 1065 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_x86_splat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1066 | 5 /* mr */, 8 /* nr */); |
| 1067 | } |
| 1068 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1069 | static void f32_gemm_6x8__wasmsimd_x86_splat(benchmark::State& state, models::ExecutionPlanFactory model) { |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1070 | GEMMEnd2EndBenchmark(state, model, |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1071 | xnn_f32_gemm_minmax_ukernel_6x8__wasmsimd_x86_splat, |
| 1072 | xnn_f32_igemm_minmax_ukernel_6x8__wasmsimd_x86_splat, |
| 1073 | xnn_f32_gemm_minmax_ukernel_1x8__wasmsimd_x86_splat, |
| 1074 | xnn_f32_igemm_minmax_ukernel_1x8__wasmsimd_x86_splat, |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1075 | 6 /* mr */, 8 /* nr */); |
| 1076 | } |
| 1077 | |
| 1078 | static void f32_gemm_3x8s4__wasmsimd_arm(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1079 | GEMMEnd2EndBenchmark(state, model, |
| 1080 | xnn_f32_gemm_minmax_ukernel_3x8s4__wasmsimd_arm, |
| 1081 | xnn_f32_igemm_minmax_ukernel_3x8s4__wasmsimd_arm, |
| 1082 | xnn_f32_gemm_minmax_ukernel_1x8s4__wasmsimd_arm, |
| 1083 | xnn_f32_igemm_minmax_ukernel_1x8s4__wasmsimd_arm, |
| 1084 | 3 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 1085 | } |
| 1086 | |
| 1087 | static void f32_gemm_4x8s4__wasmsimd_arm(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1088 | GEMMEnd2EndBenchmark(state, model, |
| 1089 | xnn_f32_gemm_minmax_ukernel_4x8s4__wasmsimd_arm, |
| 1090 | xnn_f32_igemm_minmax_ukernel_4x8s4__wasmsimd_arm, |
| 1091 | xnn_f32_gemm_minmax_ukernel_1x8s4__wasmsimd_arm, |
| 1092 | xnn_f32_igemm_minmax_ukernel_1x8s4__wasmsimd_arm, |
| 1093 | 4 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 1094 | } |
| 1095 | |
| 1096 | static void f32_gemm_5x8s4__wasmsimd_arm(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1097 | GEMMEnd2EndBenchmark(state, model, |
| 1098 | xnn_f32_gemm_minmax_ukernel_5x8s4__wasmsimd_arm, |
| 1099 | xnn_f32_igemm_minmax_ukernel_5x8s4__wasmsimd_arm, |
| 1100 | xnn_f32_gemm_minmax_ukernel_1x8s4__wasmsimd_arm, |
| 1101 | xnn_f32_igemm_minmax_ukernel_1x8s4__wasmsimd_arm, |
| 1102 | 5 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 1103 | } |
| 1104 | |
| 1105 | static void f32_gemm_6x8s4__wasmsimd_arm(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1106 | GEMMEnd2EndBenchmark(state, model, |
| 1107 | xnn_f32_gemm_minmax_ukernel_6x8s4__wasmsimd_arm, |
| 1108 | xnn_f32_igemm_minmax_ukernel_6x8s4__wasmsimd_arm, |
| 1109 | xnn_f32_gemm_minmax_ukernel_1x8s4__wasmsimd_arm, |
| 1110 | xnn_f32_igemm_minmax_ukernel_1x8s4__wasmsimd_arm, |
| 1111 | 6 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 1112 | } |
| 1113 | |
| 1114 | static void f32_gemm_3x8s4__wasmsimd_x86(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1115 | GEMMEnd2EndBenchmark(state, model, |
| 1116 | xnn_f32_gemm_minmax_ukernel_3x8s4__wasmsimd_x86, |
| 1117 | xnn_f32_igemm_minmax_ukernel_3x8s4__wasmsimd_x86, |
| 1118 | xnn_f32_gemm_minmax_ukernel_1x8s4__wasmsimd_x86, |
| 1119 | xnn_f32_igemm_minmax_ukernel_1x8s4__wasmsimd_x86, |
| 1120 | 3 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 1121 | } |
| 1122 | |
| 1123 | static void f32_gemm_4x8s4__wasmsimd_x86(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1124 | GEMMEnd2EndBenchmark(state, model, |
| 1125 | xnn_f32_gemm_minmax_ukernel_4x8s4__wasmsimd_x86, |
| 1126 | xnn_f32_igemm_minmax_ukernel_4x8s4__wasmsimd_x86, |
| 1127 | xnn_f32_gemm_minmax_ukernel_1x8s4__wasmsimd_x86, |
| 1128 | xnn_f32_igemm_minmax_ukernel_1x8s4__wasmsimd_x86, |
| 1129 | 4 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 1130 | } |
| 1131 | |
| 1132 | static void f32_gemm_5x8s4__wasmsimd_x86(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1133 | GEMMEnd2EndBenchmark(state, model, |
| 1134 | xnn_f32_gemm_minmax_ukernel_5x8s4__wasmsimd_x86, |
| 1135 | xnn_f32_igemm_minmax_ukernel_5x8s4__wasmsimd_x86, |
| 1136 | xnn_f32_gemm_minmax_ukernel_1x8s4__wasmsimd_x86, |
| 1137 | xnn_f32_igemm_minmax_ukernel_1x8s4__wasmsimd_x86, |
| 1138 | 5 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 1139 | } |
| 1140 | |
| 1141 | static void f32_gemm_6x8s4__wasmsimd_x86(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1142 | GEMMEnd2EndBenchmark(state, model, |
| 1143 | xnn_f32_gemm_minmax_ukernel_6x8s4__wasmsimd_x86, |
| 1144 | xnn_f32_igemm_minmax_ukernel_6x8s4__wasmsimd_x86, |
| 1145 | xnn_f32_gemm_minmax_ukernel_1x8s4__wasmsimd_x86, |
| 1146 | xnn_f32_igemm_minmax_ukernel_1x8s4__wasmsimd_x86, |
| 1147 | 6 /* mr */, 8 /* nr */, 0 /* log2(kr) */, 2 /* log2(sr) */); |
| 1148 | } |
| 1149 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1150 | BENCHMARK_FP32_END2END(f32_gemm_3x8__wasmsimd_arm_loadsplat); |
| 1151 | BENCHMARK_FP32_END2END(f32_gemm_4x8__wasmsimd_arm_loadsplat); |
| 1152 | BENCHMARK_FP32_END2END(f32_gemm_5x8__wasmsimd_arm_loadsplat); |
| 1153 | BENCHMARK_FP32_END2END(f32_gemm_6x8__wasmsimd_arm_loadsplat); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1154 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1155 | BENCHMARK_FP32_END2END(f32_gemm_3x8__wasmsimd_x86_loadsplat); |
| 1156 | BENCHMARK_FP32_END2END(f32_gemm_4x8__wasmsimd_x86_loadsplat); |
| 1157 | BENCHMARK_FP32_END2END(f32_gemm_5x8__wasmsimd_x86_loadsplat); |
| 1158 | BENCHMARK_FP32_END2END(f32_gemm_6x8__wasmsimd_x86_loadsplat); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1159 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1160 | BENCHMARK_FP32_END2END(f32_gemm_3x8__wasmsimd_arm_splat); |
| 1161 | BENCHMARK_FP32_END2END(f32_gemm_4x8__wasmsimd_arm_splat); |
| 1162 | BENCHMARK_FP32_END2END(f32_gemm_5x8__wasmsimd_arm_splat); |
| 1163 | BENCHMARK_FP32_END2END(f32_gemm_6x8__wasmsimd_arm_splat); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1164 | |
Frank Barchard | 0725b8d | 2020-12-07 11:07:35 -0800 | [diff] [blame] | 1165 | BENCHMARK_FP32_END2END(f32_gemm_3x8__wasmsimd_x86_splat); |
| 1166 | BENCHMARK_FP32_END2END(f32_gemm_4x8__wasmsimd_x86_splat); |
| 1167 | BENCHMARK_FP32_END2END(f32_gemm_5x8__wasmsimd_x86_splat); |
| 1168 | BENCHMARK_FP32_END2END(f32_gemm_6x8__wasmsimd_x86_splat); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1169 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 1170 | BENCHMARK_FP32_END2END(f32_gemm_3x8s4__wasmsimd_arm); |
| 1171 | BENCHMARK_FP32_END2END(f32_gemm_4x8s4__wasmsimd_arm); |
| 1172 | BENCHMARK_FP32_END2END(f32_gemm_5x8s4__wasmsimd_arm); |
| 1173 | BENCHMARK_FP32_END2END(f32_gemm_6x8s4__wasmsimd_arm); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1174 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 1175 | BENCHMARK_FP32_END2END(f32_gemm_3x8s4__wasmsimd_x86); |
| 1176 | BENCHMARK_FP32_END2END(f32_gemm_4x8s4__wasmsimd_x86); |
| 1177 | BENCHMARK_FP32_END2END(f32_gemm_5x8s4__wasmsimd_x86); |
| 1178 | BENCHMARK_FP32_END2END(f32_gemm_6x8s4__wasmsimd_x86); |
Marat Dukhan | 1bbf96b | 2020-06-15 23:01:20 -0700 | [diff] [blame] | 1179 | #endif // XNN_ARCH_WASMSIMD |
| 1180 | |
Marat Dukhan | c08cdf5 | 2019-12-09 09:17:51 -0800 | [diff] [blame] | 1181 | #if XNN_ARCH_WASM |
| 1182 | static void f32_gemm_2x4__wasm(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1183 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 1184 | xnn_f32_gemm_minmax_ukernel_2x4__wasm, |
| 1185 | xnn_f32_igemm_minmax_ukernel_2x4__wasm, |
| 1186 | xnn_f32_gemm_minmax_ukernel_1x4__wasm, |
| 1187 | xnn_f32_igemm_minmax_ukernel_1x4__wasm, |
Marat Dukhan | c08cdf5 | 2019-12-09 09:17:51 -0800 | [diff] [blame] | 1188 | 2 /* mr */, 4 /* nr */); |
| 1189 | } |
| 1190 | |
| 1191 | static void f32_gemm_4x4__wasm(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1192 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 1193 | xnn_f32_gemm_minmax_ukernel_4x4__wasm, |
| 1194 | xnn_f32_igemm_minmax_ukernel_4x4__wasm, |
| 1195 | xnn_f32_gemm_minmax_ukernel_1x4__wasm, |
| 1196 | xnn_f32_igemm_minmax_ukernel_1x4__wasm, |
Marat Dukhan | c08cdf5 | 2019-12-09 09:17:51 -0800 | [diff] [blame] | 1197 | 4 /* mr */, 4 /* nr */); |
| 1198 | } |
| 1199 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 1200 | BENCHMARK_FP32_END2END(f32_gemm_2x4__wasm); |
| 1201 | BENCHMARK_FP32_END2END(f32_gemm_4x4__wasm); |
Marat Dukhan | c08cdf5 | 2019-12-09 09:17:51 -0800 | [diff] [blame] | 1202 | #endif // XNN_ARCH_WASM |
| 1203 | |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 1204 | static void f32_gemm_2x4__scalar(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1205 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 1206 | xnn_f32_gemm_minmax_ukernel_2x4__scalar, |
| 1207 | xnn_f32_igemm_minmax_ukernel_2x4__scalar, |
| 1208 | xnn_f32_gemm_minmax_ukernel_1x4__scalar, |
| 1209 | xnn_f32_igemm_minmax_ukernel_1x4__scalar, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 1210 | 2 /* mr */, 4 /* nr */); |
| 1211 | } |
| 1212 | |
| 1213 | static void f32_gemm_4x4__scalar(benchmark::State& state, models::ExecutionPlanFactory model) { |
| 1214 | GEMMEnd2EndBenchmark(state, model, |
Marat Dukhan | de06f49 | 2020-04-09 00:19:31 -0700 | [diff] [blame] | 1215 | xnn_f32_gemm_minmax_ukernel_4x4__scalar, |
| 1216 | xnn_f32_igemm_minmax_ukernel_4x4__scalar, |
| 1217 | xnn_f32_gemm_minmax_ukernel_1x4__scalar, |
| 1218 | xnn_f32_igemm_minmax_ukernel_1x4__scalar, |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 1219 | 4 /* mr */, 4 /* nr */); |
| 1220 | } |
| 1221 | |
Marat Dukhan | 270a2c4 | 2020-06-26 16:45:52 -0700 | [diff] [blame] | 1222 | BENCHMARK_FP32_END2END(f32_gemm_2x4__scalar); |
| 1223 | BENCHMARK_FP32_END2END(f32_gemm_4x4__scalar); |
Marat Dukhan | 5f18d26 | 2019-10-31 10:24:14 -0700 | [diff] [blame] | 1224 | |
| 1225 | #ifndef XNNPACK_BENCHMARK_NO_MAIN |
| 1226 | BENCHMARK_MAIN(); |
| 1227 | #endif |