| 55 | } |
| 56 | |
| 57 | void VarValueChecker::on_opr_kern_end(const cg::event::OprExecKernelEnd& event) { |
| 58 | if (event.opr->same_type<opr::AssertEqual>()) { |
| 59 | // do not throw error from assertions in the graph, so error from |
| 60 | // VarValueChecker can be observed |
| 61 | event.opr->cast_final<opr::AssertEqual>().disable_throw_on_error(); |
| 62 | } |
| 63 | for (VarNode* var : event.opr->output()) { |
| 64 | if (!var->contain_flag(VarNode::Flag::VOLATILE_CONTENT)) { |
| 65 | auto callback = [this, var]() { on_var_computed(var); }; |
| 66 | m_vars.push_back(var); |
| 67 | event.env->dispatch_on_comp_node(var->comp_node(), callback); |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | void VarValueChecker::on_comp_seq_exec_finished(const cg::event::CompSeqExecFinished&) { |
| 73 | if (!m_init_val_dumped) { |
nothing calls this directly
no test coverage detected