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/08/12 06:35:35 UTC

[GitHub] [tvm] echuraev commented on a diff in pull request #12382: [Profiler] Fix graph_executor_debug hang

echuraev commented on code in PR #12382:
URL: https://github.com/apache/tvm/pull/12382#discussion_r944154716


##########
src/runtime/profiling.cc:
##########
@@ -887,6 +887,8 @@ PackedFunc WrapTimeEvaluator(PackedFunc pf, Device dev, int number, int repeat,
         }
         t->Stop();
         int64_t t_nanos = t->SyncAndGetElapsedNanos();
+        if (t_nanos == 0) absolute_zero_times++;
+        if (absolute_zero_times >= max_repeat_num) break;

Review Comment:
   It doesn't make sense. Because for operations such as `__nop` or `__copy` the `t_nanos` will be always zero. And if we will increase the `numbers` then we won't exit from the infinite loop. What about default value of 100. I used 100 because it is not too much and not too little :) If the user needs to change it, he can do it any time.



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