(self, submodules, node: fx.Node)
| 110 | self.used_dotted = "." in module_name if module_name else True |
| 111 | |
| 112 | def is_node_supported(self, submodules, node: fx.Node) -> bool: |
| 113 | if "nn_module_stack" not in node.meta: |
| 114 | return True |
| 115 | |
| 116 | for module_meta in node.meta["nn_module_stack"].values(): |
| 117 | if _compare(self.exact, self.instance_name, module_meta[0]): |
| 118 | self.reject_node(node) |
| 119 | return False |
| 120 | node_module_name = module_meta[1] |
| 121 | if not self.used_dotted: |
| 122 | node_module_name = node_module_name.split(".")[-1] |
| 123 | if _compare(self.exact, self.module_name, node_module_name): |
| 124 | self.reject_node(node) |
| 125 | return False |
| 126 | |
| 127 | return True |
nothing calls this directly
no test coverage detected