You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/01/30 01:55:53 UTC

[GitHub] [tvm] comaniac opened a new pull request #7377: [AutoScheduler] Support early_stopping per task

comaniac opened a new pull request #7377:
URL: https://github.com/apache/tvm/pull/7377


   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 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi merged pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #7377:
URL: https://github.com/apache/tvm/pull/7377


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] merrymercy commented on pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
merrymercy commented on pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#issuecomment-770291562


   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.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on a change in pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#discussion_r569002264



##########
File path: python/tvm/auto_scheduler/task_scheduler.py
##########
@@ -246,6 +246,9 @@ def __init__(
         # task_cts[i] saves how many times task i is tuned
         self.task_cts = [0 for _ in range(len(self.tasks))]
 
+        # task_best_cts[i] saves the round that task i found the best latency

Review comment:
       ```suggestion
           # task_best_cts[i] saves the round task i found the best latency
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#issuecomment-772085065


   @comaniac please kick the CI again


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi merged pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #7377:
URL: https://github.com/apache/tvm/pull/7377


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#issuecomment-772085065


   @comaniac please kick the CI again


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#issuecomment-772155398


   seems CI is having an issue


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on a change in pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#discussion_r568284662



##########
File path: python/tvm/auto_scheduler/task_scheduler.py
##########
@@ -246,6 +246,9 @@ def __init__(
         # task_cts[i] saves how many times task i is tuned
         self.task_cts = [0 for _ in range(len(self.tasks))]
 
+        # task_best_cts[i] saves the round task i found the best latency

Review comment:
       ```suggestion
           # task_best_cts[i] saves the round that task i found the best latency
   ```

##########
File path: python/tvm/auto_scheduler/task_scheduler.py
##########
@@ -246,6 +246,9 @@ def __init__(
         # task_cts[i] saves how many times task i is tuned
         self.task_cts = [0 for _ in range(len(self.tasks))]
 
+        # task_best_cts[i] saves the round that task i found the best latency

Review comment:
       ```suggestion
           # task_best_cts[i] saves the round task i found the best latency
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#issuecomment-773854330


   Thanks @comaniac @merrymercy 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on a change in pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#discussion_r568284662



##########
File path: python/tvm/auto_scheduler/task_scheduler.py
##########
@@ -246,6 +246,9 @@ def __init__(
         # task_cts[i] saves how many times task i is tuned
         self.task_cts = [0 for _ in range(len(self.tasks))]
 
+        # task_best_cts[i] saves the round task i found the best latency

Review comment:
       ```suggestion
           # task_best_cts[i] saves the round that task i found the best latency
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#issuecomment-773854330


   Thanks @comaniac @merrymercy 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on pull request #7377: [AutoScheduler] Support early_stopping per task

Posted by GitBox <gi...@apache.org>.
comaniac commented on pull request #7377:
URL: https://github.com/apache/tvm/pull/7377#issuecomment-771029394


   > 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.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org