From 7f42587e5813f96aada07c916315c23d28960bee Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 2 Dec 2024 23:03:41 -0500 Subject: [PATCH] fix: remove compiled reversediff from default options --- lib/NonlinearSolveBase/Project.toml | 4 +--- lib/NonlinearSolveBase/src/NonlinearSolveBase.jl | 1 - lib/NonlinearSolveBase/src/autodiff.jl | 10 ---------- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/NonlinearSolveBase/Project.toml b/lib/NonlinearSolveBase/Project.toml index 4cc10a6be..2f5404dc7 100644 --- a/lib/NonlinearSolveBase/Project.toml +++ b/lib/NonlinearSolveBase/Project.toml @@ -1,7 +1,7 @@ name = "NonlinearSolveBase" uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" authors = ["Avik Pal and contributors"] -version = "1.3.3" +version = "1.4.0" [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" @@ -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" @@ -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" diff --git a/lib/NonlinearSolveBase/src/NonlinearSolveBase.jl b/lib/NonlinearSolveBase/src/NonlinearSolveBase.jl index 649ac79d2..858137bff 100644 --- a/lib/NonlinearSolveBase/src/NonlinearSolveBase.jl +++ b/lib/NonlinearSolveBase/src/NonlinearSolveBase.jl @@ -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, diff --git a/lib/NonlinearSolveBase/src/autodiff.jl b/lib/NonlinearSolveBase/src/autodiff.jl index c92a3e27d..a05ee0b56 100644 --- a/lib/NonlinearSolveBase/src/autodiff.jl +++ b/lib/NonlinearSolveBase/src/autodiff.jl @@ -8,7 +8,6 @@ const ReverseADs = ( ADTypes.AutoZygote(), ADTypes.AutoTracker(), - ADTypes.AutoReverseDiff(; compile = true), ADTypes.AutoReverseDiff(), ADTypes.AutoEnzyme(; mode = EnzymeCore.Reverse), ADTypes.AutoFiniteDiff() @@ -18,7 +17,6 @@ else ADTypes.AutoEnzyme(; mode = EnzymeCore.Reverse), ADTypes.AutoZygote(), ADTypes.AutoTracker(), - ADTypes.AutoReverseDiff(; compile = true), ADTypes.AutoReverseDiff(), ADTypes.AutoFiniteDiff() ) @@ -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