[Mlir-commits] [mlir] [mlir][xegpu] Lower dynamic high-D nd load/store via base-pointer fold (PR #215711)
Charitha Saumya
llvmlistbot at llvm.org
Wed Aug 12 11:47:49 PDT 2026
================
@@ -288,6 +315,21 @@ class CreateNdDescToXeVMPattern
payload =
vector::InsertOp::create(rewriter, loc, basePitch, payload,
static_cast<int>(NdTdescOffset::BasePitch));
+ // For a >2D descriptor, encode the leading (batch) dim element strides into
+ // the spare payload slots; the load/store/prefetch lowering folds the batch
+ // offsets into the base pointer with these, keeping the 2D-block surface at
+ // the innermost matrix. 2D descriptors leave these slots at 0.
+ if (rank > 2) {
+ if (rank - 2 > 3)
+ return rewriter.notifyMatchFailure(
----------------
charithaintc wrote:
check for validity before generating any new IR. this check must be hoisted. if we fail at this point, we keep dangling IR.
https://github.com/llvm/llvm-project/pull/215711
More information about the Mlir-commits
mailing list