[Mlir-commits] [mlir] Full slices when tiling full loop trip count (PR #127197)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Feb 14 09:42:23 PST 2025


================
@@ -214,3 +214,35 @@ module attributes {transform.with_named_sequence} {
     transform.yield
   }
 }
+
+// -----
+
+// CHECK-LABEL: func @non_monotonic_affine_expr
+//  CHECK-SAME:   %[[ARG0:[a-zA-Z0-9_]+]]: tensor<7xf32>
+func.func @non_monotonic_affine_expr(%arg0 : tensor<7xf32>) -> tensor<7xf32> {
+  %c0 = arith.constant 0 : index
+  %0 = tensor.dim %arg0, %c0 : tensor<7xf32>
+  %empty = tensor.empty() : tensor<7xf32>
+
+  // CHECK: %[[OUT:.*]] = tensor.empty() : tensor<7xf32>
+  // CHECK: scf.for {{.*}} to {{.*}} step {{.*}} iter_args(%[[TC0:.*]] = %[[OUT]]) -> (tensor<7xf32>) {
+  // CHECK: tensor.extract_slice %[[TC0]][0] [7] [1] : tensor<7xf32> to tensor<7xf32>
+  %generic = linalg.generic
----------------
MaheshRavishankar wrote:

I need to understand this change better. But I am not sure the semantics of having an indexing map of `(d0 mod 4)` is that well defined. I understand why it isnt caught in the verifier, but it might not be something that transformations can handle

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


More information about the Mlir-commits mailing list