提交 27503620 编写于 作者: M Megvii Engine Team

fix(fastrun): release free blocks before profiling

GitOrigin-RevId: b0d9887e9a947f1ae1fc5ea809fbee4336879df4
上级 08cc1032
......@@ -234,6 +234,9 @@ typename TimedProfiler<Opr>::TResult TimedProfiler<Opr>::prof_impl(
using namespace std::literals;
std::this_thread::sleep_for(1000us);
}
// release all free blocks owned by child process,
// in order to avoid main process running out of memory
cn.try_coalesce_all_free_memory();
mgb_assert(ev_start->finished());
return TResult::from_pod(Result{ev_start->elapsed_time_until(*ev_end)});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册