Glossary¶
Public Terms¶
These terms describe tracing, transformations, and execution:
Term |
Definition |
|---|---|
IR transform to vectorize over a selection of input leaves. |
|
A primitive that labels an intermediate value with a key and collection. It is transparent unless |
|
Context manager to capture checkpointed values during IR execution. |
|
Collection |
A namespace used by checkpoints, |
Cotangent |
Feedback flowing backward through a pullback. The registered type determines its meaning, such as text feedback for strings or numerical gradients for floats. |
Custom rule |
A rule to be applied to the |
IR transform: dead code elimination, removes equations that are not required to produce selected outputs. |
|
Schema description |
Generation guidance, can be applied to a spec with |
Dynamic argument |
An input leaf that will be replaced with a placeholder at trace time and supplied at execution time. |
Execute |
Phase where the IR is run with concrete inputs by calling |
Primitive: multiply the current path weight by a scalar. Neutral when executing normally, but used to produce |
|
A higher-order control-flow primitive that repeatedly applies a traced |
|
Context manager to evaluate calls to foldable primitives immediately during tracing and insert the result as a literal. |
|
A context manager that substitutes checkpointed values from a provided dictionary during execution. |
|
Schema instance |
A container of context and specs. The structure of the container determines the shape of the output when calling the model. |
Intercept |
Runtime hook for intercepting checkpointed values. Used by |
IR |
The intermediate representation produced by |
Context manager to select a client to use for |
|
A context manager that caches primitive results within its block. During tracing, it can deduplicate identical primitive calls. |
|
IR transform to propagate cotangents from outputs to inputs. |
|
IR transform to propagate tangents from inputs to outputs. |
|
Pytree |
A nested container/leaf structure that |
Optree namespace reserved for use by |
|
IR transform to group equations that can be executed concurrently using async. |
|
Schema |
A pytree of specifications such as |
Static argument |
An input leaf that will be fixed by |
tag value |
Hashable metadata that can be attached to equations during tracing. |
Context manager to apply one or more tags to all equations produced within the block. |
|
Trace |
The phase that runs a Python function once with placeholders and records |
Transform |
A function that consumes an IR and returns another IR. Current transforms include: |
An IR transform that returns |
Internal IR Machinery¶
These names may be useful when inspecting internals and debugging transforms, but these names are not part of the normal user surface.
Term |
Definition |
|---|---|
|
A single application of a primitive in the IR. |
|
Typed placeholder for a value that will be supplied when running the IR. |
|
A named primitive operation used as the dispatch key for execution and transform rules. |
|
The internal wrapper used by the trace interpreter to carry a |
Tracer |
The trace-time interpreter machinery that records primitive calls instead of executing the calls normally. |
|
The manual IR stepping interface used by execution internals and advanced debugging code. Manual Execution describes the stepping interface. |