From 13d9671fbf6401d21e1eeed9006ac55d2f873ea3 Mon Sep 17 00:00:00 2001 From: Cody Yu Date: Tue, 9 Mar 2021 05:38:13 -0800 Subject: [PATCH] [Bugfix][AutoScheduler] Correctly resume status (#7614) --- python/tvm/auto_scheduler/task_scheduler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tvm/auto_scheduler/task_scheduler.py b/python/tvm/auto_scheduler/task_scheduler.py index b6b05298aef7..0221870badcf 100644 --- a/python/tvm/auto_scheduler/task_scheduler.py +++ b/python/tvm/auto_scheduler/task_scheduler.py @@ -516,9 +516,9 @@ def _restore_status(self, log_file, num_measures_per_round): if res.error_no == 0: cost = array_mean(res.costs) - if self.best_costs[task_idx] < cost: + if cost < self.best_costs[task_idx]: self.best_costs[task_idx] = cost - self.task_best_cts = self.task_cts[task_idx] + self.task_best_cts[task_idx] = self.task_cts[task_idx] for idx in range(len(self.tasks)): if self.task_cts[idx] - self.task_best_cts[idx] > self.early_stopping_task: