Returns true if the given node produces a single tensor value
(node: torch.fx.Node)
| 217 | |
| 218 | |
| 219 | def is_single_tensor_node(node: torch.fx.Node) -> bool: |
| 220 | """ |
| 221 | Returns true if the given node produces a single tensor value |
| 222 | """ |
| 223 | if "val" not in node.meta: |
| 224 | return False |
| 225 | |
| 226 | if isinstance(node.meta["val"], FakeTensor): |
| 227 | return True |
| 228 | |
| 229 | return False |
| 230 | |
| 231 | |
| 232 | def is_tensor_collection_node(node: Any) -> bool: |
no outgoing calls
no test coverage detected