[Mlir-commits] [mlir] [MLIR][Linalg] pack, unpack to take memref inputs (PR #129036)
Han-Chung Wang
llvmlistbot at llvm.org
Tue Apr 1 15:22:12 PDT 2025
================
@@ -4930,23 +5002,31 @@ LogicalResult PackOp::canonicalize(PackOp packOp, PatternRewriter &rewriter) {
return success();
}
- // Insert tensor.cast ops if static shape inference is available..
+ // Insert either tensor.cast or memref.cast ops
+ // if static shape inference is available..
+ bool hasTensorSemantics = packOp.hasPureTensorSemantics();
----------------
hanhanW wrote:
nit: it is only used in the below closure, let's move it into the if-body. Also, we are missing tests if we add such support in the PR. E.g.,
https://github.com/llvm/llvm-project/blob/e55164ae1098bbf8ceb87b83a4b282b08bb7bef9/mlir/test/Dialect/Linalg/canonicalize.mlir#L1343-L1380
https://github.com/llvm/llvm-project/pull/129036
More information about the Mlir-commits
mailing list