MCPcopy Create free account
hub / github.com/pytorch/executorch / save_graph_state

Method save_graph_state

exir/serde/export_serialize.py:447–453  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

445
446 @contextmanager
447 def save_graph_state(self):
448 saved = self.graph_state
449 self.graph_state = GraphState()
450 try:
451 yield
452 finally:
453 self.graph_state = saved
454
455 def handle_placeholder(self, node: torch.fx.Node):
456 assert node.op == "placeholder"

Callers 1

serialize_inputMethod · 0.95

Calls 1

GraphStateClass · 0.85

Tested by

no test coverage detected