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/09/10 17:19:54 UTC

[GitHub] [tvm] comaniac opened a new pull request #8984: [AutoScheduler] Fix task scheduler after 8478

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


   #8478 added `.value` to the use of `cur_score`. However, its type may not be a TVM primitive but a numpy value. In this case, we will encounter the following error:
   
   ```
   total_latency_str = "%.3f" % (task_scheduler.cur_score.value * 1e3)
   AttributeError: 'numpy.float64' object has no attribute 'value
   ```
   
   Although I cannot find the reason why `cur_score` would be a TVM primitive, I make sure its producer `_compute_score` returns a native/numpy value in this PR.
   
   cc @echuraev @jcf94 


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] comaniac commented on a change in pull request #8984: [AutoScheduler] Fix task scheduler after 8478

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



##########
File path: python/tvm/auto_scheduler/task_scheduler.py
##########
@@ -480,7 +480,8 @@ def _tune_task(self, task_idx):
 
     def _compute_score(self, costs):
         """compute the objective function"""
-        return self.objective_func(costs)
+        score = self.objective_func(costs)

Review comment:
       ```suggestion
           # Make sure to return float.
           score = self.objective_func(costs)
   ```
   




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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] vinx13 merged pull request #8984: [AutoScheduler] Fix task scheduler after 8478

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


   


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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