Skip to content

Commit 49de475

Browse files
committed
Incorrect tag being passed
1 parent 59c988e commit 49de475

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ function __findmin(f, x)
2121
end
2222
end
2323

24+
struct NonlinearSolveTag end
25+
2426
"""
2527
default_adargs_to_adtype(; chunk_size = Val{0}(), autodiff = Val{true}(),
2628
standardtag = Val{true}(), diff_type = Val{:forward})
@@ -53,7 +55,7 @@ function default_adargs_to_adtype(; chunk_size = missing, autodiff = nothing,
5355
autodiff === missing && (autodiff = Val{true}())
5456

5557
ad = _unwrap_val(autodiff)
56-
tag = _unwrap_val(standardtag)
58+
tag = _unwrap_val(standardtag) ? NonlinearSolveTag() : nothing
5759
ad && return AutoForwardDiff{_unwrap_val(chunk_size), typeof(tag)}(tag)
5860
return AutoFiniteDiff(; fdtype = diff_type)
5961
end
@@ -206,8 +208,6 @@ function get_concrete_algorithm(alg, prob)
206208
return __get_concrete_algorithm(alg, prob)
207209
end
208210

209-
struct NonlinearSolveTag end
210-
211211
function __get_concrete_algorithm(alg, prob)
212212
@unpack sparsity, jac_prototype = prob.f
213213
use_sparse_ad = sparsity !== nothing || jac_prototype !== nothing

0 commit comments

Comments
 (0)