| 61 | |
| 62 | template <bool check_exec_pause, bool check_exec_mask> |
| 63 | void NormalExecEnv::run_task_seq_impl(const TaskSeq& seq) { |
| 64 | OperatorNodeBase* cur_opr = nullptr; |
| 65 | MGB_MARK_USED_VAR(cur_opr); |
| 66 | MGB_TRY { |
| 67 | for (auto&& i : seq) { |
| 68 | cur_opr = i.opr; |
| 69 | #if MGB_ENABLE_COND_EXEC |
| 70 | if (check_exec_mask) { |
| 71 | if (i.mask && !i.mask->enabled()) { |
| 72 | continue; |
| 73 | } |
| 74 | } |
| 75 | #endif |
| 76 | i.task(); |
| 77 | |
| 78 | if (check_exec_pause) { |
| 79 | wait_resume_if_paused(); |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | MGB_CATCH(MegBrainError & exc, { |
| 84 | if (cur_opr && !exc.extra_info()) |