aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp
diff options
context:
space:
mode:
authorViet-Hoa Do <viet-hoa.do@arm.com>2022-06-01 11:47:14 +0100
committerViet-Hoa Do <viet-hoa.do@arm.com>2022-11-28 16:57:42 +0000
commit03b2971ac69a86f10a1566938d1a25afee15746c (patch)
treeaec7cfc047e1da278b4b71a706cda7b1b0faa158 /src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp
parent7dc0234331f2150a6b4ac5c2b49de419870f7cf5 (diff)
downloadComputeLibrary-03b2971ac69a86f10a1566938d1a25afee15746c.tar.gz
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 <viet-hoa.do@arm.com> Change-Id: I2f1ca1d05f8cfeee9309ed1c0a36096a4a6aad5c Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8692 Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp')
-rw-r--r--src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp
index b1489d0b59..9dbd89fb52 100644
--- a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp
+++ b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp
@@ -28,11 +28,19 @@
#include "depthwise_depthfirst.hpp"
#include "depthwise_depthfirst_generic.hpp"
#include "depthwise_depthfirst_multiplier.hpp"
+#include "depthwise_planar.hpp"
#include "depthwise_implementation_constraints.hpp"
#if defined(__aarch64__)
#if defined(ARM_COMPUTE_ENABLE_SVE)
+#if defined(ARM_COMPUTE_ENABLE_SME2)
+#include "kernels/sme2_u8q_planar_3x3_s1_4rows_dot_za.hpp"
+#include "kernels/sme2_u8q_planar_3x3_s2_4rows_dot_za.hpp"
+#include "kernels/sme2_u8q_planar_5x5_s1_4rows_dot_za.hpp"
+#include "kernels/sme2_u8q_planar_5x5_s2_4rows_dot_za.hpp"
+#endif // defined(ARM_COMPUTE_ENABLE_SME2)
+
#include "kernels/sve_u8q_nhwc_3x3_s1_output2x2_dot_depthfirst.hpp"
#include "kernels/sve_u8q_nhwc_3x3_s1_output2x2_mla_depthfirst.hpp"
#include "kernels/sve_u8q_nhwc_3x3_s2_output2x2_mla_depthfirst.hpp"
@@ -66,6 +74,60 @@ namespace depthwise {
static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> depthwise_u8q_methods[] = {
#if defined(__aarch64__)
#if defined(ARM_COMPUTE_ENABLE_SVE)
+#if defined(ARM_COMPUTE_ENABLE_SME2)
+ {
+ DepthwiseMethod::PLANAR,
+ "sme2_u8q_planar_3x3_s1_4rows_dot_za",
+ constraint<Requantize32>(cpu_has_sme, cpu_has_sme2,
+ is_supported<sme2_u8q_planar_3x3_s1_4rows_dot_za>,
+ has_no_channel_multiplier,
+ qp_has_no_left_shift, no_prime_right_pad),
+ nullptr,
+ [] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
+ auto strat = new sme2_u8q_planar_3x3_s1_4rows_dot_za(args.cpu_info);
+ return new DepthwisePlanar<uint8_t>(strat, args, qp);
+ },
+ },
+ {
+ DepthwiseMethod::PLANAR,
+ "sme2_u8q_planar_3x3_s2_4rows_dot_za",
+ constraint<Requantize32>(cpu_has_sme, cpu_has_sme2,
+ is_supported<sme2_u8q_planar_3x3_s2_4rows_dot_za>,
+ has_no_channel_multiplier,
+ qp_has_no_left_shift, no_prime_right_pad),
+ nullptr,
+ [] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
+ auto strat = new sme2_u8q_planar_3x3_s2_4rows_dot_za(args.cpu_info);
+ return new DepthwisePlanar<uint8_t>(strat, args, qp);
+ },
+ },
+ {
+ DepthwiseMethod::PLANAR,
+ "sme2_u8q_planar_5x5_s1_4rows_dot_za",
+ constraint<Requantize32>(cpu_has_sme, cpu_has_sme2,
+ is_supported<sme2_u8q_planar_5x5_s1_4rows_dot_za>,
+ has_no_channel_multiplier,
+ qp_has_no_left_shift, no_prime_right_pad),
+ nullptr,
+ [] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
+ auto strat = new sme2_u8q_planar_5x5_s1_4rows_dot_za(args.cpu_info);
+ return new DepthwisePlanar<uint8_t>(strat, args, qp);
+ },
+ },
+ {
+ DepthwiseMethod::PLANAR,
+ "sme2_u8q_planar_5x5_s2_4rows_dot_za",
+ constraint<Requantize32>(cpu_has_sme, cpu_has_sme2,
+ is_supported<sme2_u8q_planar_5x5_s2_4rows_dot_za>,
+ has_no_channel_multiplier,
+ qp_has_no_left_shift, no_prime_right_pad),
+ nullptr,
+ [] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
+ auto strat = new sme2_u8q_planar_5x5_s2_4rows_dot_za(args.cpu_info);
+ return new DepthwisePlanar<uint8_t>(strat, args, qp);
+ },
+ },
+#endif // defined(ARM_COMPUTE_ENABLE_SME2)
{
DepthwiseMethod::DEPTHFIRST,
"sve_u8q_nhwc_3x3_s1_output2x2_dot_depthfirst",