[all-commits] [llvm/llvm-project] 859319: [XeGPU][Transform] Add XeGPU array length optimiza...

Md Abdullah Shahneous Bari via All-commits all-commits at lists.llvm.org
Mon May 4 13:15:39 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 859319117d00d94be97711360c97ecf88dec704d
      https://github.com/llvm/llvm-project/commit/859319117d00d94be97711360c97ecf88dec704d
  Author: Md Abdullah Shahneous Bari <md.abdullah.shahneous.bari at intel.com>
  Date:   2026-05-04 (Mon, 04 May 2026)

  Changed paths:
    M mlir/include/mlir/Dialect/XeGPU/Transforms/Transforms.h
    M mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
    M mlir/lib/Dialect/XeGPU/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/XeGPU/Transforms/XeGPUArrayLengthOptimization.cpp
    M mlir/lib/Dialect/XeGPU/Transforms/XeGPUPeepHoleOptimizer.cpp
    A mlir/test/Dialect/XeGPU/array-len-op-unit.mlir
    M mlir/test/Dialect/XeGPU/ops.mlir
    M mlir/test/Dialect/XeGPU/peephole-optimize.mlir
    M mlir/test/Dialect/XeGPU/sg-to-wi-experimental-unit.mlir
    M mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
    M mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp

  Log Message:
  -----------
  [XeGPU][Transform] Add XeGPU array length optimization patterns. (#194062)

This PR adds array_length optimization patterns and a test pass. 
These patterns are used as part of the `XeGPUPeepHoleOptimizerPass`.

These patterns optimize `xegpu.create_nd_desc`, `xegpu.load_nd` and
`xegpu.prefetch_nd`
operations by introducing the array_length attribute when the FCD
(fastest changing
dimension) is larger than the subgroup size (i.e., 16).

The transformation updates:
1. `tensor_desc` type to use array_length and reduced FCD: `shape<32x32>
→ shape<32x16, array_length=2>`
2. `load_nd/prefetch_nd` result vector shape to match register layout:
`vector<32x32> → vector<64x16> (register layout)`
3. `vector.extract_strided_slice` operations to account for memory vs
   register layout difference

Also, change XeGPU verifier to support 2D stacked layout (array blocks
stacked vertically).



Co-Authored-By: Claude Sonnet 4.5 <noreply at anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <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