Repository navigation
Prepare default algorithms before AutoDespecialize concretization - #4247
Merged
ChrisRackauckas merged 2 commits intoAug 14, 2026
Conversation
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
ChrisRackauckas
marked this pull request as ready for review
August 14, 2026 02:45
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
DiffEqBase now asks the public
prepare_alghook for a default algorithm before concretizing anAutoDespecializeproblem. If a downstream package supplies one, the existing explicit-algorithm path uses it for autodiff/Jacobian preparation and wrapper construction before__solveor__initruns.OrdinaryDiffEqDefault supplies its existing defaults through that hook:
ODEProblem→DefaultODEAlgorithm(autodiff=AutoFiniteDiff());DAEProblem→DFBDF(autodiff=AutoFiniteDiff()).The DAE default-solver regression uses
AutoDespecialize, verifies that implicit and explicit DFBDF initialization produce identical concrete problem/cache types, and retains the exact trajectory comparison. This is the generic handoff required by the DAE precompile workloads in #4241.Ignore this PR until it has been reviewed by @ChrisRackauckas.
Failing before
I removed only the new early
prepare_algcall and ran the focused DiffEqBase Core regression. It failed:The existing OrdinaryDiffEqDefault discriminator also showed the incorrect late handoff when run against the generic change without the OrdinaryDiffEqDefault hook:
The implicit default concretized a generic four-signature function wrapper while the explicit default selected the algorithm-dependent autodiff/Jacobian path.
Passing after
The identical DiffEqBase regression passed 21/21, and the full DiffEqBase Core group passed.
An isolated environment developed this branch's local DiffEqBase, OrdinaryDiffEqBDF, and OrdinaryDiffEqDefault. The official Default test suite then passed:
The default
init(prob)and explicitinit(prob, DFBDF(autodiff=AutoFiniteDiff()))produced identical concrete problem/cache types, trajectories, and solver statistics.Required QA 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.Not verified
GPU, Julia prerelease, and downstream package suites were not run locally.