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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]