From 03b2971ac69a86f10a1566938d1a25afee15746c Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Wed, 1 Jun 2022 11:47:14 +0100 Subject: Integrate SME2 kernels * Add SME/SME2 detection. * Integrate SME2 implementation for: - Normal convolution - Winograd - Depthwise convolution - Pooling Resolves: COMPMID-5700 Signed-off-by: Viet-Hoa Do Change-Id: I2f1ca1d05f8cfeee9309ed1c0a36096a4a6aad5c Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8692 Reviewed-by: Gunes Bayir Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- .../NEON/kernels/arm_conv/pooling/pooling_s8q.cpp | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/core/NEON/kernels/arm_conv/pooling/pooling_s8q.cpp') diff --git a/src/core/NEON/kernels/arm_conv/pooling/pooling_s8q.cpp b/src/core/NEON/kernels/arm_conv/pooling/pooling_s8q.cpp index 6209f7cf2f..dcb3c8f57c 100644 --- a/src/core/NEON/kernels/arm_conv/pooling/pooling_s8q.cpp +++ b/src/core/NEON/kernels/arm_conv/pooling/pooling_s8q.cpp @@ -28,6 +28,10 @@ #include "pooling_depthfirst_generic.hpp" #if defined(__aarch64__) +#if defined(ARM_COMPUTE_ENABLE_SME) +#include "kernels/sme_s8q_nhwc_avg_generic_depthfirst.hpp" +#include "kernels/sme_s8q_nhwc_max_generic_depthfirst.hpp" +#endif // defined(ARM_COMPUTE_ENABLE_SME) #if defined(ARM_COMPUTE_ENABLE_SVE) #include "kernels/sve_s8q_nhwc_avg_generic_depthfirst.hpp" #include "kernels/sve_s8q_nhwc_max_generic_depthfirst.hpp" @@ -43,6 +47,32 @@ namespace pooling { static const PoolingImplementation pooling_s8q_methods[] = { #if defined(__aarch64__) +#if defined(ARM_COMPUTE_ENABLE_SME) + { + PoolingMethod::DEPTHFIRST, + "sme_s8q_nhwc_avg_generic_depthfirst", + [] (const PoolingArgs &args, const Requantize32 &) -> bool { + return args.cpu_info->has_sme2() && args.pool_type == PoolingType::AVERAGE; + }, + nullptr, + [] (const PoolingArgs &args, const Requantize32 &rq) -> PoolingCommon * { + auto strat = new sme_s8q_nhwc_avg_generic_depthfirst(args.cpu_info); + return new PoolingDepthfirstGeneric(strat, args, rq); + }, + }, + { + PoolingMethod::DEPTHFIRST, + "sme_s8q_nhwc_max_generic_depthfirst", + [] (const PoolingArgs &args, const Requantize32 &) -> bool { + return args.cpu_info->has_sme2() && args.pool_type == PoolingType::MAX; + }, + nullptr, + [] (const PoolingArgs &args, const Requantize32 &rq) -> PoolingCommon * { + auto strat = new sme_s8q_nhwc_max_generic_depthfirst(args.cpu_info); + return new PoolingDepthfirstGeneric(strat, args, rq); + }, + }, +#endif // defined(ARM_COMPUTE_ENABLE_SME) #if defined(ARM_COMPUTE_ENABLE_SVE) { PoolingMethod::DEPTHFIRST, -- cgit v1.2.1