[Mlir-commits] [mlir] [mlir][vector] Fix parser of vector.transfer_read (PR #133721)

Andrzej WarzyƄski llvmlistbot at llvm.org
Wed Apr 2 05:52:10 PDT 2025


================
@@ -164,6 +164,10 @@ AffineMap mlir::vector::getTransferMinorIdentityMap(ShapedType shapedType,
     return AffineMap::get(
         /*numDims=*/0, /*numSymbols=*/0,
         getAffineConstantExpr(0, shapedType.getContext()));
+  if (shapedType.getRank() < vectorType.getRank() - elementVectorRank) {
+    return AffineMap(); // Not enough dimensions in the shaped type to form a
----------------
banach-space wrote:

Does `elementVectorRank` matter here? If yes, could you write a test to showcase this?

Separately, given that this is effectively checking some basic pre-conditions, could you move it all the way to the top? 

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


More information about the Mlir-commits mailing list