torch.fx.passes.utils.source_matcher_utils.check_subgraphs_connected
- torch.fx.passes.utils.source_matcher_utils.check_subgraphs_connected(subgraph1, subgraph2)
Given two subgraphs A and B (in the form of a list of nodes), checks if A has nodes connecting to at least one node in B – aka there exists a node in B that uses a node in A (not the other way around).
- Return type: