Repository navigation
Precompile AutoDespecialize DAE defaults and BDF algorithms - #4241
Merged
ChrisRackauckas merged 4 commits intoAug 14, 2026
Merged
ChrisRackauckas merged 4 commits into
ChrisRackauckas merged 4 commits into
Conversation
Co-Authored-By: Chris Rackauckas <[email protected]>
ChrisRackauckas-Claude
force-pushed
the
agent/precompile-autodespecialized-dae
branch
from
August 13, 2026 23:01
33a1674 to
4eecadb
Compare
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
ChrisRackauckas-Claude
force-pushed
the
agent/precompile-autodespecialized-dae
branch
from
August 13, 2026 23:06
4eecadb to
c13f39c
Compare
ChrisRackauckas
marked this pull request as ready for review
August 14, 2026 02:25
This was referenced Aug 14, 2026
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.
What changed
This precompiles all three
AutoDespecializeDAE entry points requested here:DFBDF()initialization and solve;DNordsieckBDF()initialization and solve;solve(dae_prob)default, which resolves toDFBDF(AutoFiniteDiff()).OrdinaryDiffEqDefaultnow extends the publicDiffEqBase.prepare_alghook for its ODE and DAE defaults. That lets DiffEqBase concretize anAutoDespecializeproblem using the algorithm that will actually run, before the late default-solver handoff. The BDF regression test covers different residual types and parameter layouts under both ForwardDiff and FiniteDiff, and requires identical concrete problem/cache types for both BDF algorithms.This is stacked on the generic default-algorithm handoff in #4247. The DAE residual wrapping prerequisite has merged as #4239 and was removed from this branch during the rebase.
Ignore this PR until it has been reviewed by @ChrisRackauckas.
Failing before
Without the early
prepare_alg(nothing, u0, p, prob)handoff, the focused DiffEqBase regression test reached:The existing OrdinaryDiffEqDefault discriminator also showed that the implicit default was concretized differently from the equivalent explicit algorithm:
With the precompile preference disabled, median first-initialization times from three fresh Julia processes were:
Passing after
The generic handoff regression passes 21/21 and full DiffEqBase Core passes in #4247.
The exact monorepo BDF group passed:
An isolated environment developed the local DiffEqBase, OrdinaryDiffEqBDF, and OrdinaryDiffEqDefault stack. The official Default test suite then passed:
The default
init(prob)and explicitinit(prob, DFBDF(autodiff=AutoFiniteDiff()))produced identical concrete problem/cache types and identical trajectories. ExplicitDFBDFandDNordsieckBDFboth solved successfully.Both required sublibrary QA groups passed:
Julia Runic, typos over the diff, and
git diff --checkexited 0. No public API, docstring, or documentation changed, so a docs build was not required.Compile-time measurement
With
PrecompileAutoDespecialize=true, the same benchmark in three fresh Julia processes produced these medians:The benchmark used a distinct residual type and a parameter layout not present in the workload. Each measurement was the elapsed time of
initin a new Julia process after separately precompiling isolated preference-on and preference-off environments.Not verified
GPU, Julia prerelease, and downstream package suites were not run locally.