Skip to content
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

[AutoScheduler] Support early_stopping per task #7377

Merged
merged 7 commits into from
Feb 5, 2021

Conversation

comaniac
Copy link
Contributor

Per discussion in https://discuss.tvm.apache.org/t/ansor-task-scheduler-spending-too-much-trial-on-dead-end-tasks/8955, this PR improves the early stopping criteria in the task scheduler. Now we have two early stopping factors:

  • TuningOptions.early_stopping: Like other options in this object, the early_stopping in TuningOptions affects each task.
  • task_scheduler.tune(..., early_stopping=None): Since this is only for task_scheduler, this early_stopping applies to an entire tuning process.

Accordingly, when setting TuningOptions.early_stopping, a task will be stopped early if it has no improvement for N measurements, but the task scheduler will keep tuning rest tasks. On the other hand, task_scheduler.tune(..., early_stopping) serves as the original functionality that early stops an entire tuning process after no improvement for N measurements (regardless which tasks).

cc @merrymercy @masahi

@merrymercy
Copy link
Member

I suggest that we can use TuneOption.early_stopping for all tasks, because TuneOption.num_measure_trials is the sum of measurements for all tasks.
We can use task_scheduler.tune(..., per_task_early_stopping=None) for per task early stopping.

@comaniac
Copy link
Contributor Author

comaniac commented Feb 1, 2021

I suggest that we can use TuneOption.early_stopping for all tasks, because TuneOption.num_measure_trials is the sum of measurements for all tasks.
We can use task_scheduler.tune(..., per_task_early_stopping=None) for per task early stopping.

Fair enough. Updated.

@masahi
Copy link
Member

masahi commented Feb 2, 2021

@comaniac please kick the CI again

@masahi
Copy link
Member

masahi commented Feb 3, 2021

seems CI is having an issue

@masahi masahi merged commit d8313d0 into apache:main Feb 5, 2021
@masahi
Copy link
Member

masahi commented Feb 5, 2021

Thanks @comaniac @merrymercy

@comaniac comaniac deleted the ansor_early_stop branch February 5, 2021 22:41
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 11, 2021
* [AutoScheduler] Support early_stopping per task

* address comment

* fix test

* Update python/tvm/auto_scheduler/task_scheduler.py

* Update python/tvm/auto_scheduler/task_scheduler.py

* trigger ci

* trigger ci
Lokiiiiii pushed a commit to Lokiiiiii/tvm that referenced this pull request Mar 2, 2021
* [AutoScheduler] Support early_stopping per task

* address comment

* fix test

* Update python/tvm/auto_scheduler/task_scheduler.py

* Update python/tvm/auto_scheduler/task_scheduler.py

* trigger ci

* trigger ci
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2021
* [AutoScheduler] Support early_stopping per task

* address comment

* fix test

* Update python/tvm/auto_scheduler/task_scheduler.py

* Update python/tvm/auto_scheduler/task_scheduler.py

* trigger ci

* trigger ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants