[all-commits] [llvm/llvm-project] 3a3d2c: [mlir][xegpu] Fix expandDim distribution for shape...

Jianhui Li via All-commits all-commits at lists.llvm.org
Thu Jul 9 16:06:41 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a3d2cbc194b09e1a8bbbe1d3abb09c268cb3236
      https://github.com/llvm/llvm-project/commit/3a3d2cbc194b09e1a8bbbe1d3abb09c268cb3236
  Author: Jianhui Li <jian.hui.li at intel.com>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    M mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
    M mlir/test/Dialect/XeGPU/propagate-layout-inst-data.mlir
    M mlir/test/Dialect/XeGPU/propagate-layout-subgroup.mlir
    M mlir/test/Dialect/XeGPU/propagate-layout.mlir

  Log Message:
  -----------
  [mlir][xegpu] Fix expandDim distribution for shape_cast layout inference (#205987)

The expanded dims of a shape_cast collapse are row-major (innermost is
fastest-varying), so sg_layout/lane_layout must be distributed
inner-to-outer rather than outer-to-inner, and jointly with the data
component: distribute sg_data/lane_data first, then stride
sg_layout/lane_layout over the per-dim leftover.

Example — shape_cast [8,32,32] -> [256,32] (consumer lane_layout=[8,4],
lane_data=[2,1], order=[0,1]),
  inferred source layout:
before: inst_data=[8,2,4], lane_layout=[8,1,4], lane_data=[1,2,1],
order=[1,0,2] # lanes on slow dim
after: inst_data=[1,16,4], lane_layout=[1,8,4], lane_data=[1,2,1],
order=[1,0,2] # lanes wrap to fast dim

This also fixes wrap-around, e.g. [2,16]->[32] with sg_layout=[4],
sg_data=[4] → sg_layout=[1,4], sg_data=[1,4].

assisted-by-claude

Co-authored-by: Claude Opus 4.8 (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