Skip to content

Commit a93ddc4

Browse files
committed
Don't warn if user specified FiniteDifferencing
1 parent 4312611 commit a93ddc4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "NonlinearSolve"
22
uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
33
authors = ["SciML"]
4-
version = "3.12.4"
4+
version = "3.12.5"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

src/internal/helpers.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ end
5757
function get_concrete_reverse_ad(
5858
autodiff::ADTypes.AbstractADType, prob, sp::Val{test_sparse} = True,
5959
args...; check_reverse_mode = true, kwargs...) where {test_sparse}
60-
if !isa(ADTypes.mode(autodiff), ADTypes.ReverseMode) && check_reverse_mode
60+
if !isa(ADTypes.mode(autodiff), ADTypes.ReverseMode) &&
61+
!isa(autodiff, ADTypes.AutoFiniteDiff) && # User specified finite differencing
62+
check_reverse_mode
6163
@warn "$(autodiff)::$(typeof(autodiff)) is not a `ReverseMode`. Use with caution." maxlog=1
6264
end
6365
if autodiff isa Union{AutoZygote, AutoSparse{<:AutoZygote}} && isinplace(prob)

0 commit comments

Comments
 (0)