From cf61c033b8c088c9a830bda460312e16798e2f3f Mon Sep 17 00:00:00 2001 From: Weiping Liu Date: Thu, 30 Apr 2026 23:34:38 -0700 Subject: [PATCH] make quantized_max_pool2d_nhwc handle case of C>64 (#19238) Summary: now the TIE quantized_max_pool2d_nhwc general path processes channels in chunks of 16 groups (64 bytes) at a time using a fixed stack array with an outer loop. This supports arbitrary C (any multiple of 4). Also adds test cases for C=128, C=256, k=3x3, and padding to cover all TIE kernel dispatch paths. Reviewed By: khazaei Differential Revision: D103096179 --- backends/cadence/hifi/operators/operators.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backends/cadence/hifi/operators/operators.h b/backends/cadence/hifi/operators/operators.h index 3ca505d40cb..1fcd9733ddf 100644 --- a/backends/cadence/hifi/operators/operators.h +++ b/backends/cadence/hifi/operators/operators.h @@ -226,6 +226,16 @@ ::executorch::aten::Tensor& transpose_copy_int_out( int64_t dim1, ::executorch::aten::Tensor& out); +::executorch::aten::Tensor& quantized_max_pool2d_nhwc_out( + ::executorch::runtime::KernelRuntimeContext& ctx, + const ::executorch::aten::Tensor& input, + ::executorch::aten::IntArrayRef kernel_size, + ::executorch::aten::IntArrayRef stride, + ::executorch::aten::IntArrayRef padding, + ::executorch::aten::IntArrayRef dilation, + bool ceil_mode, + ::executorch::aten::Tensor& output); + } // namespace native } // namespace HiFi } // namespace impl