You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5cf9d7e
Browse filesBrowse the repository at this point in the historyBrowse files
values_version cache coherence for Jacobian/Hessian value caches (#113)
Replace the caller-must-refresh temporal contracts and the per-atom
jacobian_csc_filled flags with a monotone values_version counter on
matrix: writers bump, consumers refresh iff their recorded version
differs. Staleness becomes impossible by construction and shared-operand
double-refreshes dedupe for free.
- eval_jacobian/eval_wsum_hess free-function wrappers run the atom impl
(slots renamed *_impl) and bump the output's version; the jacobian
wrapper skips the bump for an affine node already evaluated this
parameter epoch, preserving today's refresh counts.
- sparse_matrix csc_cache and stacked_pd csr_cache are version-guarded
(the latter skips its per-call block memcpy in to_csr).
- spd vtable fill adapters and the raw hess_term2 write sites bump their
outputs so version-guarded reads stay fresh.
- expr_set_needs_refresh gains a set_needs_refresh_children hook so the
parameter-refresh walk reaches hstack's args[] children; without it a
parameter-dependent affine child under hstack/vstack served stale spd
Jacobian values after a parameter update (also fixes the pre-existing
stale-CSC-mirror bug for args[] children on main).
- new tests lock the semantics: bump-per-eval, affine bump-skip and
re-arm, CSC mirror dedup, spd to_csr freshness, spd hess-term
staleness regression, and the hstack parameter-refresh regression.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments