30 #if defined(__aarch64__)
31 #if defined(ARM_COMPUTE_ENABLE_SME)
34 #endif // defined(ARM_COMPUTE_ENABLE_SME)
35 #if defined(ARM_COMPUTE_ENABLE_SVE)
38 #endif // defined(ARM_COMPUTE_ENABLE_SVE)
41 #endif // defined(__aarch64__)
48 static const PoolingImplementation<int8_t, int8_t, Requantize32> pooling_s8q_methods[] = {
49 #if defined(__aarch64__)
50 #if defined(ARM_COMPUTE_ENABLE_SME)
52 PoolingMethod::DEPTHFIRST,
53 "sme_s8q_nhwc_avg_generic_depthfirst",
54 [] (
const PoolingArgs &
args,
const Requantize32 &) ->
bool {
55 return args.cpu_info->has_sme2() &&
args.pool_type == PoolingType::AVERAGE;
58 [] (
const PoolingArgs &
args,
const Requantize32 &rq) -> PoolingCommon<int8_t, int8_t> * {
59 auto strat =
new sme_s8q_nhwc_avg_generic_depthfirst(
args.cpu_info);
60 return new PoolingDepthfirstGeneric<int8_t, int8_t, Requantize32>(strat,
args, rq);
64 PoolingMethod::DEPTHFIRST,
65 "sme_s8q_nhwc_max_generic_depthfirst",
66 [] (
const PoolingArgs &
args,
const Requantize32 &) ->
bool {
70 [] (
const PoolingArgs &
args,
const Requantize32 &rq) -> PoolingCommon<int8_t, int8_t> * {
71 auto strat =
new sme_s8q_nhwc_max_generic_depthfirst(
args.cpu_info);
72 return new PoolingDepthfirstGeneric<int8_t, int8_t, Requantize32>(strat,
args, rq);
75 #endif // defined(ARM_COMPUTE_ENABLE_SME)
76 #if defined(ARM_COMPUTE_ENABLE_SVE)
78 PoolingMethod::DEPTHFIRST,
79 "sve_s8q_nhwc_avg_generic_depthfirst",
80 [] (
const PoolingArgs &
args,
const Requantize32 &) ->
bool {
81 return args.cpu_info->has_sve2() &&
args.pool_type == PoolingType::AVERAGE;
84 [] (
const PoolingArgs &
args,
const Requantize32 &rq) -> PoolingCommon<int8_t, int8_t> * {
85 auto strat =
new sve_s8q_nhwc_avg_generic_depthfirst(
args.cpu_info);
86 return new PoolingDepthfirstGeneric<int8_t, int8_t, Requantize32>(strat,
args, rq);
90 PoolingMethod::DEPTHFIRST,
91 "sve_s8q_nhwc_max_generic_depthfirst",
92 [] (
const PoolingArgs &
args,
const Requantize32 &) ->
bool {
96 [] (
const PoolingArgs &
args,
const Requantize32 &rq) -> PoolingCommon<int8_t, int8_t> * {
97 auto strat =
new sve_s8q_nhwc_max_generic_depthfirst(
args.cpu_info);
98 return new PoolingDepthfirstGeneric<int8_t, int8_t, Requantize32>(strat,
args, rq);
101 #endif // defined(ARM_COMPUTE_ENABLE_SVE)
103 PoolingMethod::DEPTHFIRST,
104 "a64_s8q_nhwc_avg_generic_depthfirst",
105 [] (
const PoolingArgs &
args,
const Requantize32 &) ->
bool {
106 return args.pool_type == PoolingType::AVERAGE;
109 [] (
const PoolingArgs &
args,
const Requantize32 &rq) -> PoolingCommon<int8_t, int8_t> * {
110 auto strat =
new a64_s8q_nhwc_avg_generic_depthfirst(
args.cpu_info);
111 return new PoolingDepthfirstGeneric<int8_t, int8_t, Requantize32>(strat,
args, rq);
115 PoolingMethod::DEPTHFIRST,
116 "a64_s8q_nhwc_max_generic_depthfirst",
119 [] (
const PoolingArgs &
args,
const Requantize32 &rq) -> PoolingCommon<int8_t, int8_t> * {
120 auto strat =
new a64_s8q_nhwc_max_generic_depthfirst(
args.cpu_info);
121 return new PoolingDepthfirstGeneric<int8_t, int8_t, Requantize32>(strat,
args, rq);
124 #endif // defined(__aarch64__)
125 { PoolingMethod::DEFAULT,
"",
nullptr,
nullptr,
nullptr },
131 return pooling_s8q_methods;
134 template UniquePoolingCommon<int8_t, int8_t>
pooling(
const PoolingArgs &,
const Requantize32 &);