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

Function process_inputs

backends/arm/process_node.py:105–127  ·  view source on GitHub ↗

Serialize an input node.

(
    node: torch.fx.Node,
    tosa_graph: Any,
    tosa_spec: TosaSpecification,
)

Source from the content-addressed store, hash-verified

103
104
105def process_inputs(
106 node: torch.fx.Node,
107 tosa_graph: Any,
108 tosa_spec: TosaSpecification,
109):
110 """Serialize an input node."""
111
112 try:
113 tosa_arg = TosaArg(node, tosa_spec)
114 except ValueError as e:
115 raise ValueError(
116 f"Failed processing input placeholder: {node.name}. "
117 "Is the original torch function supported?"
118 ) from e
119
120 input_shape = tosa_arg.shape
121 tensor = ts.TosaSerializerTensor(
122 tosa_arg.name,
123 normalize_symint(input_shape),
124 tosa_arg.dtype,
125 data=None,
126 )
127 tosa_graph.addInputTensor(tensor)
128
129
130def process_inputs_to_parameters(

Callers 1

process_placeholderFunction · 0.85

Calls 2

TosaArgClass · 0.90
normalize_symintFunction · 0.90

Tested by

no test coverage detected