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

Function is_output_annotated

backends/arm/quantizer/arm_quantizer_utils.py:61–75  ·  view source on GitHub ↗

Return True if the node's output is annotated. Args: node (Node): FX node to inspect. Returns: bool: True if annotated and an output qspec is present.

(node: Node)

Source from the content-addressed store, hash-verified

59
60
61def is_output_annotated(node: Node) -> bool:
62 """Return True if the node's output is annotated.
63
64 Args:
65 node (Node): FX node to inspect.
66
67 Returns:
68 bool: True if annotated and an output qspec is present.
69
70 """
71 if Q_ANNOTATION_KEY in node.meta:
72 annotation = cast(QuantizationAnnotation, node.meta[Q_ANNOTATION_KEY])
73 return annotation._annotated and annotation.output_qspec is not None
74 else:
75 return False
76
77
78def mark_node_as_annotated(node: Node) -> None:

Callers 1

get_quant_propertiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected