[all-commits] [llvm/llvm-project] e28704: [MLIR][Shard] Fix three bugs in ND mesh resharding...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Mon Apr 13 10:57:49 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e28704544f6a62f63488196d3e9de206c4f1c998
      https://github.com/llvm/llvm-project/commit/e28704544f6a62f63488196d3e9de206c4f1c998
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M mlir/lib/Dialect/Shard/Transforms/Partition.cpp
    M mlir/test/Dialect/Shard/resharding-partition.mlir

  Log Message:
  -----------
  [MLIR][Shard] Fix three bugs in ND mesh resharding in Partition pass (#189241)

A new MoveLastSplitAxisPattern class handles the case where the last
grid axis of one tensor dimension is moved to the front of another
tensor dimension's split axes, e.g. [[0, 1], [2]] -> [[0], [1, 2]].

The three bugs fixed are:

1. detectMoveLastSplitAxisInResharding: compared source.back() with
target.back() instead of target.front(), preventing the pattern from
being detected for resharding like [[0,1],[2]] -> [[0],[1,2]].

2. targetShardingInMoveLastAxis: axes were appended with push_back but
should be inserted at the front, producing wrong split_axes order.

3. handlePartialAxesDuringResharding: a copy_if wrote results into the
wrong output variable (addressed structurally by the clean
implementation).

Fixes #136117

Assisted-by: Claude Code



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