(graph: Graph, quant_config: QuantizationConfig)
| 41 | |
| 42 | |
| 43 | def annotate(graph: Graph, quant_config: QuantizationConfig) -> None: |
| 44 | # Pattern annotation |
| 45 | _annotate_fused_activation_pattern(graph, quant_config) |
| 46 | |
| 47 | # Per-op annotation |
| 48 | for node in graph.nodes: |
| 49 | if node.op == "placeholder": |
| 50 | annotate_placeholder(node, quant_config) |
| 51 | elif node.op == "call_function": |
| 52 | annotate_func = OP_ANNOTATOR.get(node.target, None) |
| 53 | if annotate_func is not None: |
| 54 | annotate_func(node, quant_config) |
| 55 | |
| 56 | |
| 57 | def _is_annotated(nodes: List[Node]): |
no test coverage detected