Count nodes in graph_module whose target matches any in targets.
(graph_module, targets)
| 801 | |
| 802 | @staticmethod |
| 803 | def _count_nodes(graph_module, targets): |
| 804 | """Count nodes in graph_module whose target matches any in targets.""" |
| 805 | count = 0 |
| 806 | for node in graph_module.graph.nodes: |
| 807 | if node.op == "call_function" and node.target in targets: |
| 808 | count += 1 |
| 809 | return count |
| 810 | |
| 811 | def _test_to_edge_with_preserved_ops( |
| 812 | self, program, preserved_ops, expected_preserved_ops |
no outgoing calls
no test coverage detected