(node: torch.fx.Node, attr: str)
| 1628 | |
| 1629 | |
| 1630 | def has_node_spec_attr(node: torch.fx.Node, attr: str) -> bool: |
| 1631 | return "spec" in node.meta and hasattr(node.meta["spec"], attr) |
| 1632 | |
| 1633 | |
| 1634 | def set_node_spec_attr(node: torch.fx.Node, attr: str, value): |