-
-
Notifications
You must be signed in to change notification settings - Fork 80
Disable Enzyme on Julia v1.12 and enable v1.11 testing #1288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ChrisRackauckas-Claude
wants to merge
6
commits into
SciML:master
Choose a base branch
from
ChrisRackauckas-Claude:disable-enzyme-v1.12-enable-v1.11-testing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Disable Enzyme on Julia v1.12 and enable v1.11 testing #1288
ChrisRackauckas-Claude
wants to merge
6
commits into
SciML:master
from
ChrisRackauckas-Claude:disable-enzyme-v1.12-enable-v1.11-testing
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
- Define ENZYME_ENABLED = VERSION < v"1.12" in SciMLSensitivity module - Export ENZYME_ENABLED for use in tests and downstream packages - Replace all @static if VERSION < v"1.12" with @static if ENZYME_ENABLED - Replace all if VERSION < v"1.12" with if ENZYME_ENABLED in tests - Makes it easy to change the Enzyme compatibility version in one place 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
wsmoses
reviewed
Nov 20, 2025
| AbstractThunk, AbstractTangent | ||
| using Enzyme: Enzyme | ||
| @static if ENZYME_ENABLED | ||
| using Enzyme: Enzyme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enzyme is loadable on 1.12 always, so this isn't required atm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR makes Enzyme support conditional on Julia version < 1.12 and adds v1.11 to the CI testing matrix.
Changes
.github/workflows/CI.ymlEnzymeAdjointandEnzymeVJPon v1.12+ that error if instantiated_concrete_solve_adjointmethods forEnzymeAdjointget_autodiff_from_vjpmethod forEnzymeVJPAutoEnzymeimport conditional on Julia versionMotivation
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
🤖 Generated with Claude Code