Skip to content

[DispatchCreation] Collapse dynamic dims - #19654

Merged
IanWood1 merged 2 commits into
iree-org:mainfrom
IanWood1:dynamic_dim_changes
Feb 14, 2025
Merged

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

Conversation

@IanWood1

@IanWood1 IanWood1 commented Jan 9, 2025 •

Copy link
Copy Markdown
Member

Enable collapsing dynamic dimensions in CollapseDimensionsPass

I'm fairly certain that the issue with the sharktank tests is unrelated to CollapseDimensions, I fully disabled it an still hit the same error. A similar issue was experienced when testing IREE with llvm/llvm-project#113501. This was ran on CI on commit 62b4c1c (see parent commit for llvm submodule change)

@IanWood1 IanWood1 changed the title Test upstream changes for expand shape dyn dims [Dispatch] Collapse dynamic dims Jan 9, 2025
@IanWood1
IanWood1 force-pushed the dynamic_dim_changes branch 2 times, most recently from 13452de to 62c2e1e Compare January 13, 2025 23:25
@Groverkss

Copy link
Copy Markdown
Contributor

Looks like the first two patches landed in some form. llvm/llvm-project#118208 is ready for review, so we can make progress on this patch soon.

@IanWood1

Copy link
Copy Markdown
Member Author

Thank you @Groverkss !

@IanWood1
IanWood1 marked this pull request as ready for review February 12, 2025 21:44
@IanWood1

Copy link
Copy Markdown
Member Author

The upstream PR seems close to landing so I'll mark this ready for review.

@IanWood1
IanWood1 force-pushed the dynamic_dim_changes branch from 3a45312 to 2d22746 Compare February 13, 2025 20:47
This seemed to cause regressions because divisibility information seemed
to be lost and BlockDynamicDims couldn't block the dynamic dims of
matmuls.

First I tried running OptimizeIntArithmetic before regions to workgroups
which helped fix an issue with int range optimizations, then I removed
OptimizeIntArithmetic and just expand affine ops after reifying dynamic
dims (which was also good perf-wise).

Signed-off-by: Ian Wood <[email protected]>
@IanWood1 IanWood1 changed the title [Dispatch] Collapse dynamic dims [DispatchCreation] Collapse dynamic dims Feb 14, 2025
@IanWood1
IanWood1 merged commit e2f3565 into iree-org:main Feb 14, 2025
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
Enable collapsing dynamic dimensions in `CollapseDimensionsPass`.

---------

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.

3 participants