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

Function get_graph_input_tensors

exir/memory_planning.py:534–543  ·  view source on GitHub ↗
(
    nodes: Iterable[Node], graph_signature: Optional[ExportGraphSignature] = None
)

Source from the content-addressed store, hash-verified

532
533
534def get_graph_input_tensors(
535 nodes: Iterable[Node], graph_signature: Optional[ExportGraphSignature] = None
536) -> Set[TensorSpec]:
537 graph_input_tensors = set()
538 for node in nodes:
539 if node.op == "placeholder" and not _is_mutable_buffer(node, graph_signature):
540 for spec in get_node_tensor_specs(node):
541 graph_input_tensors.add(spec)
542
543 return graph_input_tensors
544
545
546def get_graph_output_tensors(nodes: Iterable[Node]) -> Set[TensorSpec]:

Callers 2

collect_specs_from_nodesFunction · 0.85

Calls 3

get_node_tensor_specsFunction · 0.85
_is_mutable_bufferFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected