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

Method deserialize_outputs

exir/serde/serialize.py:484–497  ·  view source on GitHub ↗
(
        self, serialized_node: schema.Node, fx_node: torch.fx.Node
    )

Source from the content-addressed store, hash-verified

482 super().deserialize_node(serialized_node, target)
483
484 def deserialize_outputs(
485 self, serialized_node: schema.Node, fx_node: torch.fx.Node
486 ) -> None:
487 if isinstance(fx_node.target, EdgeOpOverload):
488 # Store the original edge op
489 edge_op = fx_node.target
490 # Replace the edge op with the original ATen op so that we can just call into
491 # node deserialize_outputs implementation present in the parent class.
492 fx_node.target = edge_op._op
493 super().deserialize_outputs(serialized_node, fx_node)
494 # Replace the edge op back.
495 fx_node.target = edge_op
496 else:
497 super().deserialize_outputs(serialized_node, fx_node)
498
499 def deserialize_metadata(self, metadata: Dict[str, str]) -> Dict[str, Any]:
500 res = super().deserialize_metadata(metadata)

Callers 1

deserialize_nodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected