[Mlir-commits] [mlir] [mlir][vector] Refine vectorisation of tensor.extract (PR #109580)

Nirvedh Meshram llvmlistbot at llvm.org
Mon Sep 23 10:19:11 PDT 2024


================
@@ -1012,7 +1019,10 @@ getTensorExtractMemoryAccessPattern(tensor::ExtractOp extractOp,
   bool foundIndexOp = false;
   bool isContiguousLoad = isContiguousLoadIdx(linalgOp, extractOpTrailingIdx,
                                               foundIndexOp, resType);
-  isContiguousLoad &= foundIndexOp;
+  // TODO: Support generating contiguous loads for column vectors - that will
+  // require adding a permutation map to tranfer_read Ops.
+  bool isRowVector = resType.getShape().back() != 1;
+  isContiguousLoad &= (foundIndexOp && isRowVector);
----------------
nirvedhmeshram wrote:

You are right in that it increments by 1 but the current check in `isLoopInariantIdx` is 
`return linalgOp.getStaticLoopRanges()[indexOp.getDim()] == 1`
and isnt that `8 == 1` ?

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


More information about the Mlir-commits mailing list