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

Method is_graph_input

backends/xnnpack/operators/node_visitor.py:107–116  ·  view source on GitHub ↗

Checks if the given tensor is a graph input Args: tensor: EdgeIR Tensor that is being checked for graph input

(self, tensor: torch.fx.Node)

Source from the content-addressed store, hash-verified

105 return self._exported_program
106
107 def is_graph_input(self, tensor: torch.fx.Node) -> bool:
108 """
109 Checks if the given tensor is a graph input
110
111 Args:
112 tensor: EdgeIR Tensor that is being checked for graph input
113 """
114 return tensor.op == "placeholder" and not is_param_node(
115 self.exported_program, tensor
116 )
117
118 def is_graph_output(self, tensor: torch.fx.Node) -> bool:
119 """

Callers 1

gen_ids_and_flagsMethod · 0.95

Calls 1

is_param_nodeFunction · 0.90

Tested by

no test coverage detected