[Mlir-commits] [mlir] [mlir][linalg] Allow pack consumer fusion if the tile size is greater than dimension size. (PR #149438)
Ege Beysel
llvmlistbot at llvm.org
Thu Jul 17 23:03:26 PDT 2025
================
@@ -451,6 +451,57 @@ module attributes {transform.with_named_sequence} {
// -----
+#map = affine_map<(d0) -> (-d0 + 4, 16)>
+func.func @fuse_pack_consumer_if_single_iteration(%arg0: tensor<4x4xf32>) -> tensor<1x4x16x1xf32> {
+ %0 = tensor.empty() : tensor<1x4x16x1xf32>
+ %1 = tensor.empty() : tensor<4x4xf32>
+ %2 = scf.forall (%arg1) = (0) to (4) step (16) shared_outs(%arg2 = %1) -> (tensor<4x4xf32>) {
----------------
egebeysel wrote:
Q: wouldn't/shouldn't this (and in general one-iteration loops) be folded away? Probably it should happen at a different point/place, but still just wondering :)
https://github.com/llvm/llvm-project/pull/149438
More information about the Mlir-commits
mailing list