[Mlir-commits] [mlir] [mlir][vector] Support warp distribution of `transfer_read` with dependencies (PR #77779)

Nicolas Vasilache llvmlistbot at llvm.org
Fri Jan 12 01:43:37 PST 2024


================
@@ -832,10 +836,25 @@ struct WarpOpTransferRead : public OpRewritePattern<WarpExecuteOnLane0Op> {
     AffineMap map = calculateImplicitMap(sequentialType, distributedType);
     AffineMap indexMap = map.compose(read.getPermutationMap());
 
-    // Distribute the mask if present.
+    // Try to delinearize the lane ID to match the rank expected for
+    // distribution.
+    SmallVector<Value> delinearizedIds;
+    if (!delinearizeLaneId(rewriter, read.getLoc(), sequentialType.getShape(),
+                           distributedType.getShape(), warpOp.getWarpSize(),
+                           warpOp.getLaneid(), delinearizedIds)) {
+      return rewriter.notifyMatchFailure(
----------------
nicolasvasilache wrote:

+1 thanks!

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


More information about the Mlir-commits mailing list