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

Function _get_mutable_buffer_specs

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

Source from the content-addressed store, hash-verified

498
499
500def _get_mutable_buffer_specs(
501 nodes: Iterable[Node], graph_signature: Optional[ExportGraphSignature]
502) -> Set[TensorSpec]:
503 mutable_buffer_specs: Set[TensorSpec] = set()
504 for node in nodes:
505 if _is_mutable_buffer(node, graph_signature):
506 for spec in get_node_tensor_specs(node):
507 mutable_buffer_specs.add(spec)
508 return mutable_buffer_specs
509
510
511def _do_user_inputs_exist(graph_signature: Optional[ExportGraphSignature]) -> bool:

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