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

Function remove_used_metadata

exir/backend/backend_api.py:643–654  ·  view source on GitHub ↗

Remove the used metadata from the graph.

(graph: torch.fx.Graph)

Source from the content-addressed store, hash-verified

641
642
643def remove_used_metadata(graph: torch.fx.Graph) -> None:
644 """
645 Remove the used metadata from the graph.
646 """
647 for node in graph.nodes:
648 node.meta.pop("delegation_tag", None)
649 node.meta.pop("backend_id", None)
650 node.meta.pop("submodule_program", None)
651 node.meta.pop("toplevel_input_specs_to_delete", None)
652 node.meta.pop("toplevel_output_specs_to_delete", None)
653 node.meta.pop("is_submodule", None)
654 node.meta.pop("submodule_output_node", None)
655
656
657@dataclass

Callers 1

_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected