Icemist commented on code in PR #13726:
URL: https://github.com/apache/tvm/pull/13726#discussion_r1064141278
##########
src/runtime/profiling.cc:
##########
@@ -894,15 +891,21 @@ PackedFunc WrapTimeEvaluator(PackedFunc pf, Device dev,
int number, int repeat,
std::max((min_repeat_ms / (duration_ms / number) + 1), number *
golden_ratio));
}
+ int64_t accum_t_nanos = 0;
// start timing
- Timer t = Timer::Start(dev);
for (int j = 0; j < number; ++j) {
+ // call preprocessing function
+ if (f_preproc != nullptr) {
+ f_preproc.CallPacked(args, &temp);
Review Comment:
> Thanks for the clarification, I'll fix it soon. Unfortunately it looks
like there are a lot of misuse of `number` in the codebase, maybe we should
create another PR fixing them.
I don't think it matters that much if we are satisfied with the average
number and don't need to call f_preproc. So don't be too eager about it.
##########
src/runtime/profiling.cc:
##########
@@ -894,15 +891,21 @@ PackedFunc WrapTimeEvaluator(PackedFunc pf, Device dev,
int number, int repeat,
std::max((min_repeat_ms / (duration_ms / number) + 1), number *
golden_ratio));
}
+ int64_t accum_t_nanos = 0;
// start timing
- Timer t = Timer::Start(dev);
for (int j = 0; j < number; ++j) {
+ // call preprocessing function
+ if (f_preproc != nullptr) {
+ f_preproc.CallPacked(args, &temp);
Review Comment:
> Thanks for the clarification, I'll fix it soon. Unfortunately it looks
like there are a lot of misuse of `number` in the codebase, maybe we should
create another PR fixing them.
I don't think it matters that much if we are satisfied with the average
number and don't need to call f_preproc. So don't be too eager about it.
--
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]