[VTA] [RPC][profiling.cc] What does code actually do?

Hi , everyone . I trace profiling.cc code , trying to understand the code .

I have a question about comment ,which is " // skip first time call, to activate lazy compilation components."

why it have to skip first time call ,I can’t understand

PackedFunc WrapTimeEvaluator(PackedFunc pf, Device dev, int number, int repeat, int min_repeat_ms, int limit_zero_time_iterations, int cooldown_interval_ms, int repeats_to_cooldown, int cache_flush_bytes, PackedFunc f_preproc) { ICHECK(pf != nullptr);

if (static_cast(dev.device_type) == static_cast(kDLMicroDev)) { auto get_micro_time_evaluator = runtime::Registry::Get(“micro._GetMicroTimeEvaluator”); ICHECK(get_micro_time_evaluator != nullptr) << “micro backend not enabled”; return (*get_micro_time_evaluator)(pf, dev, number, repeat); }

auto ftimer = [pf, dev, number, repeat, min_repeat_ms, limit_zero_time_iterations, cooldown_interval_ms, repeats_to_cooldown, cache_flush_bytes, f_preproc](TVMArgs args, TVMRetValue* rv) mutable { TVMRetValue temp; std::ostringstream os; // skip first time call, to activate lazy compilation components. pf.CallPacked(args, &temp); …

Thank you

W.H