Skip to content

Commit b110e05

Browse files
committed
Incorrect tag being passed
1 parent 756ad8c commit b110e05

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils.jl

+3-2
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})
@@ -54,6 +56,7 @@ function default_adargs_to_adtype(; chunk_size = missing, autodiff = nothing,
5456

5557
ad = _unwrap_val(autodiff)
5658
tag = _unwrap_val(standardtag)
59+
tag isa Bool && tag && (tag = NonlinearSolveTag())
5760
ad && return AutoForwardDiff{_unwrap_val(chunk_size), typeof(tag)}(tag)
5861
return AutoFiniteDiff(; fdtype = diff_type)
5962
end
@@ -206,8 +209,6 @@ function get_concrete_algorithm(alg, prob)
206209
return __get_concrete_algorithm(alg, prob)
207210
end
208211

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

0 commit comments

Comments
 (0)