[Mlir-commits] [mlir] [MLIR][XeGPU] Enable WG-level mxfp GEMM via generalized shape_cast collapse inference (PR #201496)

Charitha Saumya llvmlistbot at llvm.org
Wed Jun 10 09:03:55 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:

ok. I would add a comment saying. if order is omitted the default "FCD first order" is assumed.  

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


More information about the Mlir-commits mailing list