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 2022/11/16 17:32:36 UTC

[GitHub] [tvm] zxybazh commented on a diff in pull request #13406: [MetaSchedule][Fix] Fix Empty Run Time Issue when Benchmarking Result

zxybazh commented on code in PR #13406:
URL: https://github.com/apache/tvm/pull/13406#discussion_r1024302240


##########
src/meta_schedule/measure_callback/update_cost_model.cc:
##########
@@ -42,7 +42,8 @@ class UpdateCostModelNode : public MeasureCallbackNode {
     pruned_candidate.reserve(n);
     pruned_runner_result.reserve(n);
     for (int i = 0; i < n; i++) {
-      if (!builder_results[i]->error_msg.defined() &&
+      if (!builder_results[i]->error_msg.defined() &&  //
+          !runner_results[i]->error_msg.defined() &&   //
           Sum(runner_results[i]->run_secs.value()) > 0) {

Review Comment:
   ```suggestion
         if (!builder_results[i]->error_msg.defined() &&  //
             (runner_results[i]->error_msg.defined() ||   //
             Sum(runner_results[i]->run_secs.value()) > 0)) {
   ```



##########
src/meta_schedule/measure_callback/update_cost_model.cc:
##########
@@ -42,7 +42,8 @@ class UpdateCostModelNode : public MeasureCallbackNode {
     pruned_candidate.reserve(n);
     pruned_runner_result.reserve(n);
     for (int i = 0; i < n; i++) {
-      if (!builder_results[i]->error_msg.defined() &&
+      if (!builder_results[i]->error_msg.defined() &&  //
+          !runner_results[i]->error_msg.defined() &&   //

Review Comment:
   We don't need to filter out failed runs because they are expected to be used as negative examples in cost models, for example see [here](https://cs.github.com/apache/tvm/blob/b4d4b82dbb9be2e4d0954f9dfd8e1c46079b66ee/python/tvm/meta_schedule/cost_model/xgb_model.py#L472) for xgboost model usage. I suggest that we change it to check `Sum(...) > 0` only when runner's error message is not defined.



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