Skip to content

[CPU] Use option to tile with scf.forall in TileRootAndFuseProducerConsumer pass - #21198

Merged
hanhanW merged 2 commits into
iree-org:mainfrom
AaronStGeorge:stgeorge-aaron/cpu-tile-using-forall_4/4
Jun 26, 2025
Merged

hanhanW merged 2 commits into
iree-org:mainfrom
AaronStGeorge:stgeorge-aaron/cpu-tile-using-forall_4/4

Conversation

@AaronStGeorge

Copy link
Copy Markdown
Contributor

This PR is part of a larger change moving LLVMCPUTileRootAndFuseProducerConsumer's tiling of parallel dimensions to use scf.forall rather than scf.for; allowing us to take advantage of some canonicalization patterns available on scf.forall. The patterns available prevent redundant stack allocations seen in #20792. Tiling parallel dimensions with scf.forall rather than scf.for could also be said to be semantically cleaner.

As part of that change, this PR uses the new option to TileRootAndFuseProducerConsumer in the mmt4d pipeline which will tile with scf.forall. As later patterns in the pipeline expect scf.for, this PR also adds pass to convert back to scf.for from scf.forall to the mmt4d pipeline.

PR 4/4 addressing #20792

…Consumer pass

This PR is part of a larger change moving LLVMCPUTileRootAndFuseProducerConsumer's tiling of parallel dimensions to use scf.forall rather than scf.for; allowing us to take advantage of some canonicalization patterns available on scf.forall. The patterns available prevent redundant stack allocations seen in iree-org#20792. Tiling parallel dimensions with scf.forall rather than scf.for could also be said to be semantically cleaner.

As part of that change, this PR uses the new option to TileRootAndFuseProducerConsumer in the mmt4d pipeline which will tile with scf.forall. As later patterns in the pipeline expect `scf.for`, this PR also adds pass to convert back to `scf.for` from `scf.forall` to the mmt4d pipeline.

PR 4/4 addressing iree-org#20792

@hanhanW hanhanW left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hanhanW
hanhanW enabled auto-merge (squash) June 26, 2025 17:52
@hanhanW
hanhanW merged commit f8c6ebb into iree-org:main Jun 26, 2025
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
…Consumer pass (#21198)

This PR is part of a larger change moving
LLVMCPUTileRootAndFuseProducerConsumer's tiling of parallel dimensions
to use scf.forall rather than scf.for; allowing us to take advantage of
some canonicalization patterns available on scf.forall. The patterns
available prevent redundant stack allocations seen in #20792.
Tiling parallel dimensions with scf.forall rather than scf.for could
also be said to be semantically cleaner.

As part of that change, this PR uses the new option to
TileRootAndFuseProducerConsumer in the mmt4d pipeline which will tile
with scf.forall. As later patterns in the pipeline expect `scf.for`,
this PR also adds pass to convert back to `scf.for` from `scf.forall` to
the mmt4d pipeline.

PR 4/4 addressing #20792
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.

2 participants