Skip to content

Commit

Permalink
fix: enzyme is now properly supported in 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Dec 3, 2024
1 parent 7f42587 commit cddd688
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 cddd688

Please sign in to comment.