[Mlir-commits] [mlir] [MLIR][XeGPU] Refactor XeGPU layout propagation: passing lane_layout/lane_data with inst_data (PR #203156)

Mikael Holmen llvmlistbot at llvm.org
Tue Jun 23 22:47:27 PDT 2026


================
@@ -370,6 +370,86 @@ void xegpu::removeTemporaryLayoutAttrs(Operation *op) {
   });
 }
 
+/// Returns true if every dimension of `shape` except the innermost
+/// `numInnerDims` is a unit (size-1) dimension.
+static bool leadingDimsAreUnit(ArrayRef<int64_t> shape, int numInnerDims) {
----------------
mikaelholmen wrote:

@Jianhui-Li 
Without asserts:
```
/repo/llvm/mlir/lib/Dialect/XeGPU/Transforms/XeGPULayoutImpl.cpp:375:13: error: unused function 'leadingDimsAreUnit' [-Werror,-Wunused-function]
  375 | static bool leadingDimsAreUnit(ArrayRef<int64_t> shape, int numInnerDims) {
      |             ^~~~~~~~~~~~~~~~~~
```

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


More information about the Mlir-commits mailing list