Skip to content

Commit

Permalink
[MetaSchedule] Fix a typo in MemoryDatabase
Browse files Browse the repository at this point in the history
This typo was introduced a while ago, but was not uncovered until I was rebasing Relax when a unittest crashes.
  • Loading branch information
junrushao authored Feb 8, 2023
1 parent 7149142 commit 7b52b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/meta_schedule/database/memory_database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class MemoryDatabaseNode : public DatabaseNode {
}
std::stable_sort(results.begin(), results.end(), SortTuningRecordByMeanRunSecs());
if (results.size() > static_cast<size_t>(top_k)) {
return {results.begin(), results.end() + top_k};
return {results.begin(), results.begin() + top_k};
} else {
if (results.size() < static_cast<size_t>(top_k)) {
LOG(WARNING) << "The size of the GetTopK result is smaller than requested. There are not "
Expand Down

0 comments on commit 7b52b4a

Please sign in to comment.