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

Method OprIODumpBase

src/plugin/impl/opr_io_dump.cpp:177–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175};
176
177OprIODumpBase::OprIODumpBase(cg::ComputingGraph* graph) : PluginBase(graph) {
178 using namespace cg::event;
179 auto on_kern_finish = [this](const OprExecKernelEnd& event) {
180 for (VarNode* var : event.opr->output()) {
181 if (!var->contain_flag(VarNode::Flag::VOLATILE_CONTENT)) {
182 auto run = [this, var]() {
183 dump_var(var, m_owner_graph->options().comp_node_seq_record_level);
184 };
185 event.env->dispatch_on_comp_node(var->comp_node(), run);
186 }
187 }
188 };
189 add_event_handler(
190 graph->event().register_receiver<OprExecKernelEnd>(on_kern_finish));
191}
192
193/* =================== TextOprIODump =================== */
194

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected