-
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
1) fixes in loop partitioning algorithm 2) added a testcase #2956
Conversation
e67dbcc
to
5c5bdf9
Compare
@derisavi please also tag more reviewers |
@anijain2305 @MarisaKirisame @xqdan @yzhliu Please review. Thanks. |
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.
To be clear, the code before my change did handle multiple vars in the same condition. My change fixes other problems (e.g., in some cases we didn't recursively partition pre- or post-subranges, and we didn't partition based on when conditions are false). |
5c5bdf9
to
d2cfa36
Compare
arith::Interval interval = kv.second.as<arith::IntervalSet>()->i; | ||
auto intersection = arith::Interval::make_intersection(interval, for_interval); | ||
|
||
// TODO(derisavi): the following if statement needs to be removed as soon as |
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.
should this be removed?
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.
Not yet. The commit of HalideIR currently used in master branch of tvm is 55ba177 which is older than a768f2f0 that is required to remove that if statement.
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.
can you update the submodule then remove here?
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 tried to pick latest commit in HalideIR but apparently because of this commit (dmlc/HalideIR@92ef20f) , TVM source code compilation gives an error. I once tried to fix this compile problem but it wasn't trivial and required understanding the code change in HalideIR. (@jroesch can you please take a look and help us out?)
So we can either 1) wait for this compile problem to be fixed, perform the TODO, and then merge this PR or 2) merge this PR, wait for the compile problem to be fixed and then perform the TODO? I'm open to both but I prefer (2).
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.
@derisavi Okay, let us merge the PR for now
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.
@derisavi Could you try other commit like HEAD~1
besides the head
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.
The change I need is at HEAD
and the problematic commit is HEAD~1
and TVM is currently using HEAD~2
. So trying HEAD~1
wouldn't resolve the problem.
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 rebased/squashed and pushed with the TODO item still in the code.
d2cfa36
to
3772dd5
Compare
…sed when double splitting with indivisible factors 2) added a testcase
3772dd5
to
5c45b37
Compare
Thanks @derisavi , this is merged |
…sed when double splitting with indivisible factors 2) added a testcase (apache#2956)
…sed when double splitting with indivisible factors 2) added a testcase (apache#2956)
This fixes #2898. The main changes are:
I did my best to keep the changes as small as possible, i.e., if we remove the code for any of the changes above, we won't generate correct code.
@tqchen @ZihengJiang please review.