[Mlir-commits] [mlir] [mlir][tosa] Lower MAX_POOL2D_ADAPTIVE to Linalg (PR #225675)

Jack Frankland llvmlistbot at llvm.org
Mon Sep 28 04:09:17 PDT 2026


================
@@ -106,6 +106,23 @@ func.func @max_pool(%arg0: tensor<1x6x34x62xf32>) -> () {
   return
 }
 
+// -----
+
+// Lower constant adaptive pooling parameters, including nonzero padding,
+// through max_pool2d in PROPAGATE mode.
+// CHECK-LABEL: @max_pool_adaptive_propagate
+func.func @max_pool_adaptive_propagate(%arg0: tensor<1x5x6x2xf32>) -> tensor<1x3x3x2xf32> {
+  // CHECK-NOT: tosa.max_pool2d_adaptive
+  // CHECK: linalg.pooling_nhwc_max {dilations = dense<1> : vector<2xi64>, strides = dense<2> : vector<2xi64>}
----------------
FranklandJack wrote:

Yep, could test padding too. Have added.

https://github.com/llvm/llvm-project/pull/225675


More information about the Mlir-commits mailing list