Skip to content

[AutoScheduler] Support early_stopping per task#7377

Merged
masahi merged 7 commits into
apache:mainfrom
comaniac:ansor_early_stop
Feb 5, 2021
Merged

[AutoScheduler] Support early_stopping per task#7377
masahi merged 7 commits into
apache:mainfrom
comaniac:ansor_early_stop

Conversation

@comaniac

Copy link
Copy Markdown
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
Copy Markdown
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

comaniac commented Feb 1, 2021

Copy link
Copy Markdown
Contributor Author

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.

Comment thread python/tvm/auto_scheduler/task_scheduler.py
@masahi

masahi commented Feb 2, 2021

Copy link
Copy Markdown
Member

@comaniac please kick the CI again

Comment thread python/tvm/auto_scheduler/task_scheduler.py Outdated
@masahi

masahi commented Feb 3, 2021

Copy link
Copy Markdown
Member

seems CI is having an issue

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

masahi commented Feb 5, 2021

Copy link
Copy Markdown
Member

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