GraphAppendingTracer
- class torch.fx.proxy.GraphAppendingTracer(graph)
-
A method that lowers the objects seen as arguments during symbolic evaluation into Argument types that can be stored in IR.
Can be override to support more trace-specific types.
Inserts a graph node given target, args, kwargs, and name.
This method can be overridden to do extra checking, validation, or modification of values used in node creation. For example, one might want to disallow in-place operations from being recorded.
Create a Node from the given arguments, then return the Node wrapped in a Proxy object.
If kind = ‘placeholder’, then we’re creating a Node that
represents the parameter of a function. If we need to encode
a default parameter, we use the args tuple. args is
otherwise empty for placeholder Nodes.
when used in control flow. Normally we don’t know what to do because we don’t know the value of the proxy, but a custom tracer can attach more information to the graph node using create_node and can choose to return an iterator.
This is what happens when ** is called on a proxy. This should return an iterator if ** is supposed to work in your custom tracer.
when used in control flow. Normally we don’t know what to do because we don’t know the value of the proxy, but a custom tracer can attach more information to the graph node using create_node and can choose to return a value.