Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions DifferentiationInterface/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.7...main)

- Support the new `ADTypes.NoAutoDiff` ([#851](https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/851))

## [0.7.7](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.6...DifferentiationInterface-v0.7.7)

- Improve support for empty inputs (still not guaranteed) ([#835](https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/835))
Expand Down
2 changes: 1 addition & 1 deletion DifferentiationInterface/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ DifferentiationInterfaceTrackerExt = "Tracker"
DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"]

[compat]
ADTypes = "1.17.0"
ADTypes = "1.18.0"
ChainRulesCore = "1.23.0"
DiffResults = "1.1.0"
Diffractor = "=0.2.6"
Expand Down
2 changes: 2 additions & 0 deletions DifferentiationInterface/src/utils/check.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function check_available(backend::MixedMode)
check_available(reverse_backend(backend))
end

check_available(::ADTypes.NoAutoDiff) = throw(ADTypes.NoAutoDiffSelectedError())

"""
check_inplace(backend)

Expand Down
2 changes: 2 additions & 0 deletions DifferentiationInterface/src/utils/traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Return [`InPlaceSupported`](@ref) or [`InPlaceNotSupported`](@ref) in a statical
"""
inplace_support(::AbstractADType) = InPlaceSupported()

inplace_support(::ADTypes.NoAutoDiff) = throw(ADTypes.NoAutoDiffSelectedError())

function inplace_support(backend::SecondOrder)
if inplace_support(inner(backend)) isa InPlaceSupported &&
inplace_support(outer(backend)) isa InPlaceSupported
Expand Down
5 changes: 5 additions & 0 deletions DifferentiationInterface/test/Core/Internals/backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ using Test
fb = AutoSimpleFiniteDiff()
rb = AutoReverseFromPrimitive(AutoSimpleFiniteDiff())

@testset "NoAutoDiff" begin
@test_throws NoAutoDiffSelectedError check_available(NoAutoDiff())
@test_throws NoAutoDiffSelectedError inplace_support(NoAutoDiff())
end

@testset "SecondOrder" begin
backend = SecondOrder(fb, rb)
@test check_available(backend)
Expand Down
Loading