[Mlir-commits] [mlir] [mlir][tensor] Apply `InsertSliceOfTransferWriteOpFolder` only when `transfer_write` overwrites all elements of `insert_slice` (PR #108803)
Rajveer Singh Bharadwaj
llvmlistbot at llvm.org
Wed Sep 25 11:12:30 PDT 2024
================
@@ -154,6 +163,18 @@ LogicalResult InsertSliceOfTransferWriteOpFolder::matchAndRewrite(
return success();
}
+bool InsertSliceOfTransferWriteOpFolder::doesTransferWriteCoverInsertSlice(
+ vector::TransferWriteOp writeOp) {
+ if (writeOp.getVectorType().hasStaticShape() &&
+ writeOp.getShapedType().hasStaticShape())
+ return llvm::equal(writeOp.getVectorType().getShape(),
+ writeOp.getShapedType().getShape());
+
+ // Todo: ValueBoundsConstraintSet for dynamic shapes.
----------------
Rajveer100 wrote:
Sure thing.
https://github.com/llvm/llvm-project/pull/108803
More information about the Mlir-commits
mailing list