-
-
Notifications
You must be signed in to change notification settings - Fork 57
Disable Enzyme on Julia 1.12+ to fix CI test failures #731
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
base: master
Are you sure you want to change the base?
Disable Enzyme on Julia 1.12+ to fix CI test failures #731
Conversation
- Added global const ENZYME_ENABLED = VERSION < v"1.12" in one central location - Modified test/runtests.jl to conditionally install Enzyme based on ENZYME_ENABLED - Modified test/adjoint_tests.jl to conditionally run Enzyme tests - Easy to re-enable by changing the condition in the const definition - Resolves CI failures on Julia v1.12+ where Enzyme has compatibility issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Skip entire adjoint test on Julia 1.12+ since SciMLSensitivity/Mooncake aren't installed - Add Julia 1.11 to all CI workflows (top-level and all sublibs) - This ensures we test on both v1.11 (with Enzyme) and v1.12+ (without Enzyme) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Additional fixesUpdated to skip the entire adjoint test on Julia 1.12+ rather than just conditionally importing Enzyme, since SciMLSensitivity and Mooncake also aren't installed on v1.12+. Also added Julia 1.11 to all CI workflows:
This ensures we test on both:
|
The previous approach using `return` didn't work because @testitem isn't a function scope. Using @static if prevents the package imports from being attempted at all on Julia 1.12+. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Fixed: Use @static if instead of returnFixed the adjoint test to use Now the entire test body is conditionally compiled based on the Julia version, preventing the package imports from being attempted on Julia 1.12+. |
Added VERSION < v"1.12" check to all conditional Enzyme imports across all subpackage tests: - lib/NonlinearSolveBase/ext/NonlinearSolveBaseEnzymeExt.jl - lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl - lib/NonlinearSolveHomotopyContinuation/test/allroots.jl - lib/NonlinearSolveHomotopyContinuation/test/single_root.jl - lib/NonlinearSolveQuasiNewton/test/core_tests.jl - lib/SciMLJacobianOperators/test/core_tests.jl - lib/SimpleNonlinearSolve/test/core/rootfind_tests.jl Changed from: if isempty(VERSION.prerelease) Changed to: if isempty(VERSION.prerelease) && VERSION < v"1.12" This ensures Enzyme is not loaded on Julia 1.12+ where it has compatibility issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Updated all sublib Enzyme version checksExtended the Enzyme version check to all subpackage tests to prevent Enzyme from being loaded on Julia 1.12+. Files Updated:
Change:# Before
if isempty(VERSION.prerelease)
# After
if isempty(VERSION.prerelease) && VERSION < v"1.12"This ensures that all Enzyme imports and usage are properly skipped on Julia 1.12+ across the entire codebase, not just in the top-level tests. |
Summary
Fixes CI test failures on Julia v1 (1.12+) by conditionally disabling Enzyme, which currently has compatibility issues with Julia 1.12+.
Changes
ENZYME_ENABLED = VERSION < v"1.12"and updated package installation logicRe-enabling Enzyme
To re-enable Enzyme in the future (once compatibility is fixed), simply change the condition in both files:
This centralizes the Enzyme compatibility check in one easy-to-modify location.
Test plan
🤖 Generated with Claude Code