[Mlir-commits] [mlir] [mlir][tosa] Preserve all-NaN max-pool windows (PR #225744)
Jack Frankland
llvmlistbot at llvm.org
Mon Sep 28 03:47:38 PDT 2026
================
@@ -106,6 +106,24 @@ func.func @max_pool(%arg0: tensor<1x6x34x62xf32>) -> () {
return
}
+// -----
+
+// Lower IGNORE mode with a NaN accumulator so an all-NaN window stays NaN.
+// CHECK-LABEL: @max_pool_ignore
+func.func @max_pool_ignore(%arg0: tensor<1x4x4x1xf32>) -> tensor<1x3x3x1xf32> {
+ // CHECK: arith.constant {{.*}} : f32
+ // CHECK: linalg.fill
+ // CHECK: linalg.generic
+ // CHECK: arith.cmpf uno
+ // CHECK: arith.cmpf uno
+ // CHECK: arith.select
+ // CHECK: arith.select
----------------
FranklandJack wrote:
Yep good idea, done.
https://github.com/llvm/llvm-project/pull/225744
More information about the Mlir-commits
mailing list