Repository navigation
Sweep every workload problem through bare solve(prob) - #1113
Merged
ChrisRackauckas merged 1 commit intoJul 27, 2026
Merged
Conversation
The workload's default sweep passes `abstol`/`verbose`. The keyword NamedTuple's type participates in the specialization, so those calls do not cover the bare `solve(prob)` that most user code writes. SciML#1110 added a bare sweep for the AutoDePSpecialize problems only; extend it to every nonlinear and NLLS problem. Measured (fresh process, default-specialization problems, no algorithm): kwarg form bare, before bare, after NonlinearProblem 0.53s 1.54s 0.53s NLLS problem 0.63s 2.04s 0.63s Cost, measured by rebuilding both ways: precompile 49.8s -> 53.7s (+7.8%) cache .so 37.0MB -> 39.8MB (+7.6%) So ~8% more build for ~1.0-1.4s off every bare first solve. Load time is unchanged (2.80s vs 2.81s, within noise). Co-Authored-By: Chris Rackauckas <[email protected]>
ChrisRackauckas
marked this pull request as ready for review
July 27, 2026 08:28
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.
Please ignore until reviewed by @ChrisRackauckas.
Follow-up to #1110, which flagged this as a pre-existing gap and scoped its fix to the opaque-p problems only.
The workload’s default sweep passes
abstol/verbose. The keywordNamedTuple’s type participates in the specialization, so those calls do not cover the baresolve(prob)most user code writes. This extends the bare sweep to every nonlinear and NLLS problem.Benefit (fresh process, default-specialization problems, no algorithm)
NonlinearProblemCost (measured by rebuilding both ways, not estimated)
.soSo ~8% more build buys ~1.0–1.4s off every bare first solve. That seemed clearly worth it, but it is a judgment call about workload size, so flagging the numbers explicitly rather than burying the change — happy to drop it if you would rather keep the build lean.
Also simplifies the #1110
depspecialize_problemsintermediate back into directpush!es, since the bare sweep now covers all problems and the separate list no longer has a consumer.Patch-bumps
NonlinearSolveto 4.23.2.🤖 Generated with Claude Code
https://claude.ai/code/session_01UuAbA8hSnrirMrJjFqxwn5