[Mlir-commits] [mlir] [MLIR][Linalg] pack, unpack to take memref inputs (PR #129036)

Han-Chung Wang llvmlistbot at llvm.org
Fri Apr 18 16:25:58 PDT 2025


================
@@ -1026,6 +1030,10 @@ LogicalResult ExtractSliceOfPadTensorSwapPattern::matchAndRewrite(
 static Value getPackOpSourceOrPaddedSource(OpBuilder &builder,
                                            linalg::PackOp packOp) {
   Value input = packOp.getSource();
+  // TODO: Support Memref PackOp. Temporarily return just Op Source.
+  if (!packOp.hasPureTensorSemantics())
+    return input;
+
----------------
hanhanW wrote:

This check is not necessary to me because it is a local function, and we already checked it in `DecomposeOuterUnitDimsPackOpPattern::matchAndRewrite`. I think the transformations are built around tensor variant. I'd not put a TODO for memref unless we have a plan for it.

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


More information about the Mlir-commits mailing list