(
self, gm: fx.GraphModule, fused_partition: list[fx.GraphModule]
)
| 116 | pass |
| 117 | |
| 118 | def get_anchors( |
| 119 | self, gm: fx.GraphModule, fused_partition: list[fx.GraphModule] |
| 120 | ) -> PartitionAnchors | None: |
| 121 | node = fused_partition[0].nodes[-1] |
| 122 | assert len(fused_partition[0].input_nodes) == 1 |
| 123 | prev_node = fused_partition[0].input_nodes[0] |
| 124 | |
| 125 | # Previous node was not quantized => we are not able to share q-params |
| 126 | if Q_ANNOTATION_KEY not in prev_node.meta: |
| 127 | return None |
| 128 | |
| 129 | qspec = SharedQuantizationSpec(prev_node) |
| 130 | |
| 131 | return PartitionAnchors( |
| 132 | inputs=[(node, NodeArgsIdx(0))], |
| 133 | weights=[], |
| 134 | biases=[], |
| 135 | output=[ |
| 136 | (node, qspec), |
| 137 | ], |
| 138 | ) |
| 139 | |
| 140 | |
| 141 | class SingleInputBasicPattern(QuantizationPattern): |
nothing calls this directly
no test coverage detected