echuraev commented on code in PR #13824:
URL: https://github.com/apache/tvm/pull/13824#discussion_r1084036442
##########
src/meta_schedule/database/memory_database.cc:
##########
@@ -68,20 +68,20 @@ class MemoryDatabaseNode : public DatabaseNode {
std::vector<std::pair<double, TuningRecord>> results;
results.reserve(records.size());
for (const TuningRecord& record : records) {
- if (!record->run_secs.defined()) {
- continue;
- }
- Array<FloatImm> run_secs = record->run_secs.value();
- if (run_secs.empty()) {
+ auto run_secs = record->run_secs;
+ 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; })) {
Review Comment:
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](https://github.com/apache/tvm/blob/main/src/meta_schedule/utils.h#L456).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]