Skip to content

Split parallel iteration space to simplify if statements #497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivanradanov
Copy link
Collaborator

The question still stands whether we want this enabled by default or only in some cases because it can have implications on code size.

@ivanradanov ivanradanov requested review from wsmoses and Pangoraw March 19, 2025 00:27
@ivanradanov ivanradanov marked this pull request as draft March 19, 2025 01:47
@ivanradanov ivanradanov force-pushed the ivan/parallel_if_split_v2 branch from 39acfea to f4166d1 Compare March 19, 2025 03:19
@ivanradanov ivanradanov force-pushed the ivan/parallel_if_split_v2 branch from f4166d1 to 557ac2d Compare March 27, 2025 11:30
@ivanradanov
Copy link
Collaborator Author

ivanradanov commented Mar 27, 2025

@wsmoses @ftynse

It looks like this results in less gathers and sliiightly less instructions overall???(or roughly the same)
this is after --affine-cfg --raise-affine-to-stablehlo on this IR

(ins)$ cat after-raise.split.mlir | grep gather | wc -l
144
(cmd)$ cat after-raise.mlir | grep gather | wc -l
186

(cmd)$ cat after-raise.split.mlir | wc -l
275455
(cmd)$ cat after-raise.mlir | wc -l
276531

This currently only handles 1d cases but may be worth to merge until we get 2d working

@ivanradanov ivanradanov force-pushed the ivan/parallel_if_split_v2 branch from 557ac2d to 2c6a55e Compare March 27, 2025 12:34
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