[Mlir-commits] [mlir] [MLIR][XeGPU][VectorToXeGPU] Fix transfer_read/write cases with non-contiguous memrefs (PR #158126)

Dmitry Chigarev llvmlistbot at llvm.org
Thu Sep 11 11:07:19 PDT 2025


================
@@ -180,26 +180,31 @@ static void adjustStridesForPermutation(AffineMap permMap,
   strides = applyPermutation(strides, perms64);
 }
 
-// Computes memory strides for vector transfer operations, handling both
-// static and dynamic memrefs while applying permutation transformations
-// for XeGPU lowering.
-static SmallVector<Value> computeStrides(VectorTransferOpInterface xferOp,
-                                         PatternRewriter &rewriter) {
+// Computes memory strides and a memref offset for vector transfer operations,
+// handling both static and dynamic memrefs while applying permutation
+// transformations for XeGPU lowering.
+static std::pair<SmallVector<Value>, Value>
+computeMemrefMeta(VectorTransferOpInterface xferOp, PatternRewriter &rewriter) {
----------------
dchigarev wrote:

A function that calls `memref.extract_strided_metadata` now also returns memref's offset together with the strides

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


More information about the Mlir-commits mailing list