[Mlir-commits] [mlir] [mlir][linalg][vector] Refine create{Read|Write}OrMasked{Read|Write} (nfc) (PR #135350)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Apr 11 08:28:55 PDT 2025


================
@@ -1506,29 +1506,62 @@ static SmallVector<int64_t> getTiledPackShape(linalg::PackOp packOp,
   return applyPermutation(destShape, linalg::getPackInverseDestPerm(packOp));
 }
 
-/// Given an input, the mixed destSizes, and the vector sizes for vectorization,
-/// create an empty destination tensor and create a TransferWriteOp from the
-/// input to the empty tensor. If the destination shape is not the same as the
-/// inputVectorSizes for the first rank(inputVectorSizes) dims, then create a
-/// mask for the write. If `useInBoundsInsteadOfMasking` is set, then update the
-/// inBounds attribute of the transfer write op instead of masking.
-static Operation *createWriteOrMaskedWrite(OpBuilder &builder, Location loc,
-                                           Value input,
-                                           SmallVector<OpFoldResult> destSizes,
-                                           ArrayRef<int64_t> inputVectorSizes,
-                                           bool useInBoundsInsteadOfMasking) {
+/// Creates a TransferWriteOp to write `input` into a newly initialized
+/// output tensor.
+///
+/// Given:
+/// - an input vector to write,
+/// - the mixed destination sizes for the output tensor,
+/// - and the vector sizes used for vectorization (i.e., the leading N dims),
----------------
banach-space wrote:

Thanks, I missed that! Added a note in this [commit](https://github.com/llvm/llvm-project/pull/135350/commits/5aa309c12a927da7bf8816a7b7efd2bb6b6cd123).

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


More information about the Mlir-commits mailing list