Package org. diffkt. tracing
Types
The result of removing reused nodes in a data structure. Reused nodes are replaced by a TracingTensor.Variable, and an assignment to that variable is placed into the resulting assignments.
The caller specifies which evaluator to use. This is temporary; we want to select automatically.
This class is used when "printing" complex data structures by tracingPrintedForm. Tracing tensors are replaced by an instance of this class to hold the printed form.
Functions
Transform a (differentiable) function into a function of the same signature but which unrolls all loops and control constructs, and performs a set of local optimizations on the result. Because control-flow is removed, any data-dependent control-flow in the function will no longer depend on the input data in the second and subsequent invocations of the returned function.
Print a tracing tensor, with reused nodes represented using an assignment to a temporary variable.
Print a tracing tensor, assuming there are no reused nodes.
A topological sort, which processes an acyclic graph and returns a topologically sorted list of its nodes, in which each node precedes any appearance of its successors. Returns null if the input graph is found to have a cycle.