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

Function _handle

exir/memory_planning.py:1305–1318  ·  view source on GitHub ↗
(
        submodule_node: torch.fx.Node,
        alloc_graph_input: bool = False,
    )

Source from the content-addressed store, hash-verified

1303 bufsizes: list[int] = []
1304
1305 def _handle(
1306 submodule_node: torch.fx.Node,
1307 alloc_graph_input: bool = False,
1308 ) -> None:
1309 current_bufsizes = _handle_submodule(
1310 algo,
1311 graph_module,
1312 alignment,
1313 submodule_node,
1314 graph_signature,
1315 alloc_graph_input=alloc_graph_input,
1316 )
1317 nonlocal bufsizes
1318 _merge_bufsizes(bufsizes, current_bufsizes)
1319
1320 for cond_node in get_cond_nodes(graph_module):
1321 _handle(cast(torch.fx.Node, cond_node.args[1]))

Callers 1

Calls 2

_handle_submoduleFunction · 0.85
_merge_bufsizesFunction · 0.85

Tested by

no test coverage detected