| 117 | } |
| 118 | |
| 119 | void 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 | |
| 138 | int EagerEvalManager::check_version(OperatorNodeBase* opr) { |
no test coverage detected