From d4b496d858da0ae43063d47cb03a28b803d0269f Mon Sep 17 00:00:00 2001 From: Masahiro Masuda Date: Sun, 10 Apr 2022 11:33:39 +0900 Subject: [PATCH] revert change in task_scheduler.cc --- src/meta_schedule/task_scheduler/task_scheduler.cc | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/meta_schedule/task_scheduler/task_scheduler.cc b/src/meta_schedule/task_scheduler/task_scheduler.cc index d7b93b9be2252..cd287fc1d4985 100644 --- a/src/meta_schedule/task_scheduler/task_scheduler.cc +++ b/src/meta_schedule/task_scheduler/task_scheduler.cc @@ -128,18 +128,7 @@ void TaskSchedulerNode::Tune() { ICHECK(!task->is_terminated); ICHECK(!task->runner_futures.defined()); SearchStrategy strategy = task->search_strategy.value(); - Optional> candidates = strategy->GenerateMeasureCandidates(); - if (candidates.defined()) { - // Filter out invalid candidates. - // An invalid candidate can arise due to a schdule application failure (e.g. tensorize). - Array valid_candidates; - for (MeasureCandidate candidate : candidates.value()) { - if (candidate.defined()) { - valid_candidates.push_back(candidate); - } - } - - task->measure_candidates = std::move(valid_candidates); + if ((task->measure_candidates = strategy->GenerateMeasureCandidates()).defined()) { num_trials_already += task->measure_candidates.value().size(); SendToBuilder(this->builder, task); SendToRunner(this->runner, task);