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

Function get_input_specs

exir/memory_planning.py:1203–1210  ·  view source on GitHub ↗
(graph_module: fx.GraphModule)

Source from the content-addressed store, hash-verified

1201
1202
1203def 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
1213def insert_calls_to_free(

Callers 1

insert_calls_to_freeFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected