Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 1 | /* |
Gunes Bayir | ef63739 | 2024-02-12 21:32:51 +0000 | [diff] [blame] | 2 | * Copyright (c) 2017-2021, 2024 Arm Limited. |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to |
| 8 | * deal in the Software without restriction, including without limitation the |
| 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 10 | * sell copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all |
| 14 | * copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | * SOFTWARE. |
| 23 | */ |
| 24 | #pragma once |
| 25 | |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 26 | #include <algorithm> |
David Mansell | 318c9f4 | 2020-07-08 13:28:45 +0100 | [diff] [blame] | 27 | #include <cassert> |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 28 | |
| 29 | #include "arm_gemm.hpp" |
Georgios Pinitas | 48b3ef8 | 2019-10-14 19:03:09 +0100 | [diff] [blame] | 30 | #include "bias_adder.hpp" |
Michele Di Giorgio | 6ad60af | 2020-06-09 14:52:15 +0100 | [diff] [blame] | 31 | #include "ndrange.hpp" |
David Mansell | 318c9f4 | 2020-07-08 13:28:45 +0100 | [diff] [blame] | 32 | #include "performance_parameters.hpp" |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 33 | #include "transform.hpp" |
David Mansell | 318c9f4 | 2020-07-08 13:28:45 +0100 | [diff] [blame] | 34 | #include "utils.hpp" |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 35 | |
| 36 | #ifdef CYCLE_PROFILING |
| 37 | #include "profiler.hpp" |
| 38 | #endif |
| 39 | |
| 40 | namespace arm_gemm { |
| 41 | |
| 42 | // Implementation of the GemmCommon abstract class. |
| 43 | template<typename strategy, typename To, typename Tr> |
| 44 | class GemmHybrid : public GemmCommon<To, Tr> { |
| 45 | typedef typename strategy::operand_type Toi; |
| 46 | typedef typename strategy::result_type Tri; |
| 47 | |
| 48 | /* const properties set by constructor */ |
| 49 | const CPUInfo * const _ci; |
| 50 | |
| 51 | const unsigned int _Msize; |
| 52 | const unsigned int _Nsize; |
| 53 | const unsigned int _Ksize; |
| 54 | |
| 55 | const unsigned int _nbatches; |
| 56 | const unsigned int _nmulti; |
| 57 | |
Georgios Pinitas | 48b3ef8 | 2019-10-14 19:03:09 +0100 | [diff] [blame] | 58 | const Activation _act; |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 59 | |
| 60 | /* Blocking info */ |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 61 | const unsigned int _k_block; |
| 62 | const unsigned int _n_block; |
| 63 | const unsigned int _Mround; |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 64 | |
| 65 | /* Pretransposed buffer. */ |
| 66 | const Toi *_B_transposed=nullptr; |
| 67 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 68 | const NDRange<4> _window_range; |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 69 | |
Georgios Pinitas | 48b3ef8 | 2019-10-14 19:03:09 +0100 | [diff] [blame] | 70 | static unsigned int compute_k_block(const GemmArgs &args) { |
Georgios Pinitas | 0cc50ed | 2020-07-06 19:10:38 +0100 | [diff] [blame] | 71 | // Some kernels don't support accumulate mode - these can't do K blocking at all. |
| 72 | if (!strategy::supports_accumulate()) { |
Georgios Pinitas | 48b3ef8 | 2019-10-14 19:03:09 +0100 | [diff] [blame] | 73 | return args._Ksize; |
| 74 | } |
| 75 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 76 | if (args._cfg && args._cfg->inner_block_size) { |
Georgios Pinitas | 4ee8b15 | 2021-07-16 16:16:43 +0100 | [diff] [blame] | 77 | return roundup(args._cfg->inner_block_size, strategy::k_unroll()); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 78 | } |
| 79 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 80 | // Target block size (512 for FP32, scaling for other types). Don't block until size reaches 1.5X this. |
| 81 | unsigned int target_block_size = 2048 / sizeof(To); |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 82 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 83 | if (args._Ksize >= ((3 * target_block_size) / 2)) { |
| 84 | unsigned int target_blocks = iceildiv(args._Ksize, target_block_size); |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 85 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 86 | unsigned int block_size = iceildiv(args._Ksize, target_blocks); |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 87 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 88 | block_size = roundup(block_size, strategy::k_unroll()); |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 89 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 90 | return block_size; |
| 91 | } |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 92 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 93 | return args._Ksize; |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 94 | } |
| 95 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 96 | // New N blocking strategy: if it's narrow, or much taller than it is wide, do the full width. Otherwise do a |
| 97 | // single block. |
Georgios Pinitas | 48b3ef8 | 2019-10-14 19:03:09 +0100 | [diff] [blame] | 98 | static unsigned int compute_n_block(const GemmArgs &args) { |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 99 | if (args._cfg && args._cfg->outer_block_size) { |
Georgios Pinitas | 4ee8b15 | 2021-07-16 16:16:43 +0100 | [diff] [blame] | 100 | unsigned int n_block = args._cfg->outer_block_size; |
| 101 | |
| 102 | // Needs to be (at least a single) multiple of the kernel output width. |
| 103 | n_block /= strategy::out_width(); |
| 104 | n_block = std::max(n_block, 1u) * strategy::out_width(); |
| 105 | |
| 106 | return n_block; |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 107 | } |
| 108 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 109 | if (args._Nsize <= 64) { |
| 110 | return args._Nsize; |
| 111 | } |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 112 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 113 | if ((args._Msize / args._Nsize) > 155) { |
| 114 | return args._Nsize; |
| 115 | } |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 116 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 117 | // Go slightly wider if thread count and depth are small. |
| 118 | if ((args._Ksize <= 128) && (args._maxthreads <= 16)) { |
| 119 | return strategy::out_width() * 3; |
| 120 | } |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 121 | |
Georgios Pinitas | c0b6f76 | 2020-11-02 01:37:17 +0000 | [diff] [blame] | 122 | return strategy::out_width(); |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 123 | } |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 124 | |
| 125 | public: |
| 126 | GemmHybrid(GemmHybrid &) = delete; |
| 127 | GemmHybrid & operator= (GemmHybrid &) = delete; |
| 128 | |
| 129 | /* Constructor */ |
Georgios Pinitas | 48b3ef8 | 2019-10-14 19:03:09 +0100 | [diff] [blame] | 130 | GemmHybrid(const GemmArgs &args) |
Georgios Pinitas | cfa2bba | 2019-06-27 17:00:52 +0100 | [diff] [blame] | 131 | : _ci(args._ci), _Msize(args._Msize), _Nsize(args._Nsize), _Ksize(args._Ksize), |
Georgios Pinitas | 0cc50ed | 2020-07-06 19:10:38 +0100 | [diff] [blame] | 132 | _nbatches(args._nbatches), _nmulti(args._nmulti), |
Georgios Pinitas | 48b3ef8 | 2019-10-14 19:03:09 +0100 | [diff] [blame] | 133 | _act(args._act), |
Georgios Pinitas | cfa2bba | 2019-06-27 17:00:52 +0100 | [diff] [blame] | 134 | _k_block(compute_k_block(args)), _n_block(compute_n_block(args)), |
| 135 | _Mround(roundup(args._Msize, strategy::out_height())), |
| 136 | _window_range(iceildiv(args._Msize, strategy::out_height()), _nbatches, iceildiv(_Nsize, _n_block), _nmulti) { } |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 137 | |
| 138 | // Interface implementation - Compulsory functions |
Joseph Dobson | 6f8b17d | 2020-02-11 19:32:11 +0000 | [diff] [blame] | 139 | ndrange_t get_window_size() const override { |
Georgios Pinitas | 5aa1a0b | 2020-07-02 20:02:20 +0100 | [diff] [blame] | 140 | return { _window_range.total_size() }; |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 141 | } |
| 142 | |
| 143 | // This kernel can always be dynamically scheduled. |
| 144 | bool supports_dynamic_scheduling() const override { |
| 145 | return true; |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 146 | } |
| 147 | |
Georgios Pinitas | 5aa1a0b | 2020-07-02 20:02:20 +0100 | [diff] [blame] | 148 | // Execute |
| 149 | void execute(const ndcoord_t &work_range, const ndcoord_t &, int) override { |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 150 | #ifdef CYCLE_PROFILING |
| 151 | profiler prof; |
| 152 | #endif |
| 153 | strategy strat(_ci); |
| 154 | |
| 155 | /* Make sure we've been set up correctly. */ |
| 156 | assert(_B_transposed); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 157 | static_assert(std::is_same<To, Toi>::value, "gemm_native: Operand types must be the same."); |
| 158 | static_assert(std::is_same<Tr, Tri>::value, "gemm_native: Result types must be the same."); |
| 159 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 160 | /* For now, each work item implies all the K for a given output |
| 161 | * pixel (so we don't need to synchronize access to the output |
| 162 | * array). So separate the loop over K blocks here. */ |
| 163 | for (unsigned int k0=0; k0<_Ksize; k0+=_k_block) { |
| 164 | unsigned int kmax = std::min(k0 + _k_block, _Ksize); |
| 165 | unsigned int kern_k = roundup(kmax-k0, strategy::k_unroll()); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 166 | |
Georgios Pinitas | 48b3ef8 | 2019-10-14 19:03:09 +0100 | [diff] [blame] | 167 | const bool first_pass = (k0 == 0); |
| 168 | const bool last_pass = (kmax == _Ksize); |
| 169 | |
Georgios Pinitas | 5aa1a0b | 2020-07-02 20:02:20 +0100 | [diff] [blame] | 170 | auto p = _window_range.iterator(work_range.get_position(0), work_range.get_position_end(0)); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 171 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 172 | if (p.done()) { |
| 173 | return; |
| 174 | } |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 175 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 176 | do { |
| 177 | const unsigned int m_start = p.dim(0) * strategy::out_height(); |
| 178 | const unsigned int m_end = std::min(p.dim0_max() * strategy::out_height(), _Msize); |
| 179 | const unsigned int batch = p.dim(1); |
| 180 | const unsigned int n0 = p.dim(2) * _n_block; |
| 181 | const unsigned int nmax = std::min(n0 + _n_block, _Nsize); |
| 182 | const unsigned int multi = p.dim(3); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 183 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 184 | const Toi *b_panel = _B_transposed + |
| 185 | (multi * roundup(_Nsize, strategy::out_width()) * roundup(_Ksize, strategy::k_unroll())) + |
| 186 | (k0 * roundup(_Nsize, strategy::out_width())) + |
| 187 | (n0 * kern_k); |
| 188 | |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 189 | #ifdef CYCLE_PROFILING |
Georgios Pinitas | 5aa1a0b | 2020-07-02 20:02:20 +0100 | [diff] [blame] | 190 | auto p = prof.ScopedProfiler(PROFILE_KERNEL, (unsigned long)(m_end - m_start) * kern_k * roundup(nmax-n0, strategy::out_width())); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 191 | #endif |
| 192 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 193 | strat.kernel(this->_Aptr + (multi * this->_A_multi_stride) + (batch * this->_A_batch_stride) + (m_start * this->_lda) + k0, this->_lda, |
| 194 | b_panel, |
| 195 | this->_Cptr + (multi * this->_C_multi_stride) + (batch * this->_C_batch_stride) + (m_start * this->_ldc) + n0, this->_ldc, |
Georgios Pinitas | 48b3ef8 | 2019-10-14 19:03:09 +0100 | [diff] [blame] | 196 | (m_end - m_start), (nmax - n0), kmax-k0, |
| 197 | (strategy::supports_bias() && first_pass && this->_bias) ? this->_bias + (multi * this->_bias_multi_stride) + n0 : nullptr, |
| 198 | last_pass ? _act : Activation(), !first_pass); |
| 199 | |
| 200 | // Add bias externally if needed |
| 201 | if (!strategy::supports_bias() && this->_bias && first_pass) { |
| 202 | bias_adder(this->_Cptr + (multi * this->_C_multi_stride) + (batch * this->_C_batch_stride) + (m_start * this->_ldc) + n0, this->_ldc, |
| 203 | this->_bias + (multi * this->_bias_multi_stride) + n0, |
| 204 | (m_end - m_start), (nmax - n0)); |
| 205 | } |
| 206 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 207 | } while (p.next_dim1()); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 208 | } |
| 209 | } |
| 210 | |
| 211 | // Interface implementation - pretransposed |
| 212 | bool B_is_pretransposed() const override { |
| 213 | return true; |
| 214 | } |
| 215 | |
| 216 | bool B_pretranspose_required() const override { |
| 217 | return (_B_transposed==nullptr); |
| 218 | } |
| 219 | |
| 220 | size_t get_B_pretransposed_array_size() const override { |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 221 | return roundup(_Nsize, strategy::out_width()) * roundup(_Ksize, strategy::k_unroll()) * _nmulti * sizeof(Toi); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 222 | } |
| 223 | |
Gunes Bayir | ef63739 | 2024-02-12 21:32:51 +0000 | [diff] [blame] | 224 | void pretranspose_B_array(void *in_buffer, const To *B, const int ldb, const int B_multi_stride, bool transposed) override { |
| 225 | assert(!transposed); |
| 226 | |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 227 | Toi *buffer = reinterpret_cast<Toi *>(in_buffer); |
| 228 | _B_transposed = buffer; |
| 229 | strategy strat(_ci); |
| 230 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 231 | for (unsigned int multi=0; multi<_nmulti; multi++) { |
| 232 | for (unsigned int k0=0; k0<_Ksize; k0+=_k_block) { |
| 233 | const unsigned int kmax = std::min(k0 + _k_block, _Ksize); |
| 234 | const unsigned int k_size = roundup(kmax-k0, strategy::k_unroll()); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 235 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 236 | for (unsigned int x0=0; x0<_Nsize; x0+=_n_block) { |
| 237 | const unsigned int xmax = std::min(x0+_n_block, _Nsize); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 238 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 239 | const unsigned int size = roundup(xmax-x0, strategy::out_width()) * k_size; |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 240 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 241 | strat.transforms.PrepareB( buffer, B + (multi * B_multi_stride), ldb, |
Gunes Bayir | ef63739 | 2024-02-12 21:32:51 +0000 | [diff] [blame] | 242 | x0, xmax, k0, kmax, false); |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 243 | |
Georgios Pinitas | 1d48065 | 2019-01-23 11:24:50 +0000 | [diff] [blame] | 244 | buffer += size; |
| 245 | } |
| 246 | } |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 247 | } |
| 248 | } |
| 249 | |
| 250 | void set_pretransposed_B_data(void *in_buffer) override { |
| 251 | _B_transposed = reinterpret_cast<Toi *>(in_buffer); |
| 252 | } |
David Mansell | 318c9f4 | 2020-07-08 13:28:45 +0100 | [diff] [blame] | 253 | |
| 254 | // Estimate cycles for given problem given provided parameters |
| 255 | static uint64_t estimate_cycles(const GemmArgs &args, const PerformanceParameters ¶ms) { |
| 256 | // Note: Current hybrid kernels don't actually round up height (they |
| 257 | // have paths for each possible height). Might need to make this |
| 258 | // configurable in future. |
| 259 | uint64_t total_macs = static_cast<uint64_t>(args._nbatches) * args._nmulti * args._Msize * roundup(args._Nsize, strategy::out_width()) * roundup(args._Ksize, strategy::k_unroll()); |
| 260 | |
| 261 | float mac_cycles = static_cast<float>(total_macs) / params.kernel_macs_cycle; |
| 262 | |
| 263 | // TODO: A bit of a kludge here: current hybrid kernels incur extra |
| 264 | // overhead where the width is not a multiple of kernel width. It's |
| 265 | // most noticable where the overall width is quite low, so add 15% |
| 266 | // penalty for such widths. |
| 267 | if ((args._Nsize < strategy::out_width()) || (args._Nsize > strategy::out_width() && args._Nsize < 2*strategy::out_width())) { |
| 268 | mac_cycles *= 1.15f; |
| 269 | } |
| 270 | |
| 271 | uint64_t total_cycles = mac_cycles; |
| 272 | |
| 273 | return total_cycles; |
| 274 | } |
Georgios Pinitas | 4ee8b15 | 2021-07-16 16:16:43 +0100 | [diff] [blame] | 275 | |
| 276 | GemmConfig get_config() override { |
| 277 | GemmConfig c; |
| 278 | |
| 279 | c.method = GemmMethod::GEMM_HYBRID; |
| 280 | c.inner_block_size = _k_block; |
| 281 | c.outer_block_size = _n_block; |
| 282 | c.filter = get_type_name<strategy>(); |
| 283 | |
| 284 | return c; |
| 285 | } |
Georgios Pinitas | 7cd26d4 | 2019-01-09 18:35:17 +0000 | [diff] [blame] | 286 | }; |
| 287 | |
| 288 | } // namespace arm_gemm |