MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / ensure_start_time

Method ensure_start_time

src/plugin/impl/profiler.cpp:113–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void GraphProfiler::ensure_start_time() {
114 if (!m_start_of_time.valid()) {
115 // set up for the first time
116 m_start_of_time = CompNode::UnorderedMap<std::unique_ptr<CompNode::Event>>();
117
118 for (auto i : *m_used_comp_node) {
119 i.sync();
120 auto&& event = m_start_of_time.val()[i];
121 event = i.create_event(CompNode::Event::NEED_TIMER);
122 event->record();
123 }
124 }
125}
126
127void GraphProfiler::record_event(CompNodeEventPtr& dest, CompNode comp_node) {
128 if (!dest)

Callers

nothing calls this directly

Calls 4

validMethod · 0.45
syncMethod · 0.45
create_eventMethod · 0.45
recordMethod · 0.45

Tested by

no test coverage detected