(
quantization_annotation: QuantizationAnnotation,
)
| 183 | |
| 184 | |
| 185 | def _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 | |
| 200 | def _node_port_dtypes(node) -> Tuple[List[str], List[str]]: |
no test coverage detected