Skip to content

Commit

Permalink
Incorrect tag being passed
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Oct 29, 2023
1 parent 756ad8c commit b110e05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ function __findmin(f, x)
end
end

struct NonlinearSolveTag end

"""
default_adargs_to_adtype(; chunk_size = Val{0}(), autodiff = Val{true}(),
standardtag = Val{true}(), diff_type = Val{:forward})
Expand Down Expand Up @@ -54,6 +56,7 @@ function default_adargs_to_adtype(; chunk_size = missing, autodiff = nothing,

ad = _unwrap_val(autodiff)
tag = _unwrap_val(standardtag)
tag isa Bool && tag && (tag = NonlinearSolveTag())
ad && return AutoForwardDiff{_unwrap_val(chunk_size), typeof(tag)}(tag)
return AutoFiniteDiff(; fdtype = diff_type)
end
Expand Down Expand Up @@ -206,8 +209,6 @@ function get_concrete_algorithm(alg, prob)
return __get_concrete_algorithm(alg, prob)
end

struct NonlinearSolveTag end

function __get_concrete_algorithm(alg, prob)
@unpack sparsity, jac_prototype = prob.f
use_sparse_ad = sparsity !== nothing || jac_prototype !== nothing
Expand Down

0 comments on commit b110e05

Please sign in to comment.