MCPcopy Create free account
hub / github.com/pytorch/executorch / annotate

Method annotate

backends/qualcomm/quantizer/annotators/lpai_rules.py:837–858  ·  view source on GitHub ↗
(node: Node, quantization_config: QuantizationConfig)

Source from the content-addressed store, hash-verified

835class 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.

Callers

nothing calls this directly

Calls 3

_is_annotatedFunction · 0.90
annotate_output_qspecFunction · 0.90
_mark_nodes_as_annotatedFunction · 0.90

Tested by

no test coverage detected