(graph_module: fx.GraphModule)
| 1201 | |
| 1202 | |
| 1203 | def get_input_specs(graph_module: fx.GraphModule) -> Set[TensorSpec]: |
| 1204 | input_specs = set() |
| 1205 | nodes = graph_module.graph.nodes |
| 1206 | for node in nodes: |
| 1207 | if node.op == "placeholder": |
| 1208 | for spec in tree_flatten(node.meta["spec"])[0]: |
| 1209 | input_specs.add(spec) |
| 1210 | return input_specs |
| 1211 | |
| 1212 | |
| 1213 | def insert_calls_to_free( |
no test coverage detected