1 /* 2 * Copyright (c) 2022 Arm Limited. 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 25 namespace arm_conv { 26 namespace depthwise { 27 28 void sme2_fp32_planar_5x5_s1_4rows_mla_za_impl( 29 const float *inptr, 30 size_t ld_in_row, 31 size_t ld_in_col, 32 size_t ld_in_vl, 33 unsigned int pad_top, 34 unsigned int valid_input_rows, 35 unsigned int pad_left, 36 unsigned int valid_input_cols, 37 const float *weights, 38 const float *bias, 39 float **outptrs, 40 const size_t *outlds, 41 const size_t *outvllds, 42 unsigned int output_cols, 43 unsigned int start_channel, 44 unsigned int valid_channels, 45 float act_min, 46 float act_max 47 ); 48 49 class sme2_fp32_planar_5x5_s1_4rows_mla_za : public PlanarStrategy<float, float> 50 { 51 using Parent = PlanarStrategy<float, float>; 52 53 public: 54 using return_type = float; 55 constexpr static auto output_rows = 4u; 56 constexpr static auto kernel_rows = 5u, kernel_cols = 5u; 57 constexpr static auto stride_rows = 1u, stride_cols = 1u; 58 constexpr static auto vl_type = arm_gemm::VLType::SME; 59 sme2_fp32_planar_5x5_s1_4rows_mla_za(const CPUInfo *)60 sme2_fp32_planar_5x5_s1_4rows_mla_za(const CPUInfo *) 61 : Parent(kernel_rows, kernel_cols, stride_rows, stride_cols, output_rows, vl_type) 62 { 63 } 64 get_kernel(void) const65 typename Parent::KernelType get_kernel(void) const override 66 { 67 return sme2_fp32_planar_5x5_s1_4rows_mla_za_impl; 68 } 69 }; 70 71 } // namespace depthwise 72 } // namespace arm_conv 73