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

Method clear

src/opr-mm/impl/group_manager.cpp:98–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void GroupInfo::clear() {
99 std::unique_lock<std::mutex> lk{m_group_mtx};
100 m_count--;
101 if (m_count == 0) {
102 m_opr_infos.clear();
103 m_rank_map.clear();
104 m_root_rank = -1;
105 m_nr_expected_devs = 0;
106 m_nr_registered_devs = 0;
107 m_output_shape.invalidate();
108 m_clear_cv.notify_all();
109 } else {
110 m_clear_cv.wait(lk, [&] { return m_count == 0; });
111 }
112}
113
114/* ================= GroupManager ================= */
115

Callers 15

opr_registerMethod · 0.45
group_barrierMethod · 0.45
TESTFunction · 0.45
convolution.cppFile · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
init_shapesMethod · 0.45
register_oprMethod · 0.45
resetMethod · 0.45

Calls 2

invalidateMethod · 0.80
waitMethod · 0.45

Tested by 3

TESTFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36