[Mlir-commits] [mlir] [mlir][vector] Drop innermost unit dims on transfer_write. (PR #78554)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Jan 18 10:38:21 PST 2024


================
@@ -1152,8 +1152,71 @@ struct FoldI1Select : public OpRewritePattern<arith::SelectOp> {
   }
 };
 
-// Drop inner most contiguous unit dimensions from transfer_read operand.
-class DropInnerMostUnitDims : public OpRewritePattern<vector::TransferReadOp> {
+/// Returns the number of dims can be folded away from transfer ops. It returns
+/// a failure if strides and offsets can not be resolved.
----------------
banach-space wrote:

1. How are such "dims" defined? Perhaps add examples?
2. "It returns a failure if strides and offsets can not be resolved." - IMHO that's an implementation detail that can be skipped from this higher level description.

Btw - in what cases are strides not resolved? Is it something that we could test?

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


More information about the Mlir-commits mailing list