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

Function get_delegates

exir/backend/utils.py:275–283  ·  view source on GitHub ↗

Returns the list of delegates from the graph.

(graph: torch.fx.Graph)

Source from the content-addressed store, hash-verified

273
274
275def get_delegates(graph: torch.fx.Graph) -> List[torch.fx.Node]:
276 """
277 Returns the list of delegates from the graph.
278 """
279 return [
280 node
281 for node in graph.nodes
282 if node.op == "get_attr" and node.name.startswith("lowered_module_")
283 ]
284
285
286def print_delegated_graph(graph_module: torch.fx.GraphModule) -> None:

Calls

no outgoing calls