[all-commits] [llvm/llvm-project] 894dad: [mlir][xegpu] Raise the reduction vector size to m...

Jianhui Li via All-commits all-commits at lists.llvm.org
Sat Oct 3 22:52:54 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 894dad791c0124915dcf6b5093744c9307cffaf2
      https://github.com/llvm/llvm-project/commit/894dad791c0124915dcf6b5093744c9307cffaf2
  Author: Jianhui Li <jian.hui.li at intel.com>
  Date:   2026-10-03 (Sat, 03 Oct 2026)

  Changed paths:
    M mlir/lib/Dialect/XeGPU/Transforms/XeGPULayoutImpl.cpp
    M mlir/lib/Dialect/XeGPU/Transforms/XeGPUPeepHoleOptimizer.cpp
    M mlir/lib/Dialect/XeGPU/Transforms/XeGPUSgToLaneDistribute.cpp
    M mlir/test/Dialect/XeGPU/propagate-layout-inst-data.mlir
    M mlir/test/Dialect/XeGPU/propagate-layout.mlir
    M mlir/test/Integration/Dialect/XeGPU/WG/simple_mxfp_gemm_quantizeA_F4.mlir

  Log Message:
  -----------
  [mlir][xegpu] Raise the reduction vector size to match maxReduceVectorSize (#225122)

`maxReduceVectorSize` was pinned at 1, so a lane reduced one element at
a time no
matter how much data it held. This raises it to 16 and makes the layout
computation actually spend it, so a lane's reduce vector matches the
per-lane
budget.

```cpp
-  int64_t maxReduceVectorSize = 1; // could extend to spirv vector Size
+  int64_t maxReduceVectorSize = 16; // extend to spirv vector Size
```

The PR only raises the vector size for the innermost dim, and only when
that dim is reduced and carries a single lane.

The reason we don't raise vector size for outer dim: Raising the vector
size for the outer dim means the vector may be strided in flat element
order. In case that the producer is a shape_cast op, it causes a
potential convert_layout after shape_cast which assumes all lane data to
be contiguous.

As we simplify propagation rule, the trade-off is that the rule is
conservative since we don't know the information about producer due to
the backward propagation.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list