Browse Source

fix(mgb/atlas): fix issue with profiling on Atlas

GitOrigin-RevId: fbae81940d
release-1.10
Megvii Engine Team 3 years ago
parent
commit
a4f019e79d
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/plugin/impl/profiler.cpp

+ 6
- 0
src/plugin/impl/profiler.cpp View File

@@ -157,6 +157,12 @@ std::shared_ptr<json::Object> GraphProfiler::to_json() const {
auto&& event = kern_ev.second; auto&& event = kern_ev.second;
auto&& start = m_start_of_time->at(comp_node); auto&& start = m_start_of_time->at(comp_node);
event.end->host_wait(); event.end->host_wait();
//! every event needs to be synchronized on the atlas to ensure that the event
//! completes ???
#if MGB_ATLAS
event.kern->host_wait();
event.start->host_wait();
#endif
opr_prof[comp_node.to_string()] = Object::make({ opr_prof[comp_node.to_string()] = Object::make({
{"start", Number::make(start->elapsed_time_until(*event.start))}, {"start", Number::make(start->elapsed_time_until(*event.start))},
{"kern", Number::make(start->elapsed_time_until(*event.kern))}, {"kern", Number::make(start->elapsed_time_until(*event.kern))},


Loading…
Cancel
Save