diff options
Diffstat (limited to 'src/core/NEON/kernels/arm_gemm/std_transforms_sve.hpp')
-rw-r--r-- | src/core/NEON/kernels/arm_gemm/std_transforms_sve.hpp | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/std_transforms_sve.hpp b/src/core/NEON/kernels/arm_gemm/std_transforms_sve.hpp index 6b64e5e36c..c516bfc456 100644 --- a/src/core/NEON/kernels/arm_gemm/std_transforms_sve.hpp +++ b/src/core/NEON/kernels/arm_gemm/std_transforms_sve.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2018,2023-2024 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -23,6 +23,7 @@ */ #pragma once +#include "convolver.hpp" #include "mergeresults.hpp" #include "transform.hpp" @@ -38,28 +39,37 @@ namespace arm_gemm { * The optional 'block' parameter is for kernels using dot-product type * instructions like UDOT and SDOT. */ -template<typename TOperand, typename TResult, unsigned int height, unsigned int width_vectors, unsigned int block=1, unsigned int mmla=1> +template<typename TOperand, typename TResult, unsigned int height, unsigned int width_vectors, unsigned int block=1, unsigned int mmla=1, bool integrate_sums=false> class StdTransformsSVE { public: template<typename TIn> void PrepareA(TOperand *out, const TIn *in, const int stride, const int y0, - const int ymax, const int k0, const int kmax, bool transposed) { - if (transposed) { - Transform<height, block, true>(out, in, stride, y0, ymax, k0, kmax); - } else { - Transform<height, block, false>(out, in, stride, y0, ymax, k0, kmax); - } + const int ymax, const int k0, const int kmax, int32_t row_sum_multiplier) { + Interleave<height, block, VLType::None>(out, in, stride, y0, ymax, k0, kmax, integrate_sums, row_sum_multiplier); + } + + template<typename TIn> + void PrepareA_indirect(TOperand *out, const TIn * const * const *ptr, size_t stringlen, size_t rounded_stringlen, const int y0, + const int ymax, const int k0, const int kmax, int32_t row_sum_multiplier) { + IndirectInterleave<height, block, VLType::None>(out, ptr, stringlen, rounded_stringlen, y0, ymax, k0, kmax, integrate_sums, row_sum_multiplier); + } + + template<typename TIn> + void PrepareA_convolution(TOperand *out, const TIn *ptr, size_t stride, const convolver<TIn> &conv, size_t rounded_stringlen, + const int y0, const int ymax, const int k0, const int kmax, int32_t row_sum_multiplier) { + ConvolutionInterleave<height, block, VLType::None>(out, ptr, stride, conv, rounded_stringlen, y0, ymax, k0, kmax, integrate_sums, row_sum_multiplier); + } + + bool PrepareB_supports_transpose() const { + return false; } template<typename TIn> void PrepareB(TOperand *out, const TIn *in, const int stride, const int x0, const int xmax, const int k0, const int kmax, bool transposed) { - if (transposed) { - Transform<width_vectors, block, false, true>(out, in, stride, x0, xmax, k0, kmax); - } else { - Transform<width_vectors, block, true, true>(out, in, stride, x0, xmax, k0, kmax); - } + assert (!transposed); + Transform<width_vectors, block, true, VLType::SVE>(out, in, stride, x0, xmax, k0, kmax); } template<typename TOut> |