-
Notifications
You must be signed in to change notification settings - Fork 70
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
transformations: (riscv_scf) add a pass to fuse perfectly nested loops #2540
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2540 +/- ##
==========================================
- Coverage 89.81% 89.80% -0.01%
==========================================
Files 351 352 +1
Lines 44108 44170 +62
Branches 6592 6603 +11
==========================================
+ Hits 39615 39667 +52
- Misses 3532 3543 +11
+ Partials 961 960 -1 ☔ View full report in Codecov by Sentry. |
transformations: (riscv_scf) add a pass to fuse perfectly nested loops
a665adc
to
5555e34
Compare
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.
Does this pass consider data dependencies between the loops? I think it'd be better to fuse at a higher level (before we get memrefs even) such that we can infer this more easily.
Disregard my uninformed comment |
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.
Thanks for this really neat rewrite! This is very interesting! I would really like to see some more comments and documentation on the conditions and calculations (e.g. it has to be a nested for loop where outer_step = len(inner_range), inner_lb == 0, etc...)
On a side note, I am not sure if I would call this loop fusion. For me it implies that two loop bodies are merged into one. Isn't this closer to a canonicalization? It does not change any actual iteration domains, just simplifies IR.
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.
Thanks!
No description provided.