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

Method on_opr_kern_end

src/plugin/impl/var_value_checker.cpp:57–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void 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
72void VarValueChecker::on_comp_seq_exec_finished(const cg::event::CompSeqExecFinished&) {
73 if (!m_init_val_dumped) {

Callers

nothing calls this directly

Calls 5

outputMethod · 0.45
contain_flagMethod · 0.45
push_backMethod · 0.45
dispatch_on_comp_nodeMethod · 0.45
comp_nodeMethod · 0.45

Tested by

no test coverage detected