-
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] get_top_k should not return not built records #13824
Conversation
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
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.
In general LGTM. One minor question. @Icemist what do you think about that?
if (!run_secs.defined() || run_secs.value().empty() || | ||
std::all_of(run_secs.value().begin(), run_secs.value().end(), | ||
// 1e10 is used as a stub for undefined measurement times. | ||
[](tvm::FloatImm v) { return v.defined() && v->value == 1e10; })) { |
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.
Probably we can define this constant in some common place and reuse it here and in other places?
E.g. as it was done 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 thought about using SortTuningRecordByMeanRunSecs, but memory_database is not sorted unlike json_database.
This constant appears in all tuners and unfortunately there is no common definition for it.
I can suggest to make an NFC patch with refactoring this constant throughout the repository.
…13824) * [Metaschedule] get_top_k should not return not built records * [Metaschedule][NFC] GetTopK extra polishing
Avoid the situation when the records have measurements equal to 1e10, which is used as a stub for an indefinite measurement time, for example, when forming a cost models of the meta scheduler. The result of this will be extracting a record(that fails while building) as the best and an error in applying the tuning.