Skip to content
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

fix: remove compiled reversediff from default options #514

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/NonlinearSolveBase/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NonlinearSolveBase"
uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0"
authors = ["Avik Pal <[email protected]> and contributors"]
version = "1.3.3"
version = "1.4.0"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand All @@ -13,7 +13,6 @@ ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471"
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
FastClosures = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a"
FunctionProperties = "f62d2435-5019-4c03-9749-2d4c77af0cbc"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
MaybeInplace = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb"
Expand Down Expand Up @@ -60,7 +59,6 @@ EnzymeCore = "0.8"
ExplicitImports = "1.10.1"
FastClosures = "0.3"
ForwardDiff = "0.10.36"
FunctionProperties = "0.1.2"
InteractiveUtils = "<0.0.1, 1"
LineSearch = "0.1.4"
LinearAlgebra = "1.10"
Expand Down
1 change: 0 additions & 1 deletion lib/NonlinearSolveBase/src/NonlinearSolveBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ using StaticArraysCore: StaticArray, SMatrix, SArray, MArray

using CommonSolve: CommonSolve, init
using EnzymeCore: EnzymeCore
using FunctionProperties: hasbranching
using MaybeInplace: @bb
using RecursiveArrayTools: AbstractVectorOfArray, ArrayPartition
using SciMLBase: SciMLBase, ReturnCode, AbstractODEIntegrator, AbstractNonlinearProblem,
Expand Down
10 changes: 0 additions & 10 deletions lib/NonlinearSolveBase/src/autodiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
const ReverseADs = (
ADTypes.AutoZygote(),
ADTypes.AutoTracker(),
ADTypes.AutoReverseDiff(; compile = true),
ADTypes.AutoReverseDiff(),
ADTypes.AutoEnzyme(; mode = EnzymeCore.Reverse),
ADTypes.AutoFiniteDiff()
Expand All @@ -18,7 +17,6 @@ else
ADTypes.AutoEnzyme(; mode = EnzymeCore.Reverse),
ADTypes.AutoZygote(),
ADTypes.AutoTracker(),
ADTypes.AutoReverseDiff(; compile = true),
ADTypes.AutoReverseDiff(),
ADTypes.AutoFiniteDiff()
)
Expand Down Expand Up @@ -116,14 +114,6 @@ function incompatible_backend_and_problem(
end

additional_incompatible_backend_check(::AbstractNonlinearProblem, ::AbstractADType) = false
function additional_incompatible_backend_check(prob::AbstractNonlinearProblem,
::ADTypes.AutoReverseDiff{true})
if SciMLBase.isinplace(prob)
fu = prob.f.resid_prototype === nothing ? zero(prob.u0) : prob.f.resid_prototype
return hasbranching(prob.f, fu, prob.u0, prob.p)
end
return hasbranching(prob.f, prob.u0, prob.p)
end
function additional_incompatible_backend_check(
prob::AbstractNonlinearProblem, ::ADTypes.AutoPolyesterForwardDiff)
prob.u0 isa SArray && return true # promotes to a mutable array
Expand Down
Loading