File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name = " ADTypes"
22uuid = " 47edcb42-4c32-4615-8424-f2b9edc5f35b"
33authors = [" Vaibhav Dixit <vaibhavyashdixit@gmail.com>, Guillaume Dalle and contributors" ]
4- version = " 1.13 .0"
4+ version = " 1.14 .0"
55
66[deps ]
77ChainRulesCore = " d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Original file line number Diff line number Diff line change @@ -225,14 +225,16 @@ end
225225
226226"""
227227 dense_ad(ad::AutoSparse)::AbstractADType
228+ dense_ad(ad::AbstractADType)::AbstractADType
228229
229- Return the underlying AD package for a sparse AD choice.
230+ Return the underlying AD package for a sparse AD choice, act as the identity on a dense AD choice .
230231
231232# See also
232233
233234 - [`AutoSparse`](@ref)
234235"""
235236dense_ad (ad:: AutoSparse ) = ad. dense_ad
237+ dense_ad (ad:: AbstractADType ) = ad
236238
237239mode (sparse_ad:: AutoSparse ) = mode (dense_ad (sparse_ad))
238240
Original file line number Diff line number Diff line change 1111 elseif mode (ad) isa SymbolicMode
1212 @test mode (sparse_ad) isa SymbolicMode
1313 end
14+ @test dense_ad (ad) == ad
1415 @test dense_ad (sparse_ad) == ad
1516 @test sparsity_detector (sparse_ad) == NoSparsityDetector ()
1617 @test coloring_algorithm (sparse_ad) == NoColoringAlgorithm ()
You can’t perform that action at this time.
0 commit comments