[Mlir-commits] [mlir] [mlir][linalg] Improve linalg.pack consumer fusion. (PR #148993)

Han-Chung Wang llvmlistbot at llvm.org
Thu Jul 17 11:20:34 PDT 2025


================
@@ -887,26 +887,13 @@ struct PackOpTiling
 
     ArrayRef<OpFoldResult> offsets(allOffsets[0]);
     ArrayRef<OpFoldResult> sizes(allSizes[0]);
-
     auto packOp = cast<PackOp>(op);
-    // It is not trivial to infer dest tile from source tile if `packOp` has
-    // padding semantic.
-    if (packOp.getPaddingValue())
-      return failure();
-
----------------
hanhanW wrote:

I think it should live in `getTiledImplementationFromOperandTiles`, but I did not spot it in my review. The idea is that if the dimension is not tiled and the padding is not needed, the fusion is allowed. Originally, I only added "not tiled" logic in the first commit and thought that `*cstTileSize % *cstInnerSize != 0` is the check. Now I have more descriptive variable and comments for checking the padding semantic.

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


More information about the Mlir-commits mailing list