(node: Node, quant_config: QuantizationConfig)
| 680 | # CASE 8: embedding |
| 681 | @register_annotator([torch.ops.aten.embedding.default]) |
| 682 | def annotate_embedding(node: Node, quant_config: QuantizationConfig) -> None: |
| 683 | input_qspec_map = {} |
| 684 | weight = node.args[0] |
| 685 | if _is_annotated([node]) or not _is_float_tensor(weight): |
| 686 | return |
| 687 | |
| 688 | input_qspec_map[weight] = quant_config.input_activation |
| 689 | |
| 690 | node.meta["quantization_annotation"] = QuantizationAnnotation( |
| 691 | input_qspec_map=input_qspec_map, |
| 692 | output_qspec=quant_config.output_activation, |
| 693 | _annotated=True, |
| 694 | ) |
| 695 | |
| 696 | |
| 697 | # CASE 9: Concat & Stack |
nothing calls this directly
no test coverage detected