Skip to content

Commit

Permalink
fix: enzyme is now properly supported in 1.11 (#515)
Browse files Browse the repository at this point in the history
* fix: remove compiled reversediff from default options

* fix: enzyme is now properly supported in 1.11
  • Loading branch information
avik-pal authored Dec 4, 2024
1 parent 87c66b4 commit 2284348
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions lib/NonlinearSolveBase/src/autodiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@

# Ordering is important here. We want to select the first one that is compatible with the
# problem.
# XXX: Remove this once Enzyme is properly supported on Julia 1.11+
@static if VERSION v"1.11-"
const ReverseADs = (
ADTypes.AutoZygote(),
ADTypes.AutoTracker(),
ADTypes.AutoReverseDiff(),
ADTypes.AutoEnzyme(; mode = EnzymeCore.Reverse),
ADTypes.AutoFiniteDiff()
)
else
const ReverseADs = (
ADTypes.AutoEnzyme(; mode = EnzymeCore.Reverse),
ADTypes.AutoZygote(),
ADTypes.AutoTracker(),
ADTypes.AutoReverseDiff(),
ADTypes.AutoFiniteDiff()
)
end
const ReverseADs = (
ADTypes.AutoEnzyme(; mode = EnzymeCore.Reverse),
ADTypes.AutoZygote(),
ADTypes.AutoTracker(),
ADTypes.AutoReverseDiff(),
ADTypes.AutoFiniteDiff()
)

const ForwardADs = (
ADTypes.AutoPolyesterForwardDiff(),
Expand Down

0 comments on commit 2284348

Please sign in to comment.