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

Method owner_graph

src/serialization/impl/opr_shallow_copy.cpp:118–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116} // anonymous namespace
117
118ComputingGraph* serialization::OprShallowCopyContext::owner_graph(
119 const cg::OperatorNodeBase& opr, const VarNodeArray& inputs) const {
120 if (!m_owner_graph) {
121 if (inputs.empty())
122 return opr.owner_graph();
123 return inputs[0]->owner_graph();
124 }
125 if (!inputs.empty())
126 mgb_assert(m_owner_graph == inputs[0]->owner_graph());
127
128 return m_owner_graph;
129}
130
131cg::OperatorNodeBase* serialization::copy_opr_shallow(
132 const cg::OperatorNodeBase& opr, const VarNodeArray& inputs,

Callers 15

init_graph_rtFunction · 0.45
GraphNodePtrMethod · 0.45
as_tensorMethod · 0.45
apply_on_var_nodeFunction · 0.45
shallow_copyMethod · 0.45
OutputCallbackMethod · 0.45
apply_on_var_nodeFunction · 0.45
apply_on_var_nodeFunction · 0.45
apply_on_var_nodeFunction · 0.45
get_indexFunction · 0.45
apply_on_var_nodeFunction · 0.45

Calls 1

emptyMethod · 0.45

Tested by 6

MultipleInputOutputMethod · 0.36
makeMethod · 0.36
OprReaderForTestMethod · 0.36
MarkInputContiguousMethod · 0.36
TEST_FFunction · 0.36