[Mlir-commits] [mlir] [mlir][vector] Fix a `target-rank=0` unrolling (PR #73365)
Rik Huijzer
llvmlistbot at llvm.org
Wed Nov 29 10:44:54 PST 2023
================
@@ -1207,23 +1207,30 @@ struct UnrollTransferWriteConversion
/// accesses, and broadcasts and transposes in permutation maps.
LogicalResult matchAndRewrite(TransferWriteOp xferOp,
PatternRewriter &rewriter) const override {
- if (xferOp.getVectorType().getRank() <= options.targetRank)
+ VectorType inputVectorTy = xferOp.getVectorType();
+
+ if (inputVectorTy.getRank() <= options.targetRank)
return failure();
+
+ // When target-rank=0, unrolling would cause the vector input argument
+ // into `transfer_write` to become a scalar.
----------------
rikhuijzer wrote:
Thank you for your review!
I've implemented this in 769f314 and updated the text for the first comment in this PR.
https://github.com/llvm/llvm-project/pull/73365
More information about the Mlir-commits
mailing list