MCPcopy Create free account
hub / github.com/pytorch/examples / create_node

Method create_node

fx/primitive_library.py:127–136  ·  view source on GitHub ↗
(self, kind, target, args, kwargs, name=None, type_expr=None)

Source from the content-addressed store, hash-verified

125 FNS_TO_INLINE = [add_lowp]
126
127 def create_node(self, kind, target, args, kwargs, name=None, type_expr=None):
128 if kind == 'call_function' and target in self.FNS_TO_INLINE:
129 tracer = torch.fx.proxy.GraphAppendingTracer(self.graph)
130 # Trace through the implementation of the function rather than
131 # create a node
132 proxy_args = torch.fx.node.map_arg(args, lambda x: torch.fx.Proxy(x, tracer))
133 proxy_kwargs = torch.fx.node.map_arg(kwargs, lambda x: torch.fx.Proxy(x, tracer))
134 return target(*proxy_args, **proxy_kwargs).node
135 else:
136 return super().create_node(kind, target, args, kwargs, name, type_expr)
137
138
139tracer = InliningTracer()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected