-
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
[MetaSchedule] Extract task weights during task extraction #10810
[MetaSchedule] Extract task weights during task extraction #10810
Conversation
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, this is import change to #10366, I'll update the PR accordingly.
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
Yeah, I was aware of this issue. I didn't do anything at that time since I was not sure if the order of numbering matters at all, as long as they are unique. Even with this change, I don't know if we can guarantee that the order obtained by |
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 really like the simplicity of this change, compared to how weights are extracted in the auto scheduler... (te_compiler_update_weights
thing)
@masahi Yep exactly, that's my doubt too! For now it is not a problem in terms of correctness, because the names themselves are fine as long as they are unique. The only occasion that I spotted this issue is when doing per-layer performance comparison with Ansor, and the names of each layer becomes a bit...different :-)
That's completely based on your work! Literally standing on the shoulder of your super cool refactoring! |
Task weight is defined as the number of occurrence of a specific task that appears in a Relay function. During task extraction, we use structural equality check to determine the weights.
Also, I noted the numbering of each task could differ between task extraction and scheduled task injection, and I attribute it to different visiting order - I'm not 100% sure but it seems to work. @masahi let's revisit it later after your vacation.
CC: @zxybazh @comaniac