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

Method do_search_update_thresh

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

Source from the content-addressed store, hash-verified

553};
554
555void SeqModifierForSublinearMemory::ActionSearcherSingleCN::do_search_update_thresh(
556 size_t thresh) {
557 ModifyActionPlanner* planner =
558 m_par_modifier->m_thread2planner.at(std::this_thread::get_id()).get();
559
560 planner->init_seq(*m_cur_opr_seq);
561 SplitPointSet split_point_set = planner->get_split_point_set(thresh);
562 auto cur = planner->get_memory_bottleneck(split_point_set);
563
564 MGB_LOCK_GUARD(m_mtx);
565 if (cur < m_min_bottleneck || (cur == m_min_bottleneck && m_best_thresh < thresh)) {
566 m_best_thresh = thresh;
567 m_min_bottleneck = cur;
568 m_best_sps = split_point_set;
569 planner->get_prev_action(m_action);
570 }
571 m_history.emplace_back(thresh, cur);
572 m_cur_records.emplace_back(std::move(split_point_set), cur);
573}
574
575void SeqModifierForSublinearMemory::ActionSearcherSingleCN::
576 do_search_update_split_point_set(SplitPointSet& split_point_set) {

Callers

nothing calls this directly

Calls 7

get_split_point_setMethod · 0.80
get_memory_bottleneckMethod · 0.80
get_prev_actionMethod · 0.80
emplace_backMethod · 0.80
getMethod · 0.45
atMethod · 0.45
init_seqMethod · 0.45

Tested by

no test coverage detected