Repository navigation
Growth under ReverseDiff: no hcat, a valid zero point, and a replay check - #1022
Merged
Merged
Conversation
…s a quantity fixed
growth found its root and Jacobian on tracked numbers under ReverseDiff,
as _primal_value had no method for them, and ReverseDiff's hcat of a
Matrix{TrackedReal} with a TrackedArray is ambiguous with SparseArrays
loaded. A ReverseDiff extension gives _primal_value and _fixed their
values, as for ForwardDiff's dual numbers. Fixes #1003.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7ixGWZNbRbSXXsSPbAs
…age holds a quantity fixed" This reverts commit 4428bc2.
…piled tapes at a second point
The Jacobian was joined with hcat and vcat, and ReverseDiff's hcat of
a Matrix{TrackedReal} with a TrackedArray is ambiguous with SparseArrays
loaded. It is now filled block by block in an array like M, which takes
tracked numbers, and nothing is stripped for them: a compiled tape that
takes the root as a constant gives a wrong gradient at another point.
The compiled-tape check replays each registry scenario at a point about
1% from the one it was recorded at. Fixes #1003.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7ixGWZNbRbSXXsSPbAs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WwC7ixGWZNbRbSXXsSPbAs
The coupling of "Growth rate and profile of strata that mix" is `K0` scaled entry by entry by the exponential of its parameters, so it mixes the strata at the zero vector too. A tape recorded near the point it replays at runs the same steps of a loop, so the second-point replay check is `@test` for every scenario and no longer reads the broken list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WwC7ixGWZNbRbSXXsSPbAs
A compiled tape does not replay value-dependent iteration. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
Contributor
Benchmark comparison vs baseMinimum time per call. Buckets are PR time as a % of base, so lower is faster (🟢 faster, ⚪ within 5%, 🔴 slower). Counts of benchmarks per bucket:
Evaluation — 24 benchmarks (by time change)
AD gradients — 63 benchmarks (by time change)
|
This was referenced Dec 5, 2026
Open
seabbs-bot
added a commit
that referenced
this pull request
Dec 5, 2026
… case (#1062) * Fill the growth Jacobian's last row through a two-range view Reactant cannot broadcast into a traced row viewed with an integer index, so the block fills from #1022 broke the growth registry scenario under Reactant. The coverage job also gives each case 1800 s, since coverage slows the wide coupled reverse compile past 600 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the growth Jacobian comment free of other package names Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries #1006 with
mainmerged in, plus one registry entry.growthbuilds its Jacobian block by block withouthcat, so ReverseDiff differentiates the mixing-strata scenario (closes ReverseDiff: growth of a stratified recurrence stops at an ambiguous hcat #1003).#1006's session ran ForwardDiff and both ReverseDiff modes locally with this entry: 9,483 pass, 1 broken, 0 fail.
Not run on this merge commit: any test.
Generated by Claude Code