MCPcopy Create free account
hub / github.com/pytorch/executorch / from_node

Method from_node

backends/arm/debug/schema.py:34–41  ·  view source on GitHub ↗
(node: torch.fx.Node)

Source from the content-addressed store, hash-verified

32
33 @staticmethod
34 def from_node(node: torch.fx.Node) -> ATenDebugSchema:
35 # node.target is Union[Callable[..., Any], str], so we need to access this correctly depending on the type
36 if callable(node.target):
37 operator_name = node.target.__name__
38 else:
39 operator_name = node.target
40
41 return ATenDebugSchema(node_name=node.name, operator_name=operator_name)
42
43
44@dataclass

Callers 1

addMethod · 0.45

Calls 1

ATenDebugSchemaClass · 0.85

Tested by

no test coverage detected