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

Method serialize_outputs

exir/serde/serialize.py:127–139  ·  view source on GitHub ↗
(self, node: torch.fx.Node)

Source from the content-addressed store, hash-verified

125 super().handle_call_function(node)
126
127 def serialize_outputs(self, node: torch.fx.Node) -> List[schema.Argument]:
128 if isinstance(node.target, EdgeOpOverload):
129 # Store the original edge op
130 edge_op = node.target
131 # Replace the edge op with the original ATen op so that we can just call into
132 # the serialize_outputs implementation present in the parent class.
133 node.target = edge_op._op
134 ret = super().serialize_outputs(node)
135 # Replace the edge op back.
136 node.target = edge_op
137 else:
138 ret = super().serialize_outputs(node)
139 return ret
140
141 def serialize_metadata(self, node: torch.fx.Node) -> Dict[str, str]:
142 meta = super().serialize_metadata(node)

Callers 1

handle_call_functionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected