-
Notifications
You must be signed in to change notification settings - Fork 52
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
Prefer simpler vals in replace sizes #3344
Conversation
!test --diff-bench |
!build |
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
// Within these three classes, we find the IterDomain with the smallest | ||
// name(). | ||
// Within these three classes, we find the IterDomain with the | ||
// smallest name(). For case 3, we also prefer the IterDomain with |
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 guess we could also do this for Case 1 just for readability, but it shouldn't affect the compiled kernel so not important..
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.
Yeah, I didn't do that just because get_number_of_defs
may not be cheap.
!test |
Noticed while working on #3309 that
i0
is replaced withceilDiv(i0, 1)
. While it isn't incorrect, it would make generated code look simpler ifceilDiv(i0, 1)
is replaced withi0
.This PR just changes representative iter domains used for replacing extents. In addition to the existing priority rules, the iter domain with the simplest extent is preferred as the representative ID of a given ID group. The simplicity of extents is just defined based on the number of expressions defining the extent val. So, for example, an iter domain with extent of
i0
should be used as the representative ID instead of iter domains with extentceilDiv(i0, 1)
.There should be no logic change.