Skip to content

Use SciMLSensitivity automatic sensealg choice - #246

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:use-scimlsensitivity-sensealg-choice
Aug 28, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:use-scimlsensitivity-sensealg-choice

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Please ignore this draft until it has been reviewed by @ChrisRackauckas.

What changed and why

DeepEquilibriumNetworks no longer overrides SciMLSensitivity's automatic sensealg choice. solve is called with sensealg = nothing; a user-supplied sensealg in the layer constructor kwargs still wins. SciMLSensitivity is still imported so the solve adjoint rrules load.

For the out-of-place SteadyStateProblems this package constructs, that automatic choice is SteadyStateAdjoint(autodiff = false, autojacvec = ZygoteVJP()). The previous override kept autodiff = true on CPU (constructor default) and truncated the adjoint linear solve (maxiters = 10, 1e-3 tols). GPUArraysCore returns to a test extra; it was only needed for the GPU autodiff dispatch in the removed override.

This supersedes the GPU-only autodiff flip in #243: SciMLSensitivity already sets autodiff = false for GPU and out-of-place problems.

Verification

$ GROUP=QA julia +1.10 --project=. -e 'using Pkg; Pkg.test()'
Test Summary: | Pass  Total     Time
QA            |   18     18  3m25.0s
Testing DeepEquilibriumNetworks tests passed
$ GROUP=Core julia +1.10 --project=. -e 'using Pkg; Pkg.test()'
Test Summary: | Pass  Total   Time
Utils Tests   |   13     13  51.4s
Test Summary: | Pass  Total      Time
Layers Tests  | 1538   1538  23m10.9s
Testing DeepEquilibriumNetworks tests passed

Runic on the changed .jl files and typos over the diff both succeeded with no findings.

Docs: makedocs completed doctest, template expansion, citations, and document checks. The subsequent linkcheck step failed on a pre-existing ColPrac GitHub URL with HTTP 429 (rate limit), not on the api.md change. Two arXiv HTTP→HTTPS 301 warnings are also pre-existing.

Not verified locally

No CUDA GPU on this host, so the GPU test group was not run. Allowed-to-fail / downstream jobs were not run.

Behavior change

On large states (length(u0) > 50) this is not a no-op: the old truncated Krylov kwargs produced a different adjoint than SciMLSensitivity's default linear solve. That is intentional; the truncated solve was a DEQ-specific cheap adjoint, not a better general choice.

🤖 Generated with Grok Build (model: grok-4.6)
Agent-Session: local session ID 01a045fe-9bed-73c2-8681-bb5d74884034

Drop DeepEquilibriumNetworks' SteadyStateAdjoint/GaussAdjoint override
and call solve with sensealg = nothing so SciMLSensitivity picks the
adjoint. User-supplied sensealg kwargs still override. GPUArraysCore
returns to a test extra.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Grok <noreply@x.ai>
Agent-Harness: Grok Build
Agent-Model: grok-4.6
Agent-Session: local session ID 01a045fe-9bed-73c2-8681-bb5d74884034
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 28, 2026 03:36
@ChrisRackauckas
ChrisRackauckas merged commit 1dc9b05 into SciML:main Aug 28, 2026
9 of 10 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