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

Function _get_input_qspecs_from_node

backends/qualcomm/quantizer/validators.py:185–197  ·  view source on GitHub ↗
(
    quantization_annotation: QuantizationAnnotation,
)

Source from the content-addressed store, hash-verified

183
184
185def _get_input_qspecs_from_node(
186 quantization_annotation: QuantizationAnnotation,
187) -> Dict[Node, QuantizationSpecBase | None]:
188 input_qspec_map = quantization_annotation.input_qspec_map
189 found_qspecs = {}
190
191 for node, spec in input_qspec_map.items():
192 resolved_spec = spec
193 if isinstance(spec, SharedQuantizationSpec):
194 resolved_spec = _resolve_shared_qspec(resolved_spec)
195 found_qspecs[node] = resolved_spec
196
197 return found_qspecs
198
199
200def _node_port_dtypes(node) -> Tuple[List[str], List[str]]:

Callers 1

_node_port_dtypesFunction · 0.85

Calls 2

_resolve_shared_qspecFunction · 0.85
itemsMethod · 0.80

Tested by

no test coverage detected