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

Method get_prev_exec_time

src/core/impl/graph/cg_impl_seq.cpp:555–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555double ComputingGraphImpl::ComputingSequence::get_prev_exec_time() const {
556 check_not_finalized();
557 mgb_assert(m_wait_finished);
558 if (m_prev_exec_time.valid()) {
559 return m_prev_exec_time.val();
560 }
561 if (!m_have_parent_graph) {
562 double max_time = 0;
563 for (auto cn : m_used_comp_node) {
564 update_max(
565 max_time,
566 m_event_start.at(cn)->elapsed_time_until(*m_event_end.at(cn)));
567 }
568 m_prev_exec_time = max_time;
569 return max_time;
570 }
571 return 0;
572}
573
574AsyncExecutable& ComputingGraphImpl::ComputingSequence::iter_opr_seq(
575 thin_function<bool(OperatorNodeBase*)> cb) {

Callers 3

run_modelFunction · 0.80
TESTFunction · 0.80
run_all_gatherFunction · 0.80

Calls 4

update_maxFunction · 0.85
elapsed_time_untilMethod · 0.80
validMethod · 0.45
atMethod · 0.45

Tested by 2

TESTFunction · 0.64
run_all_gatherFunction · 0.64