Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[mlir][sparse] implement sparse space collapse pass. #89003
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
[mlir][sparse] implement sparse space collapse pass. #89003
Changes from all commits
cbe0ef1
99247e9
6354d18
730c685
304c043
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like
innermost
isn't removed by this pass. Is that on purpose? That isn't visible from the unit tests or the documentation currently. How will it be removed?If that op were removed, you could also avoid the clone and, instead, create a new op and move the body region there, which would be cheaper...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since
innermost
is nested in the outermost loop (root
), I would assume that it will be erased together with the outermost loop. Am I wrong?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering whether this couldn't be a pattern. I guess the answer is: currently no because we want to collect all collapsible loops in one go.
Eventually, you might want to be able to merge an already collapsed iteration with the next collapsible level. In that case, you could solve the special case of only non-collapsed ops by repeatedly applying the previous logic. Maybe that could work as patterns then...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, we can probably transfer it into a pattern. But I would also like to collapse all eligible loops in one run.