@@ -64,7 +64,7 @@ function JacobianCache(prob, alg, f::F, fu_, u, p; stats, autodiff = nothing,
6464 if ! has_analytic_jac && needs_jac
6565 autodiff = construct_concrete_adtype (f, autodiff)
6666 using_sparsedifftools = autodiff isa StructuredMatrixAutodiff
67- # DI can't handle structured matrices
67+ # SparseMatrixColorings can't handle structured matrices
6868 if using_sparsedifftools
6969 di_extras = nothing
7070 uf = JacobianWrapper {iip} (f, p)
@@ -249,7 +249,7 @@ function construct_concrete_adtype(f::NonlinearFunction, ad::AbstractADType)
249249 return AutoSparse (
250250 ad;
251251 sparsity_detector,
252- coloring_algorithm = GreedyColoringAlgorithm ()
252+ coloring_algorithm = GreedyColoringAlgorithm (LargestFirst () )
253253 )
254254 else
255255 if ArrayInterface. isstructured (f. jac_prototype)
@@ -304,7 +304,7 @@ function select_fastest_structured_matrix_autodiff(
304304 JacPrototypeSparsityDetection (; jac_prototype = prototype)
305305 end
306306 end
307- return StructuredMatrixAutodiff (ad , sparsity_detection)
307+ return StructuredMatrixAutodiff (AutoSparse (ad) , sparsity_detection)
308308end
309309
310310function select_fastest_coloring_algorithm (
@@ -314,7 +314,7 @@ function select_fastest_coloring_algorithm(
314314 ADTypes. mode (ad) isa ADTypes. ReverseMode, :row , :column )}(
315315 prototype, f. colorvec)
316316 end
317- return GreedyColoringAlgorithm ()
317+ return GreedyColoringAlgorithm (LargestFirst () )
318318end
319319
320320function construct_concrete_adtype (f:: NonlinearFunction , ad:: AutoSparse )
0 commit comments