-
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
[ETHOSU] Add early simplify to fix LoopPartition #9387
Conversation
Certain loops aren't correctly partitioned if the loop condition hasn't been simplified. This can happen when a copy loop is split by a non-factor. To fix this, an additional simplify pass is added to the TIR pipeline prior to LoopPartition. Change-Id: Icd4ff14648ccaed41384da50c6d183a122b30048
Just for enlightenment, what's a "non-factor" and what does the Simplify pass do to help us? Otherwise, LGTM! |
A non-factor split would be one where, for instance, we want to split an axis of length 16 into stripes of length 7, so we'd get two stripes of 7 plus a residual of 2. This contrasts with a factor split which would be something like 8. In handling the edge case behaviour, some 'if' statements get inserted into TIR, and for I reason I don't fully understand these confuse LoopPartition unless their condition is simplified with the Simplify pass. |
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
Thanks for the PR! @mbaret . |
Change-Id: I9c9dc2ee2c679861866b23531e88584b94198e51
a12715e
to
7ec99a7
Compare
Good spot, forgot the fmt off :) I've fixed that now. |
* [ETHOSU] Add early simplify to fix LoopPartition Certain loops aren't correctly partitioned if the loop condition hasn't been simplified. This can happen when a copy loop is split by a non-factor. To fix this, an additional simplify pass is added to the TIR pipeline prior to LoopPartition. Change-Id: Icd4ff14648ccaed41384da50c6d183a122b30048 * Fix linting again Change-Id: I9c9dc2ee2c679861866b23531e88584b94198e51
* [ETHOSU] Add early simplify to fix LoopPartition Certain loops aren't correctly partitioned if the loop condition hasn't been simplified. This can happen when a copy loop is split by a non-factor. To fix this, an additional simplify pass is added to the TIR pipeline prior to LoopPartition. Change-Id: Icd4ff14648ccaed41384da50c6d183a122b30048 * Fix linting again Change-Id: I9c9dc2ee2c679861866b23531e88584b94198e51
Certain loops aren't correctly partitioned if the loop condition hasn't been simplified. This can happen when a copy loop is split by a non-factor. To fix this, an additional simplify pass is added to the TIR pipeline prior to LoopPartition.