MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / link_to

Method link_to

python/paddle/base/framework.py:5820–5835  ·  view source on GitHub ↗

Connect two nodes. Args: node_in(IrNode): the input node. node_out(IrNode): the output node.

(self, node_in, node_out)

Source from the content-addressed store, hash-verified

5818 op_node.rename_output(old_output_node.name(), new_output_node.name())
5819
5820 def link_to(self, node_in, node_out):
5821 """
5822 Connect two nodes.
5823
5824 Args:
5825 node_in(IrNode): the input node.
5826 node_out(IrNode): the output node.
5827 """
5828 assert node_in.node in self.graph.nodes(), (
5829 f"node_in({node_in.node.name()}) must be in the graph nodes."
5830 )
5831 assert node_out.node in self.graph.nodes(), (
5832 f"node_out({node_out.node.name()}) must be in the graph nodes."
5833 )
5834 node_in.append_output(node_out)
5835 node_out.append_input(node_in)
5836
5837 def safe_remove_nodes(self, remove_nodes):
5838 """

Callers 15

_create_global_stepMethod · 0.80
_insert_dequant_opMethod · 0.80
_copy_graphMethod · 0.80
_insert_funcMethod · 0.80
applyMethod · 0.80

Calls 4

append_outputMethod · 0.80
append_inputMethod · 0.80
nodesMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected