File tree Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Expand file tree Collapse file tree 5 files changed +9
-5
lines changed 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
7
7
8
8
## [ Unreleased] ( https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.7...main )
9
9
10
+ - Support the new ` ADTypes.NoAutoDiff ` ([ #851 ] ( https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/851 ) )
11
+
10
12
## [ 0.7.7] ( https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.6...DifferentiationInterface-v0.7.7 )
11
13
12
14
- 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())
24
24
Check whether `backend` supports differentiation of in-place functions and return a `Bool`.
25
25
"""
26
26
check_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
23
23
"""
24
24
inplace_support (:: AbstractADType ) = InPlaceSupported ()
25
25
26
+ inplace_support (:: ADTypes.NoAutoDiff ) = throw (ADTypes. NoAutoDiffSelectedError ())
27
+
26
28
function inplace_support (backend:: SecondOrder )
27
29
if inplace_support (inner (backend)) isa InPlaceSupported &&
28
30
inplace_support (outer (backend)) isa InPlaceSupported
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ using Test
18
18
fb = AutoSimpleFiniteDiff ()
19
19
rb = AutoReverseFromPrimitive (AutoSimpleFiniteDiff ())
20
20
21
+ @testset " NoAutoDiff" begin
22
+ @test_throws NoAutoDiffSelectedError check_available (NoAutoDiff ())
23
+ @test_throws NoAutoDiffSelectedError inplace_support (NoAutoDiff ())
24
+ end
25
+
21
26
@testset " SecondOrder" begin
22
27
backend = SecondOrder (fb, rb)
23
28
@test check_available (backend)
Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ using Test
10
10
11
11
LOGGING = get (ENV , " CI" , " false" ) == " false"
12
12
13
- @test_throws NoAutoDiffSelectedError check_available (NoAutoDiff ())
14
- @test_throws NoAutoDiffSelectedError check_inplace (NoAutoDiff ())
15
-
16
13
zero_backends = [AutoZeroForward (), AutoZeroReverse ()]
17
14
18
15
for backend in zero_backends
You can’t perform that action at this time.
0 commit comments