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

Function annotate_affine_ops

backends/mediatek/quantizer/annotator.py:198–211  ·  view source on GitHub ↗
(node: Node, quant_config: QuantizationConfig)

Source from the content-addressed store, hash-verified

196 ]
197)
198def annotate_affine_ops(node: Node, quant_config: QuantizationConfig) -> None:
199 if _is_annotated(node):
200 return
201
202 weight_node = node.args[1]
203 annotate_input_qspec_map(
204 node,
205 weight_node,
206 quant_config.weight,
207 )
208 _annotate_output_qspec(node, quant_config.activation)
209
210 # Make weight as annotated because it is a constant node
211 _mark_as_annotated([node, weight_node])
212
213
214@register_annotator(

Callers

nothing calls this directly

Calls 2

_mark_as_annotatedFunction · 0.85
_is_annotatedFunction · 0.70

Tested by

no test coverage detected