(
graph_module: torch.fx.GraphModule,
)
| 1304 | |
| 1305 | # collected all the named data into the named data store for deduplication |
| 1306 | def collect_named_data_store_outputs( |
| 1307 | graph_module: torch.fx.GraphModule, |
| 1308 | ) -> None: |
| 1309 | for node in graph_module.graph.nodes: |
| 1310 | if node.target == executorch_call_delegate: |
| 1311 | lbm = getattr(graph_module, node.args[0].target) |
| 1312 | assert is_lowered_module(lbm) |
| 1313 | data_store_output = lbm.named_data_store_output |
| 1314 | if data_store_output is not None: |
| 1315 | named_data_store.merge_named_data_store(data_store_output) |
| 1316 | |
| 1317 | for _, submod, _ in get_control_flow_submodules(graph_module): |
| 1318 | collect_named_data_store_outputs(submod) |
| 1319 | |
| 1320 | collect_named_data_store_outputs(exported_program.graph_module) |
| 1321 |
no test coverage detected