jcf94 commented on a change in pull request #7197:
URL: https://github.com/apache/tvm/pull/7197#discussion_r551211822



##########
File path: python/tvm/auto_scheduler/cost_model/xgb_model.py
##########
@@ -141,6 +146,12 @@ def update(self, inputs, results):
         self.inputs.extend(inputs)
         self.results.extend(results)
 
+        if len(self.inputs) - self.last_train_length < self.last_train_length 
/ 5:

Review comment:
       When there're too many logs, auto scheduler will spend much time on cost 
model training than program measuring in each search round.
   This modification is just used to reduce the times of cost model training. 
At the beginning, we train the cost model in each search round, and when many 
logs are accumulated, we train the cost model after several search rounds.
   
   `len(self.inputs) - self.last_train_length` is the increased measure pairs 
since last training, we should not just use `len(inputs)`.
   And the number 5 is just a magic number I pick, I'm not sure how to choose a 
better threshold.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to