MCPcopy Create free account
hub / github.com/pytorch/pytorch / run_node

Method run_node

torch/_inductor/pattern_matcher.py:1347–1354  ·  view source on GitHub ↗
(self, old_node)

Source from the content-addressed store, hash-verified

1345def clone_graph(input_graph: torch.fx.GraphModule) -> torch.fx.GraphModule:
1346 class CopyGraph(Transformer):
1347 def run_node(self, old_node):
1348 new_node = super().run_node(old_node)
1349 if isinstance(new_node, torch.fx.Proxy):
1350 new_node.node.meta.update(old_node.meta)
1351 new_node.node.name = self.new_graph._graph_namespace.create_name(
1352 old_node.name, None
1353 )
1354 return new_node
1355
1356 return CopyGraph(input_graph).transform()
1357

Callers

nothing calls this directly

Calls 4

isinstanceFunction · 0.85
create_nameMethod · 0.80
run_nodeMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected