[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:36 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(),
----------------
nicolasvasilache wrote:
Looked at the implementation of delinearizeLaneId (not for this commit).
It looks like it is duplicating functionality from `Dialect/Utils/IndexingUtils`.
Refactoring to reuse/extend `IndexingUtils` would also be most welcome.
https://github.com/llvm/llvm-project/pull/77779
More information about the Mlir-commits
mailing list