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

Function annotate

backends/samsung/quantizer/annotator.py:43–54  ·  view source on GitHub ↗
(graph: Graph, quant_config: QuantizationConfig)

Source from the content-addressed store, hash-verified

41
42
43def annotate(graph: Graph, quant_config: QuantizationConfig) -> None:
44 # Pattern annotation
45 _annotate_fused_activation_pattern(graph, quant_config)
46
47 # Per-op annotation
48 for node in graph.nodes:
49 if node.op == "placeholder":
50 annotate_placeholder(node, quant_config)
51 elif node.op == "call_function":
52 annotate_func = OP_ANNOTATOR.get(node.target, None)
53 if annotate_func is not None:
54 annotate_func(node, quant_config)
55
56
57def _is_annotated(nodes: List[Node]):

Callers 1

_annotateMethod · 0.70

Calls 3

annotate_placeholderFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected