Skip to content

Enable Enzyme tests in steady_state.jl on Julia 1.12+ (Enzyme 0.13.148)#1450

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:cc/enable-ss-enzyme-1.12
May 21, 2026
Merged

Enable Enzyme tests in steady_state.jl on Julia 1.12+ (Enzyme 0.13.148)#1450
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:cc/enable-ss-enzyme-1.12

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Please ignore until reviewed by @ChrisRackauckas.

Summary

test/steady_state.jl had ENZYME_AVAILABLE set to false on Julia 1.12+ because of NonlinearProblem + Enzyme segfaults / GC invariant violations on 1.12. Enzyme 0.13.148 (released 2026-05-21) closes:

With those fixed, using Enzyme and ENZYME_AVAILABLE = true can be unconditional. The Zygote-vs-Mooncake split for compute_gradient is kept (separate concern: Zygote 0.7 has issues on 1.12).

Verification

Locally on Julia 1.12.6 + Enzyme 0.13.148:

Block Result
All enzyme_gradient cases (NewtonRaphson/TrustRegion/Klement, iip+oop) 4/4 PASS
SteadyStateAdjoint(autojacvec = EnzymeVJP()) through adjoint_sensitivities (res1h, res2h, res3h) PASS
Full file 63 Pass / 1 Broken / 0 Fail in 18m12s

The 1 Broken is @test_skip false for enzyme_gradient2 over ZygoteVJP — pre-existing, unrelated (Enzyme can't differentiate through Zygote's compiled code regardless of Julia version).

Refs

Test plan

  • Local full test/steady_state.jl on Julia 1.12.6: 63 Pass / 1 Broken
  • Runic.jl clean
  • CI green

Enzyme 0.13.148 closes the NonlinearProblem GC invariant
(EnzymeAD/Enzyme.jl#3012) and SCCNonlinearProblem
(EnzymeAD/Enzyme.jl#3026) issues that previously gated these. Verified
on Julia 1.12.6: all `enzyme_gradient` blocks pass
(NewtonRaphson / TrustRegion / Klement, iip and oop) and the
`SteadyStateAdjoint(autojacvec = EnzymeVJP())` paths through
`adjoint_sensitivities` return the correct gradients.

Full file: 63 Pass / 1 Broken (the broken is a pre-existing
`@test_skip` for `enzyme_gradient2` over `ZygoteVJP`, which is a
separate "Enzyme can't differentiate through Zygote" limitation).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review May 21, 2026 11:15
@ChrisRackauckas ChrisRackauckas merged commit 8b08de3 into SciML:master May 21, 2026
40 of 50 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