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

Method apply_inplace

src/gopt/impl/framework.cpp:119–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void SubGraph::Rewriter::apply_inplace() const {
120 m_owner_graph->m_endpoint_oprs.clear();
121 m_owner_graph->m_endpoint_vars_set.clear();
122 for (auto&& var : m_owner_graph->m_endpoint_vars) {
123 var = get_var(var.node());
124 m_owner_graph->m_endpoint_oprs.insert(var.node()->owner_opr());
125 m_owner_graph->m_endpoint_vars_set.insert(var.node());
126 }
127}
128
129std::pair<bool, VarNode*> SubGraph::Rewriter::get_var_internal(VarNode* var) {
130 // The implementation is (manually) unrolled once, background:

Callers 15

applyMethod · 0.80
replace_vars_internalFunction · 0.80
compile_prepareMethod · 0.80
update_graphMethod · 0.80
TESTFunction · 0.80
applyMethod · 0.80
applyMethod · 0.80

Calls 4

clearMethod · 0.45
nodeMethod · 0.45
insertMethod · 0.45
owner_oprMethod · 0.45

Tested by 3

TESTFunction · 0.64
run<cache>Function · 0.64
TESTFunction · 0.64