Skip to content

Sweep every workload problem through bare solve(prob) - #1113

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:full-bare-solve-sweep
Jul 27, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:full-bare-solve-sweep

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

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 keyword NamedTuple’s type participates in the specialization, so those calls do not cover the bare solve(prob) most user code writes. This extends the bare sweep to every nonlinear and NLLS problem.

Benefit (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, not estimated)

master this PR
precompile 49.8s 53.7s (+7.8%)
cache .so 37.0 MB 39.8 MB (+7.6%)
load time 2.81s 2.80s (noise)

So ~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_problems intermediate back into direct push!es, since the bare sweep now covers all problems and the separate list no longer has a consumer.

Patch-bumps NonlinearSolve to 4.23.2.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UuAbA8hSnrirMrJjFqxwn5

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
ChrisRackauckas marked this pull request as ready for review July 27, 2026 08:28
@ChrisRackauckas
ChrisRackauckas merged commit 2b0dda5 into SciML:master Jul 27, 2026
57 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants