(node: Node, quantization_config: QuantizationConfig)
| 835 | class RmsNorm(GeneralOpDef): |
| 836 | @staticmethod |
| 837 | def annotate(node: Node, quantization_config: QuantizationConfig) -> None: |
| 838 | if _is_annotated([node]): |
| 839 | return |
| 840 | |
| 841 | act_node = node.args[0] |
| 842 | weight_node = node.args[2] |
| 843 | |
| 844 | # TODO current only support 16a16w |
| 845 | annotate_input_qspec_map( |
| 846 | node, |
| 847 | act_node, |
| 848 | quantization_config.input_activation, |
| 849 | ) |
| 850 | |
| 851 | annotate_input_qspec_map( |
| 852 | node, |
| 853 | weight_node, |
| 854 | quantization_config.input_activation, |
| 855 | ) |
| 856 | nodes_to_mark_annotated = [node] |
| 857 | annotate_output_qspec(node, quantization_config.output_activation) |
| 858 | _mark_nodes_as_annotated(nodes_to_mark_annotated) |
| 859 | |
| 860 | |
| 861 | # TODO: There is a bug in the BackendOpInfo library, so it is bypassed now. |
nothing calls this directly
no test coverage detected