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])
| 66 | |
| 67 | |
| 68 | def _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 | |
| 83 | def _mark_nodes_as_annotated(nodes: list[Node]) -> None: |