File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased] ( https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.7...main )
99
10+ - Support the new ` ADTypes.NoAutoDiff ` ([ #851 ] ( https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/851 ) )
11+
1012## [ 0.7.7] ( https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.6...DifferentiationInterface-v0.7.7 )
1113
1214 - Improve support for empty inputs (still not guaranteed) ([ #835 ] ( https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/835 ) )
Original file line number Diff line number Diff line change @@ -24,5 +24,3 @@ check_available(::ADTypes.NoAutoDiff) = throw(ADTypes.NoAutoDiffSelectedError())
2424Check whether `backend` supports differentiation of in-place functions and return a `Bool`.
2525"""
2626check_inplace (backend:: AbstractADType ) = Bool (inplace_support (backend))
27-
28- check_inplace (:: ADTypes.NoAutoDiff ) = throw (ADTypes. NoAutoDiffSelectedError ())
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ Return [`InPlaceSupported`](@ref) or [`InPlaceNotSupported`](@ref) in a statical
2323"""
2424inplace_support (:: AbstractADType ) = InPlaceSupported ()
2525
26+ inplace_support (:: ADTypes.NoAutoDiff ) = throw (ADTypes. NoAutoDiffSelectedError ())
27+
2628function inplace_support (backend:: SecondOrder )
2729 if inplace_support (inner (backend)) isa InPlaceSupported &&
2830 inplace_support (outer (backend)) isa InPlaceSupported
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ using Test
1818fb = AutoSimpleFiniteDiff ()
1919rb = AutoReverseFromPrimitive (AutoSimpleFiniteDiff ())
2020
21+ @testset " NoAutoDiff" begin
22+ @test_throws NoAutoDiffSelectedError check_available (NoAutoDiff ())
23+ @test_throws NoAutoDiffSelectedError inplace_support (NoAutoDiff ())
24+ end
25+
2126@testset " SecondOrder" begin
2227 backend = SecondOrder (fb, rb)
2328 @test check_available (backend)
Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ using Test
1010
1111LOGGING = get (ENV , " CI" , " false" ) == " false"
1212
13- @test_throws NoAutoDiffSelectedError check_available (NoAutoDiff ())
14- @test_throws NoAutoDiffSelectedError check_inplace (NoAutoDiff ())
15-
1613zero_backends = [AutoZeroForward (), AutoZeroReverse ()]
1714
1815for backend in zero_backends
You can’t perform that action at this time.
0 commit comments