[Mlir-commits] [mlir] [mlir][tensor] Fold padding_value away for pack ops when possible. (PR #74005)
Han-Chung Wang
llvmlistbot at llvm.org
Thu Nov 30 15:55:33 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(),
----------------
hanhanW wrote:
This is why we check if those dim sizes are dynamic or not in the first beginning. I think we can only do nothing if they are dynamic tiles.
https://github.com/llvm/llvm-project/pull/74005
More information about the Mlir-commits
mailing list