You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add diff_tunables flag to SteadyStateAdjoint for full-parameter VJP
Add `diff_tunables::Val` field to SteadyStateAdjoint (default Val(true)).
When Val(false), the parameter VJP via vecjacobian! is computed w.r.t.
the full parameter object (including caches) instead of just tunables.
This is needed for SCCNonlinearProblem where explicitfuns! write active
data into non-tunable parameter components (caches). The automatic
sensealg choice detects non-empty caches and sets diff_tunables=Val(false)
with a structured-VJP-compatible backend.
Changes:
- sensitivity_algorithms.jl: Add diff_tunables field to SteadyStateAdjoint
- adjoint_common.jl: Add use_full_p kwarg to adjointdiffcache
- steadystate_adjoint.jl: Gate use_full_p on diff_tunables flag
- concrete_solve.jl: Pass original_p to automatic_sensealg_choice for
cache detection; return full gradient for EnzymeOriginator when
diff_tunables=Val(false)
- test/scc_enzyme.jl: Direct SCC differentiation test with Enzyme
Companion PR: NonlinearSolve.jl#884
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments