Skip to content

[Dispatch Creation] Merge bubbling of expand and extract - #20989

Merged
IanWood1 merged 2 commits into
iree-org:mainfrom
IanWood1:merge_bubble_expand_with_extract
Jun 4, 2025
Merged

IanWood1 merged 2 commits into
iree-org:mainfrom
IanWood1:merge_bubble_expand_with_extract

Conversation

@IanWood1

@IanWood1 IanWood1 commented Jun 3, 2025 •

Copy link
Copy Markdown
Member

This change combines BubbleUpExpandShapes and BubbleUpExtractSlices into a single pass. In cases like linalg.generic -> extract -> expand -> extract -> expand the expand & extract bubbling patterns must be done together and iteratively to be able to bubble all ops through the linalg.generic.

This fixes missed paged attention fusion with the mask.

@IanWood1
IanWood1 marked this pull request as ready for review June 3, 2025 18:18
@IanWood1

IanWood1 commented Jun 3, 2025

Copy link
Copy Markdown
Member Author

I had to remove populateReassociativeReshapeFoldingPatterns due to #20011

@IanWood1
IanWood1 requested a review from Groverkss June 4, 2025 16:13
@IanWood1
IanWood1 merged commit 33958f2 into iree-org:main Jun 4, 2025
IanWood1 added a commit that referenced this pull request Jun 6, 2025
The test added in #20989 would have
properly bubbled during the pipeline prior to the changes. This test
does a better job at checking the goal of the PR.

Signed-off-by: Ian Wood <[email protected]>
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
This change combines `BubbleUpExpandShapes` and `BubbleUpExtractSlices`
into a single pass. In cases like `linalg.generic -> extract -> expand
-> extract -> expand` the expand & extract bubbling patterns must be
done together and iteratively to be able to bubble all ops through the
`linalg.generic`.

This fixes missed paged attention fusion with the mask producer.

---------

Signed-off-by: Ian Wood <[email protected]>
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
The test added in #20989 would have
properly bubbled during the pipeline prior to the changes. This test
does a better job at checking the goal of the PR.

Signed-off-by: Ian Wood <[email protected]>
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