Gradient references carry the version of their last materialization. A uniform contribution updates one shared history; selected parent gradients replay their pending updates before receiving the node's complete local contribution. All scalar additions retain their dense evaluation order.
Add a uniform tensor on the right, exactly as in dense context accumulation.
Instances For
Materialize a typed boundary in one traversal, with constant-time version lookup.
Instances For
Array gradients and a shared chronological history of deferred uniform additions.
- stored : TensorContext α shapes
Most recently materialized tensor at each active position.
History version already applied to each tensor. Finalized suffix entries may remain here.
- clock : ℕ
Number of uniform additions issued so far.
- history : Deferred.History α
Consecutive identical contributions share one run.
Every active tensor has a version slot.
No tensor version refers to an update that has not happened.
Instances For
Start with a materialized seed and no deferred additions.
Instances For
Read one gradient, replaying precisely the updates since its saved version.
Instances For
Materialize only when crossing back into the public typed pack interface.
Instances For
Defer one uniform contribution to the active prefix.
Instances For
Save an already materialized gradient and its current history version.
Instances For
A materialized update contains no reference to the full previous gradient context.
Instances For
Compute every exceptional result before modifying the gradient array.
Instances For
Install materialized exceptions in their existing order. Duplicate writes are identical.
Instances For
Accumulate a node's complete local contribution, preserving each dense addition.
Instances For
Compact accumulation equals full pack addition without an additive-identity assumption.
Custom dense VJPs remain supported through an exact materializing adapter.
Instances For
Transport the typed active prefix without touching gradient storage.
Instances For
Finalize one output gradient and remove its slot from the active prefix.
Instances For
Removing a deferred gradient context agrees with removing the fully materialized pack.