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

Method on_opr_insert

src/core/impl/graph/eager_eval.cpp:119–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void EagerEvalManager::on_opr_insert(OperatorNodeBase* opr) {
120 if (m_first_opr_enable_status == -1) {
121 m_first_opr_enable_status = enabled();
122 }
123 mgb_assert(
124 enabled() == m_first_opr_enable_status,
125 "can not enable/disable eager eval after opr has been inserted");
126
127 if (enabled()) {
128 MGB_TRY { do_on_opr_insert(opr); }
129 MGB_CATCH(MegBrainError & exc, {
130 if (!exc.extra_info()) {
131 OperatorNodeExcExtraInfo::record(opr, exc);
132 }
133 throw;
134 });
135 }
136}
137
138int EagerEvalManager::check_version(OperatorNodeBase* opr) {

Callers 1

cg_impl.cppFile · 0.45

Calls 3

extra_infoMethod · 0.80
MGB_CATCHFunction · 0.70
enabledFunction · 0.50

Tested by

no test coverage detected