aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp
diff options
context:
space:
mode:
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.cpp35
1 files changed, 17 insertions, 18 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 9dbd89fb52..236930ee26 100644
--- a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp
+++ b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_u8q.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Arm Limited.
+ * Copyright (c) 2021-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -71,6 +71,16 @@ using arm_gemm::Requantize32;
namespace arm_conv {
namespace depthwise {
+namespace
+{
+#if defined(__aarch64__)
+uint64_t not_preferred(const DepthwiseArgs &, const Requantize32 &)
+{
+ return std::numeric_limits<uint64_t>::max();
+}
+#endif // defined(__aarch64__)
+}
+
static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> depthwise_u8q_methods[] = {
#if defined(__aarch64__)
#if defined(ARM_COMPUTE_ENABLE_SVE)
@@ -132,7 +142,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"sve_u8q_nhwc_3x3_s1_output2x2_dot_depthfirst",
constraint<Requantize32>(is_supported<sve_u8q_nhwc_3x3_s1_output2x2_dot_depthfirst>,
- has_no_channel_multiplier,
qp_has_no_left_shift,
cpu_has_sve2),
nullptr,
@@ -145,7 +154,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"sve_u8q_nhwc_3x3_s1_output2x2_mla_depthfirst",
constraint<Requantize32>(is_supported<sve_u8q_nhwc_3x3_s1_output2x2_mla_depthfirst>,
- has_no_channel_multiplier,
qp_has_no_left_shift,
cpu_has_sve2),
nullptr,
@@ -158,7 +166,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"sve_u8q_nhwc_3x3_s2_output2x2_mla_depthfirst",
constraint<Requantize32>(is_supported<sve_u8q_nhwc_3x3_s2_output2x2_mla_depthfirst>,
- has_no_channel_multiplier,
qp_has_no_left_shift,
cpu_has_sve2),
nullptr,
@@ -171,7 +178,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"sve_u8q_nhwc_5x5_s1_output2x2_mla_depthfirst",
constraint<Requantize32>(is_supported<sve_u8q_nhwc_5x5_s1_output2x2_mla_depthfirst>,
- has_no_channel_multiplier,
qp_has_no_left_shift,
cpu_has_sve2),
nullptr,
@@ -187,7 +193,7 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
qp_has_no_left_shift,
has_channel_multiplier,
cpu_has_sve2),
- nullptr,
+ not_preferred,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
auto strat = new sve_u8q_packed_to_nhwc_3x3_s2_with_multiplier_output2x4_dot_depthfirst(args.cpu_info);
return new DepthwiseDepthfirstMultiplier<uint8_t, uint8_t, uint8_t, int32_t, false>(strat, args, qp);
@@ -200,7 +206,7 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
qp_has_no_left_shift,
has_channel_multiplier,
cpu_has_sve2),
- nullptr,
+ not_preferred,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
auto strat = new sve_u8q_packed_to_nhwc_5x5_s1_with_multiplier_output4x2_dot_depthfirst(args.cpu_info);
return new DepthwiseDepthfirstMultiplier<uint8_t, uint8_t, uint8_t, int32_t, false>(strat, args, qp);
@@ -212,7 +218,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
"a64_u8q_nhwc_3x3_s1_output2x2_dot_depthfirst",
constraint<Requantize32>(is_supported<a64_u8q_nhwc_3x3_s1_output2x2_dot_depthfirst>,
cpu_has_dot_product,
- has_no_channel_multiplier,
qp_has_no_left_shift),
nullptr,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
@@ -225,7 +230,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"a64_u8qa_nhwc_3x3_s1_output2x2_mla_depthfirst",
constraint<Requantize32>(is_supported<a64_u8qa_nhwc_3x3_s1_output2x2_mla_depthfirst>,
- has_no_channel_multiplier,
qp_zero_a_offset,
qp_has_no_left_shift),
nullptr,
@@ -238,7 +242,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"a64_u8qa_nhwc_3x3_s2_output2x2_mla_depthfirst",
constraint<Requantize32>(is_supported<a64_u8qa_nhwc_3x3_s2_output2x2_mla_depthfirst>,
- has_no_channel_multiplier,
qp_zero_a_offset,
qp_has_no_left_shift),
nullptr,
@@ -251,7 +254,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"a64_u8qa_nhwc_5x5_s1_output2x2_mla_depthfirst",
constraint<Requantize32>(is_supported<a64_u8qa_nhwc_5x5_s1_output2x2_mla_depthfirst>,
- has_no_channel_multiplier,
qp_zero_a_offset,
qp_has_no_left_shift),
nullptr,
@@ -265,7 +267,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"a64_u8q_nhwc_3x3_s1_output2x2_mla_depthfirst",
constraint<Requantize32>(is_supported<a64_u8q_nhwc_3x3_s1_output2x2_mla_depthfirst>,
- has_no_channel_multiplier,
qp_has_no_left_shift),
nullptr,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
@@ -277,7 +278,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"a64_u8q_nhwc_3x3_s2_output2x2_mla_depthfirst",
constraint<Requantize32>(is_supported<a64_u8q_nhwc_3x3_s2_output2x2_mla_depthfirst>,
- has_no_channel_multiplier,
qp_has_no_left_shift),
nullptr,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
@@ -289,7 +289,6 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"a64_u8q_nhwc_5x5_s1_output2x2_mla_depthfirst",
constraint<Requantize32>(is_supported<a64_u8q_nhwc_5x5_s1_output2x2_mla_depthfirst>,
- has_no_channel_multiplier,
qp_has_no_left_shift),
nullptr,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
@@ -300,7 +299,7 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
{
DepthwiseMethod::DEPTHFIRST,
"a64_u8q_nhwc_generic_output3x3_mla_depthfirst",
- constraint<Requantize32>(has_no_channel_multiplier),
+ nullptr,
nullptr,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
auto kernel = new a64_u8q_nhwc_generic_output9_mla_depthfirst(args.cpu_info);
@@ -315,7 +314,7 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
cpu_has_dot_product,
has_channel_multiplier,
qp_has_no_left_shift),
- nullptr,
+ not_preferred,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
auto strat = new a64_u8q_packed_to_nhwc_3x3_s2_with_multiplier_output2x4_dot_depthfirst(args.cpu_info);
return new DepthwiseDepthfirstMultiplier<uint8_t, uint8_t, uint8_t, int32_t, false>(strat, args, qp);
@@ -328,7 +327,7 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
cpu_has_dot_product,
has_channel_multiplier,
qp_has_no_left_shift),
- nullptr,
+ not_preferred,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
auto strat = new a64_u8q_packed_to_nhwc_5x5_s1_with_multiplier_output4x2_dot_depthfirst(args.cpu_info);
return new DepthwiseDepthfirstMultiplier<uint8_t, uint8_t, uint8_t, int32_t, false>(strat, args, qp);
@@ -338,7 +337,7 @@ static const DepthwiseImplementation<uint8_t, uint8_t, uint8_t, Requantize32> de
DepthwiseMethod::DEPTHFIRST,
"a64_u8q_packed_to_nhwc_generic_with_multiplier_output2x8_mla_depthfirst",
constraint<Requantize32>(has_channel_multiplier),
- nullptr,
+ not_preferred,
[] (const DepthwiseArgs &args, const Requantize32 &qp) -> DepthwiseCommon<uint8_t, uint8_t, uint8_t> * {
auto kern = new a64_u8q_packed_to_nhwc_generic_with_multiplier_output2x8_mla_depthfirst(args.cpu_info);
auto strat = new GenericDepthfirstMultiplierStrategy<uint8_t>(kern, args);