Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
e8af05c
adding verbosity stuff
jClugstor Jul 10, 2025
30c8ec0
bring back compilation workload
jClugstor Jul 22, 2025
9d5d2a2
add some toggles
jClugstor Jul 22, 2025
ad28928
use scoped values
jClugstor Jul 22, 2025
6238dfe
imports
jClugstor Jul 22, 2025
49f3a54
use SciMLMessage
jClugstor Jul 22, 2025
0eec43a
add more message
jClugstor Jul 23, 2025
11d6383
add defaults
jClugstor Jul 23, 2025
d37c488
use correct names
jClugstor Jul 23, 2025
1d08d42
fix type of scopedvalue
jClugstor Jul 23, 2025
bfe60f2
these don't need to be mutable
jClugstor Jul 24, 2025
0263774
fix kwargs
jClugstor Jul 24, 2025
85751f1
redundant linsolve kwargs
jClugstor Jul 24, 2025
9fd8977
get rid of comments
jClugstor Jul 24, 2025
8b0a8ad
resintate setup workload
jClugstor Jul 24, 2025
9dbbbc2
get rid of ScopedValues experiment
jClugstor Jul 30, 2025
62028be
add verbose to caches
jClugstor Jul 30, 2025
c2bacbc
add verbosity messages, fix constructor
jClugstor Jul 30, 2025
9343267
imports, other preparations
jClugstor Jul 30, 2025
2f7ad8a
make sure that LinearVerbosity is passed to linsolve
jClugstor Jul 31, 2025
a5117de
ensure that LinearVerbosity is passed on in more places
jClugstor Jul 31, 2025
15de205
typo, struct should be mutable
jClugstor Jul 31, 2025
584e67b
turn back messages that don't have access to verbose to warn
jClugstor Jul 31, 2025
52b1b1e
make sure that verbosity is in polysolve cache
jClugstor Jul 31, 2025
e4c762d
add verbosity tests
jClugstor Jul 31, 2025
d152719
get rid of stale import, add compat bounds
jClugstor Jul 31, 2025
6fd6d9c
ensure backwards compatibility
jClugstor Aug 1, 2025
40bbba5
import Verbosity for default verbosity
jClugstor Aug 1, 2025
6da041f
make sure linear kwargs are passed
jClugstor Aug 1, 2025
b6aadde
fix kwarg passing
jClugstor Aug 1, 2025
1862dba
fix numerical verbosity
jClugstor Aug 1, 2025
f4ad7ce
add backwards compat tests for Bool verbose
jClugstor Aug 1, 2025
a2acdc8
change constructors to use kwargs
jClugstor Aug 1, 2025
2c6c847
completely refactor verbosity specifier
jClugstor Oct 20, 2025
bc2bf7a
fix @SciMLMessage macro usage
jClugstor Oct 20, 2025
efb3252
fix imports, add tests
jClugstor Oct 20, 2025
c0e6c30
refactor for new SciMLLogging
jClugstor Oct 20, 2025
cbc7e2f
linear should be minimal
jClugstor Oct 21, 2025
f1b00d6
fix imports and exports
jClugstor Oct 21, 2025
02cb406
add SciMLLogging to test target
jClugstor Oct 21, 2025
76c5683
fix verbosity tests
jClugstor Oct 21, 2025
0626714
remove bad getproperty
jClugstor Oct 21, 2025
e003c15
bump SciMLLogging
jClugstor Oct 21, 2025
a1b3f79
remove unused toggles
jClugstor Oct 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Random = "1.10"
ReTestItems = "1.24"
Reexport = "1.2.2"
ReverseDiff = "1.15"
SciMLLogging = "1.3"
SIAMFANLEquations = "1.0.1"
SciMLBase = "2.116"
SimpleNonlinearSolve = "2.1"
Expand Down Expand Up @@ -145,6 +146,7 @@ PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
ReTestItems = "817f1d60-ba6b-4fd5-9520-3cf149f6a823"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1"
SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4"
SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5"
SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"
Expand All @@ -157,4 +159,4 @@ Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["Aqua", "BandedMatrices", "BenchmarkTools", "ExplicitImports", "FastLevenbergMarquardt", "FixedPointAcceleration", "Hwloc", "InteractiveUtils", "LeastSquaresOptim", "LineSearches", "MINPACK", "NLSolvers", "NLsolve", "NaNMath", "NonlinearProblemLibrary", "OrdinaryDiffEqTsit5", "PETSc", "Pkg", "PolyesterForwardDiff", "Random", "ReTestItems", "SIAMFANLEquations", "SparseConnectivityTracer", "SparseMatrixColorings", "SpeedMapping", "StableRNGs", "StaticArrays", "Sundials", "Test", "Zygote", "ReverseDiff", "Tracker"]
test = ["Aqua", "BandedMatrices", "BenchmarkTools", "ExplicitImports", "FastLevenbergMarquardt", "FixedPointAcceleration", "Hwloc", "InteractiveUtils", "LeastSquaresOptim", "LineSearches", "MINPACK", "NLSolvers", "NLsolve", "NaNMath", "NonlinearProblemLibrary", "OrdinaryDiffEqTsit5", "PETSc", "Pkg", "PolyesterForwardDiff", "Random", "ReTestItems", "SIAMFANLEquations", "SparseConnectivityTracer", "SparseMatrixColorings", "SpeedMapping", "StableRNGs", "StaticArrays", "Sundials", "Test", "Zygote", "ReverseDiff", "Tracker", "SciMLLogging"]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using PrecompileTools: @compile_workload, @setup_workload
using Reexport: @reexport

using CommonSolve: CommonSolve, solve
using NonlinearSolveBase: NonlinearSolveBase, AbstractNonlinearSolveAlgorithm
using NonlinearSolveBase: NonlinearSolveBase, AbstractNonlinearSolveAlgorithm, NonlinearVerbosity, @SciMLMessage, AbstractVerbosityPreset
using SciMLBase: SciMLBase, IntervalNonlinearProblem, ReturnCode

abstract type AbstractBracketingAlgorithm <: AbstractNonlinearSolveAlgorithm end
Expand Down
8 changes: 4 additions & 4 deletions lib/BracketingNonlinearSolve/src/bisection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ end

function SciMLBase.__solve(
prob::IntervalNonlinearProblem, alg::Bisection, args...;
maxiters = 1000, abstol = nothing, verbose::Bool = true, kwargs...
maxiters = 1000, abstol = nothing, verbose::NonlinearVerbosity = NonlinearVerbosity(), kwargs...
)
@assert !SciMLBase.isinplace(prob) "`Bisection` only supports out-of-place problems."

Expand All @@ -45,9 +45,9 @@ function SciMLBase.__solve(
end

if sign(fl) == sign(fr)
verbose &&
@warn "The interval is not an enclosing interval, opposite signs at the \
boundaries are required."
@SciMLMessage("The interval is not an enclosing interval, opposite signs at the \
boundaries are required.",
verbose, :non_enclosing_interval)
return SciMLBase.build_solution(
prob, alg, left, fl; retcode = ReturnCode.InitialFailure, left, right
)
Expand Down
18 changes: 14 additions & 4 deletions lib/BracketingNonlinearSolve/src/brent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ struct Brent <: AbstractBracketingAlgorithm end

function SciMLBase.__solve(
prob::IntervalNonlinearProblem, alg::Brent, args...;
maxiters = 1000, abstol = nothing, verbose::Bool = true, kwargs...
maxiters = 1000, abstol = nothing, verbose = NonlinearVerbosity(), kwargs...
)
@assert !SciMLBase.isinplace(prob) "`Brent` only supports out-of-place problems."

if verbose isa Bool
if verbose
verbose = NonlinearVerbosity()
else
verbose = NonlinearVerbosity(None())
end
elseif verbose isa AbstractVerbosityPreset
verbose = NonlinearVerbosity(verbose)
end

f = Base.Fix2(prob.f, prob.p)
left, right = prob.tspan
fl, fr = f(left), f(right)
Expand All @@ -33,9 +43,9 @@ function SciMLBase.__solve(
end

if sign(fl) == sign(fr)
verbose &&
@warn "The interval is not an enclosing interval, opposite signs at the \
boundaries are required."
@SciMLMessage("The interval is not an enclosing interval, opposite signs at the \
boundaries are required.",
verbose, :non_enclosing_interval)
return SciMLBase.build_solution(
prob, alg, left, fl; retcode = ReturnCode.InitialFailure, left, right
)
Expand Down
18 changes: 14 additions & 4 deletions lib/BracketingNonlinearSolve/src/falsi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ struct Falsi <: AbstractBracketingAlgorithm end

function SciMLBase.__solve(
prob::IntervalNonlinearProblem, alg::Falsi, args...;
maxiters = 1000, abstol = nothing, verbose::Bool = true, kwargs...
maxiters = 1000, abstol = nothing, verbose = NonlinearVerbosity(), kwargs...
)
@assert !SciMLBase.isinplace(prob) "`False` only supports out-of-place problems."

if verbose isa Bool
if verbose
verbose = NonlinearVerbosity()
else
verbose = NonlinearVerbosity(None())
end
elseif verbose isa AbstractVerbosityPreset
verbose = NonlinearVerbosity(verbose)
end

f = Base.Fix2(prob.f, prob.p)
l, r = prob.tspan # don't reuse these variables
left, right = prob.tspan
Expand All @@ -32,9 +42,9 @@ function SciMLBase.__solve(
end

if sign(fl) == sign(fr)
verbose &&
@warn "The interval is not an enclosing interval, opposite signs at the \
boundaries are required."
@SciMLMessage("The interval is not an enclosing interval, opposite signs at the \
boundaries are required.",
verbose, :non_enclosing_interval)
return SciMLBase.build_solution(
prob, alg, left, fl; retcode = ReturnCode.InitialFailure, left, right
)
Expand Down
8 changes: 4 additions & 4 deletions lib/BracketingNonlinearSolve/src/itp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ end

function SciMLBase.__solve(
prob::IntervalNonlinearProblem, alg::ITP, args...;
maxiters = 1000, abstol = nothing, verbose::Bool = true, kwargs...
maxiters = 1000, abstol = nothing, verbose::NonlinearVerbosity = NonlinearVerbosity(), kwargs...
)
@assert !SciMLBase.isinplace(prob) "`ITP` only supports out-of-place problems."

Expand All @@ -83,9 +83,9 @@ function SciMLBase.__solve(
end

if sign(fl) == sign(fr)
verbose &&
@warn "The interval is not an enclosing interval, opposite signs at the \
boundaries are required."
@SciMLMessage("The interval is not an enclosing interval, opposite signs at the \
boundaries are required.",
verbose, :non_enclosing_interval)
return SciMLBase.build_solution(
prob, alg, left, fl; retcode = ReturnCode.InitialFailure, left, right
)
Expand Down
8 changes: 4 additions & 4 deletions lib/BracketingNonlinearSolve/src/ridder.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ struct Ridder <: AbstractBracketingAlgorithm end

function SciMLBase.__solve(
prob::IntervalNonlinearProblem, alg::Ridder, args...;
maxiters = 1000, abstol = nothing, verbose::Bool = true, kwargs...
maxiters = 1000, abstol = nothing, verbose::NonlinearVerbosity = NonlinearVerbosity(), kwargs...
)
@assert !SciMLBase.isinplace(prob) "`Ridder` only supports out-of-place problems."

Expand All @@ -32,9 +32,9 @@ function SciMLBase.__solve(
end

if sign(fl) == sign(fr)
verbose &&
@warn "The interval is not an enclosing interval, opposite signs at the \
boundaries are required."
@SciMLMessage("The interval is not an enclosing interval, opposite signs at the \
boundaries are required.",
verbose, :non_enclosing_interval)
return SciMLBase.build_solution(
prob, alg, left, fl; retcode = ReturnCode.InitialFailure, left, right
)
Expand Down
7 changes: 4 additions & 3 deletions lib/NonlinearSolveBase/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SciMLJacobianOperators = "19f34311-ddf3-4b8b-af20-060888a46c0e"
SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1"
SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
Expand Down Expand Up @@ -54,7 +55,6 @@ NonlinearSolveBaseSparseArraysExt = "SparseArrays"
NonlinearSolveBaseSparseMatrixColoringsExt = "SparseMatrixColorings"
NonlinearSolveBaseTrackerExt = "Tracker"


[compat]
ADTypes = "1.9"
Adapt = "4.1.0"
Expand All @@ -66,8 +66,8 @@ CommonSolve = "0.2.4"
Compat = "4.15"
ConcreteStructs = "0.2.3"
DifferentiationInterface = "0.6.16, 0.7"
EnzymeCore = "0.8"
Enzyme = "0.13.12"
EnzymeCore = "0.8"
ExplicitImports = "1.10.1"
FastClosures = "0.3"
ForwardDiff = "0.10.36, 1"
Expand All @@ -84,6 +84,7 @@ RecursiveArrayTools = "3"
ReverseDiff = "1.15"
SciMLBase = "2.116"
SciMLJacobianOperators = "0.1.1"
SciMLLogging = "1.3.1"
SciMLOperators = "1.7"
SciMLStructures = "1.5"
Setfield = "1.1.2"
Expand All @@ -92,8 +93,8 @@ SparseMatrixColorings = "0.4.5"
StaticArraysCore = "1.4"
SymbolicIndexingInterface = "0.3.43"
Test = "1.10"
Tracker = "0.2.35"
TimerOutputs = "0.5.23"
Tracker = "0.2.35"
julia = "1.10"

[extras]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ using ArrayInterface: ArrayInterface
using CommonSolve: CommonSolve, init, solve!
using LinearSolve: LinearSolve, QRFactorization, SciMLLinearSolveAlgorithm
using SciMLBase: ReturnCode, LinearProblem, LinearAliasSpecifier
using SciMLLogging: @SciMLMessage

using LinearAlgebra: ColumnNorm

using NonlinearSolveBase: NonlinearSolveBase, LinearSolveJLCache, LinearSolveResult, Utils
using NonlinearSolveBase: NonlinearSolveBase, LinearSolveJLCache, LinearSolveResult, Utils, NonlinearVerbosity

function (cache::LinearSolveJLCache)(;
A = nothing, b = nothing, linu = nothing,
reuse_A_if_factorization = false, verbose = true, kwargs...
reuse_A_if_factorization = false, kwargs...
)
cache.stats.nsolve += 1

update_A!(cache, A, reuse_A_if_factorization)
b !== nothing && setproperty!(cache.lincache, :b, b)
linu !== nothing && NonlinearSolveBase.set_lincache_u!(cache, linu)

linres = solve!(cache.lincache)
if linres.retcode === ReturnCode.Failure
return LinearSolveResult(; linres.u, success = false)
Expand Down
8 changes: 8 additions & 0 deletions lib/NonlinearSolveBase/src/NonlinearSolveBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import SciMLBase: solve, init, __init, __solve, wrap_sol, get_root_indp, isinpla

using SciMLJacobianOperators: JacobianOperator, StatefulJacobianOperator
using SciMLOperators: AbstractSciMLOperator, IdentityOperator
using SciMLLogging: @SciMLMessage, AbstractVerbositySpecifier, AbstractVerbosityPreset, AbstractMessageLevel,
None, Minimal, Standard, Detailed, All, Silent, InfoLevel, WarnLevel, ErrorLevel,
CustomLevel

using SymbolicIndexingInterface: SymbolicIndexingInterface
import SciMLStructures
using Setfield: @set!
Expand All @@ -41,6 +45,7 @@ const SII = SymbolicIndexingInterface

include("public.jl")
include("utils.jl")
include("verbosity.jl")

include("abstract_types.jl")
include("common_defaults.jl")
Expand All @@ -54,6 +59,7 @@ include("tracing.jl")
include("wrappers.jl")
include("polyalg.jl")


include("descent/common.jl")
include("descent/newton.jl")
include("descent/steepest.jl")
Expand Down Expand Up @@ -92,6 +98,8 @@ export DescentResult, SteepestDescent, NewtonDescent, DampedNewtonDescent, Dogle

export NonlinearSolvePolyAlgorithm

export NonlinearVerbosity

export pickchunksize

end
1 change: 1 addition & 0 deletions lib/NonlinearSolveBase/src/abstract_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ the cache:
- `maxtime`: the maximum time limit for the solver. (Optional)
- `timer`: the timer for the solver. (Optional)
- `total_time`: the total time taken by the solver. (Optional)
- `verbose`: a verbosity object that contains options determining what log messages are emitted.
"""
abstract type AbstractNonlinearSolveCache <: AbstractNonlinearSolveBaseAPI end

Expand Down
24 changes: 14 additions & 10 deletions lib/NonlinearSolveBase/src/autodiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ function select_forward_mode_autodiff(
!(ADTypes.mode(ad) isa ADTypes.ForwardOrReverseMode) &&
!is_finite_differences_backend(ad)
@warn lazy"The chosen AD backend $(ad) is not a forward mode AD. Use with caution."

@warn "The chosen AD backend $(ad) is not a forward mode AD. Use with caution."

end
if incompatible_backend_and_problem(prob, ad)
adₙ = select_forward_mode_autodiff(prob, nothing; warn_check_mode)
@warn lazy"The chosen AD backend `$(ad)` does not support the chosen problem. This \

@warn "The chosen AD backend `$(ad)` does not support the chosen problem. This \
could be because the backend package for the chosen AD isn't loaded. After \
running autodiff selection detected `$(adₙ)` as a potential forward mode \
backend."
Expand All @@ -50,14 +54,14 @@ function select_reverse_mode_autodiff(
if warn_check_mode && !(ADTypes.mode(ad) isa ADTypes.ReverseMode) &&
!(ADTypes.mode(ad) isa ADTypes.ForwardOrReverseMode) &&
!is_finite_differences_backend(ad)
@warn lazy"The chosen AD backend $(ad) is not a reverse mode AD. Use with caution."
@warn "The chosen AD backend $(ad) is not a forward mode AD. Use with caution."
end
if incompatible_backend_and_problem(prob, ad)
adₙ = select_reverse_mode_autodiff(prob, nothing; warn_check_mode)
@warn lazy"The chosen AD backend `$(ad)` does not support the chosen problem. This \
could be because the backend package for the chosen AD isn't loaded. After \
running autodiff selection detected `$(adₙ)` as a potential reverse mode \
backend."
@warn "The chosen AD backend `$(ad)` does not support the chosen problem. This \
could be because the backend package for the chosen AD isn't loaded. After \
running autodiff selection detected `$(adₙ)` as a potential forward mode \
backend."
return adₙ
end
return ad
Expand All @@ -75,10 +79,10 @@ end
function select_jacobian_autodiff(prob::AbstractNonlinearProblem, ad::AbstractADType)
if incompatible_backend_and_problem(prob, ad)
adₙ = select_jacobian_autodiff(prob, nothing)
@warn lazy"The chosen AD backend `$(ad)` does not support the chosen problem. This \
could be because the backend package for the chosen AD isn't loaded. After \
running autodiff selection detected `$(adₙ)` as a potential jacobian \
backend."
@warn "The chosen AD backend `$(ad)` does not support the chosen problem. This \
could be because the backend package for the chosen AD isn't loaded. After \
running autodiff selection detected `$(adₙ)` as a potential forward mode \
backend."
return adₙ
end
return ad
Expand Down
12 changes: 10 additions & 2 deletions lib/NonlinearSolveBase/src/descent/newton.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ function InternalAPI.init(
δus = Utils.unwrap_val(shared) ≤ 1 ? nothing : map(2:Utils.unwrap_val(shared)) do i
@bb δu_ = similar(u)
end

if Utils.unwrap_val(pre_inverted)
lincache = nothing
else
if haskey(kwargs, :verbose)
linsolve_kwargs = merge((verbose = kwargs[:verbose].linear_verbosity,), linsolve_kwargs)
end

lincache = construct_linear_solver(
alg, alg.linsolve, J, Utils.safe_vec(fu), Utils.safe_vec(u);
stats, abstol, reltol, linsolve_kwargs...
Expand All @@ -61,7 +66,6 @@ function InternalAPI.init(
δus = Utils.unwrap_val(shared) ≤ 1 ? nothing : map(2:N) do i
@bb δu_ = similar(u)
end

normal_form = needs_square_A(alg.linsolve, u)
if normal_form
JᵀJ = transpose(J) * J
Expand All @@ -72,6 +76,11 @@ function InternalAPI.init(
A, b = J, Utils.safe_vec(fu)
end

if haskey(kwargs, :verbose)
linsolve_kwargs = merge(
(verbose = kwargs[:verbose].linear_verbosity,), linsolve_kwargs)
end

lincache = construct_linear_solver(
alg, alg.linsolve, A, b, Utils.safe_vec(u);
stats, abstol, reltol, linsolve_kwargs...
Expand All @@ -88,7 +97,6 @@ function InternalAPI.solve!(
)
δu = SciMLBase.get_du(cache, idx)
skip_solve && return DescentResult(; δu)

if preinverted_jacobian(cache) && !normal_form(cache)
@assert J!==nothing "`J` must be provided when `preinverted_jacobian = Val(true)`."
@bb δu = J × vec(fu)
Expand Down
6 changes: 6 additions & 0 deletions lib/NonlinearSolveBase/src/descent/steepest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ function InternalAPI.init(
@bb δu_ = similar(u)
end
if Utils.unwrap_val(pre_inverted)

if haskey(kwargs, :verbose)
linsolve_kwargs = merge(
(verbose = kwargs[:verbose].linear_verbosity,), linsolve_kwargs)
end

lincache = construct_linear_solver(
alg, alg.linsolve, transpose(J), Utils.safe_vec(fu), Utils.safe_vec(u);
stats, abstol, reltol, linsolve_kwargs...
Expand Down
2 changes: 1 addition & 1 deletion lib/NonlinearSolveBase/src/jacobian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function construct_concrete_adtype(f::NonlinearFunction, ad::AbstractADType)
else
if sparse_or_structured_prototype(f.jac_prototype)
if !(sparsity_detector isa NoSparsityDetector)
@warn lazy"`jac_prototype` is a sparse matrix but sparsity = $(f.sparsity) \
@warn "`jac_prototype` is a sparse matrix but sparsity = $(f.sparsity) \
has also been specified. Ignoring sparsity field and using \
`jac_prototype` sparsity."
end
Expand Down
Loading
Loading