-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[TIR] Make loop unrolling in LoopPartition optional #6823
Conversation
For certain analysis/tensorization, it can be useful to keep the loop structure when partitioning loops. The current behaviour removes For loops of length 1. This change introduces the option to preserve these loops with the 'unroll' flag. Change-Id: I9a9fea171c2d1f70b466b37da17e1610c04df2dc
Change-Id: I319301d38e59948d786f3588cc125a9a5c1d4da3
Change-Id: I09116a4e32008ded16c32a3a13a9a4740a44c095
Change-Id: Iad5c9baa8ba48b69db500dcc30faf895eaec2508
Change-Id: Ied48064fe986e4eba43a7cb10fc2c1bd2f28d06c
cc @tqchen |
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.
Please find some high level comments.
Could you please share if it is possible, in which scenario you need to preserve the single iter loops ?
Also cc @MarisaKirisame ! |
Change-Id: If1b336eb27da0a728cc99034a362bf86391abd28
In terms of why I need this, I want to do some pattern matching on loops to determine if they correspond to a particular operation. This is made a lot more consistent if loops of extent 1 aren't dropped from the IR. |
Thanks @mbaret I understand where you are coming from. Ideally we would also like to develop tools to be able to detect patterns that also removes these trivial loops. But we can tackle that later |
Change-Id: Idcd28eb1d750e057a7ec48be3546e0581efe7c33
Thanks @mbaret , i got your point and concur in case of pattern matching. Also I totally support the idea of having more control over optimization techniques :) |
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.
LGTM provided CI is totally green this time 🙂
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.
Thank for addressing my comments! LGTM
* [TIR] Make loop unrolling in LoopPartition optional For certain analysis/tensorization, it can be useful to keep the loop structure when partitioning loops. The current behaviour removes For loops of length 1. This change introduces the option to preserve these loops with the 'unroll' flag.
* [TIR] Make loop unrolling in LoopPartition optional For certain analysis/tensorization, it can be useful to keep the loop structure when partitioning loops. The current behaviour removes For loops of length 1. This change introduces the option to preserve these loops with the 'unroll' flag.
* [TIR] Make loop unrolling in LoopPartition optional For certain analysis/tensorization, it can be useful to keep the loop structure when partitioning loops. The current behaviour removes For loops of length 1. This change introduces the option to preserve these loops with the 'unroll' flag.
For certain analysis/tensorization, it can be useful to keep the loop structure when partitioning loops. The current behaviour removes For loops of length 1. This change introduces the option to preserve these loops with the 'unroll' flag.