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

Method check

src/plugin/impl/cpu_dispatch_checker.cpp:52–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void CPUDispatchChecker::check(CompNode cn, cg::OperatorNodeBase* opr) {
53 size_t prev, now;
54 {
55 MGB_LOCK_GUARD(m_cn2nr_task_mtx);
56 prev = m_cn2nr_task.at(cn);
57 }
58 now = CompNodeEnv::from_comp_node(cn)
59 .cpu_env()
60 .dispatcher->get_nr_dispatched_tasks();
61 if (prev == now) {
62 fprintf(stderr, "operator %s{%s} does not dispatch kernel on %s\n",
63 opr->cname(), opr->dyn_typeinfo()->name, cn.to_string().c_str());
64 {
65 MGB_LOCK_GUARD(*m_failed_oprs_mtx);
66 m_failed_oprs->insert(opr);
67 }
68 }
69}
70
71// vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}}

Callers

nothing calls this directly

Calls 5

atMethod · 0.45
cnameMethod · 0.45
to_stringMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected