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

Function _is_annotated

backends/vulkan/quantizer/vulkan_quantizer_utils.py:68–80  ·  view source on GitHub ↗

Given a list of nodes (that represents an operator pattern), check if any of the node is annotated, return True if any of the node is annotated, otherwise return False

(nodes: list[Node])

Source from the content-addressed store, hash-verified

66
67
68def _is_annotated(nodes: list[Node]) -> bool:
69 """
70 Given a list of nodes (that represents an operator pattern),
71 check if any of the node is annotated, return True if any of the node
72 is annotated, otherwise return False
73 """
74 annotated = False
75 for node in nodes:
76 annotated = annotated or (
77 "quantization_annotation" in node.meta
78 and node.meta["quantization_annotation"]._annotated
79 )
80 return annotated
81
82
83def _mark_nodes_as_annotated(nodes: list[Node]) -> None:

Callers 1

_annotate_linearFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected