Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

This PR makes Enzyme support conditional on Julia version < 1.12 and adds v1.11 to the CI testing matrix.

Changes

  • Added Julia v1.11 to CI testing matrix in .github/workflows/CI.yml
  • Conditionally load Enzyme only on Julia versions < 1.12
  • Define dummy types for EnzymeAdjoint and EnzymeVJP on v1.12+ that error if instantiated
  • Wrap Enzyme-specific method definitions in version checks:
    • _concrete_solve_adjoint methods for EnzymeAdjoint
    • get_autodiff_from_vjp method for EnzymeVJP
  • Make AutoEnzyme import conditional on Julia version

Motivation

Enzyme is currently incompatible with Julia v1.12, so this change ensures the package can still be used on v1.12 with other AD backends (ForwardDiff, ReverseDiff, Zygote, Tracker, Mooncake) while maintaining full Enzyme support on earlier versions (v1.10, v1.11).

Testing

  • Package compiles successfully on current Julia version
  • All changed files formatted according to package standards
  • CI will test on Julia 1.10 (lts), 1.11, and 1.latest

🤖 Generated with Claude Code

ChrisRackauckas and others added 5 commits November 14, 2025 01:17
This commit makes the following changes:
- Add Julia v1.11 to the CI testing matrix
- Conditionally load Enzyme only on Julia versions < 1.12
- Define dummy types for EnzymeAdjoint and EnzymeVJP on v1.12+ that error if instantiated
- Wrap Enzyme-specific method definitions in version checks
- Make AutoEnzyme import conditional on Julia version

Enzyme is currently incompatible with Julia v1.12, so this change
ensures the package can still be used on v1.12 with other AD backends
while maintaining full Enzyme support on earlier versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Keep EnzymeAdjoint and EnzymeVJP types and exports always available.
Only conditionally load `using Enzyme` on Julia < 1.12.
The types will error with a clear message if instantiated on v1.12+.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Skip enzyme_closure.jl test entirely on v1.12
- Wrap EnzymeAdjoint gradient computations in concrete_solve_derivatives.jl
- Wrap corresponding test assertions for Enzyme results

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Conditionally compile EnzymeVJP tests on Julia < 1.12
- Wrap InterpolatingAdjoint, QuadratureAdjoint, GaussAdjoint, and GaussKronrodAdjoint tests using EnzymeVJP
- Wrap BacksolveAdjoint test with EnzymeVJP and its helper function

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
EOF
)
PredictiveController is in OrdinaryDiffEqCore, not OrdinaryDiffEq.
Import OrdinaryDiffEqCore and use the correct module reference.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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