Skip to content

[Codegen][CPU] Eliminate HoistableConversionOps after lowering inner_… - #24353

Closed
bjacob wants to merge 1 commit into
users/bjacob/cpu-lower-inner-tiled-passfrom
users/bjacob/cpu-eliminate-hoistable-conversions
Closed

bjacob wants to merge 1 commit into
users/bjacob/cpu-lower-inner-tiled-passfrom
users/bjacob/cpu-eliminate-hoistable-conversions

Conversation

@bjacob

@bjacob bjacob commented May 4, 2026

Copy link
Copy Markdown
Collaborator

The CPU LowerInnerTiledPattern and DropInnerTiledUnitDimsPattern
both wrap the per-intrinsic ACC distribute/reassemble in
IREE::Util::HoistableConversionOp pairs (tagged
kDataTiledAcc{Distribute,Reassemble}, kDropUnitDims/kAddUnitDims)
so the conversions can sink/hoist out of any reduction loop wrapping
the intrinsic.

Anything that didn't get hoisted out is a trivial round-trip; calling
IREE::Util::eliminateHoistableConversions on the function at the end
of the pass cancels the surviving pairs. GPU does the same in its
LowerIREEGPUOpsPass.

Strengthens the lower_inner_tiled lit test with a CHECK-NOT: util.hoistable_conversion so the elimination is verified.

Progress towards #24323

…tiled.

The CPU `LowerInnerTiledPattern` and `DropInnerTiledUnitDimsPattern`
both wrap the per-intrinsic ACC distribute/reassemble in
`IREE::Util::HoistableConversionOp` pairs (tagged
`kDataTiledAcc{Distribute,Reassemble}`, `kDropUnitDims`/`kAddUnitDims`)
so the conversions can sink/hoist out of any reduction loop wrapping
the intrinsic.

Anything that didn't get hoisted out is a trivial round-trip; calling
`IREE::Util::eliminateHoistableConversions` on the function at the end
of the pass cancels the surviving pairs. GPU does the same in its
`LowerIREEGPUOpsPass`.

Strengthens the `lower_inner_tiled` lit test with a `CHECK-NOT:
util.hoistable_conversion` so the elimination is verified.

Signed-off-by: Benoit Jacob <[email protected]>

Progress towards #24323
@bjacob bjacob mentioned this pull request May 4, 2026
25 of 28 tasks
@bjacob
bjacob marked this pull request as ready for review May 4, 2026 16:51
@bjacob
bjacob requested a review from hanhanW as a code owner May 4, 2026 16:51
@bjacob
bjacob deleted the branch users/bjacob/cpu-lower-inner-tiled-pass May 4, 2026 18:05
@bjacob bjacob closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant