From 228434824c17e179fc416c16ed99fc3b67a1eb16 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 3 Dec 2024 22:12:39 -0500 Subject: [PATCH] fix: enzyme is now properly supported in 1.11 (#515) * fix: remove compiled reversediff from default options * fix: enzyme is now properly supported in 1.11 --- lib/NonlinearSolveBase/src/autodiff.jl | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/lib/NonlinearSolveBase/src/autodiff.jl b/lib/NonlinearSolveBase/src/autodiff.jl index a05ee0b56..5f9843e9a 100644 --- a/lib/NonlinearSolveBase/src/autodiff.jl +++ b/lib/NonlinearSolveBase/src/autodiff.jl @@ -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(),