[Mlir-commits] [mlir] [MLIR][XeGPU] Enable WG-level mxfp GEMM via generalized shape_cast collapse inference (PR #201496)
Charitha Saumya
llvmlistbot at llvm.org
Tue Jun 9 00:16:43 PDT 2026
================
@@ -214,6 +214,18 @@ def DistributeLayoutAttr: AttrInterface<"DistributeLayoutAttr"> {
"xegpu::DistributeLayoutAttr",
"collapseDims",
(ins "SmallVector<int64_t>": $dimGroup)>,
+ InterfaceMethod<[{Derive a new layout by expanding a single dimension into
+ multiple adjacent dimensions whose extents are given by `targetShape`
+ (`product(targetShape) == originalSize` on `dim`). The original layout's
+ per-dim values on `dim` are distributed across the new dims:
+ `sg_layout` and `lane_layout` spread outer-to-inner (capped per dim by
+ `targetShape[i]`); `sg_data`, `lane_data`, and `inst_data` fill innermost-
+ first; `inst_data` is seeded from `lane_layout * lane_data` per new dim.
+ `order` is rewritten so the expanded dims appear innermost-fastest in the
----------------
charithaintc wrote:
I would add an example here.
[2, 16] -> expand dim 1 to [2, 8] --> [2, 2, 8]
order becomes [0, 1] -> [0, 2, 1] (is this correct?)
https://github.com/llvm/llvm-project/pull/201496
More information about the Mlir-commits
mailing list