(node: torch.fx.Node)
| 40 | |
| 41 | |
| 42 | def is_submodule_node(node: torch.fx.Node): |
| 43 | if node.op not in ("get_attr", "placeholder"): |
| 44 | return False |
| 45 | try: |
| 46 | node.graph.owning_module.get_submodule(node.target) |
| 47 | except AttributeError: |
| 48 | return False |
| 49 | return True |
| 50 | |
| 51 | |
| 52 | def is_get_attr_node(node: torch.fx.Node) -> bool: |
no test coverage detected