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

Method apply

src/gopt/impl/framework.cpp:460–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458 : m_opt_state{state}, m_rewriter{state.graph().make_rewriter()} {}
459
460void RecursiveSubGraphRewriteHelper::apply() {
461 using namespace std::placeholders;
462 m_opt_state.graph().iter(
463 std::bind(&RecursiveSubGraphRewriteHelper::on_opr, this, _1));
464 m_rewriter.apply_inplace();
465}
466
467void RecursiveSubGraphRewriteHelper::on_opr(OperatorNodeBase* opr) {
468 auto on_new_opr = [this](OperatorNodeBase* opr) {

Callers

nothing calls this directly

Calls 11

apply_inplaceMethod · 0.80
comp_graphMethod · 0.80
flush_logMethod · 0.80
MGB_CATCHFunction · 0.50
iterMethod · 0.45
graphMethod · 0.45
getMethod · 0.45
nameMethod · 0.45
whatMethod · 0.45
sizeMethod · 0.45
get_msecsMethod · 0.45

Tested by

no test coverage detected