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

Function is_get_attr_node

backends/transforms/utils.py:62–66  ·  view source on GitHub ↗

Returns true if the given node is a get attr node for a tensor of the model

(node: torch.fx.Node)

Source from the content-addressed store, hash-verified

60
61
62def is_get_attr_node(node: torch.fx.Node) -> bool:
63 """
64 Returns true if the given node is a get attr node for a tensor of the model
65 """
66 return isinstance(node, torch.fx.Node) and node.op == "get_attr"
67
68
69def is_param_node(exp_prog: ExportedProgram, node: torch.fx.Node) -> bool:

Callers 2

is_param_nodeFunction · 0.70
get_param_tensorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected