[Mlir-commits] [mlir] [mlir][tensor] Fold padding_value away for pack ops when possible. (PR #74005)
lorenzo chelini
llvmlistbot at llvm.org
Thu Nov 30 15:54:05 PST 2023
================
@@ -3800,17 +3800,37 @@ static bool haveSameTiles(PackOp packOp, UnPackOp unPackOp) {
return true;
}
-/// Fold an unpack(pack(x)) to x.
+/// Returns true if the pack op does not need a padding value.
+static bool paddingIsNotNeeded(PackOp op) {
+ auto srcType = op.getSourceType();
+ if (llvm::any_of(op.getInnerDimsPos(),
----------------
chelini wrote:
What if the tiles are not statically known? It looks like we continue in `requirePaddingValue`; Can we also add a test for the tiles?
https://github.com/llvm/llvm-project/pull/74005
More information about the Mlir-commits
mailing list