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
4 changes: 2 additions & 2 deletions DifferentiationInterface/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DifferentiationInterface"
uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
authors = ["Guillaume Dalle", "Adrian Hill"]
version = "0.6.33"
version = "0.6.34"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down Expand Up @@ -55,7 +55,7 @@ Diffractor = "=0.2.6"
Enzyme = "0.13.17"
EnzymeCore = "0.8.8"
ExplicitImports = "1.10.1"
FastDifferentiation = "0.4.1"
FastDifferentiation = "0.4.3"
FiniteDiff = "2.23.1"
FiniteDifferences = "0.12.31"
ForwardDiff = "0.10.36"
Expand Down
34 changes: 17 additions & 17 deletions DifferentiationInterface/docs/src/explanation/backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@ In practice, many AD backends have custom implementations for high-level operato

Moreover, each context type is supported by a specific subset of backends:

| | [`Constant`](@ref) |
| -------------------------- | ------------------ |
| `AutoChainRules` | ✅ |
| `AutoDiffractor` | ❌ |
| `AutoEnzyme` (forward) | ✅ |
| `AutoEnzyme` (reverse) | ✅ |
| `AutoFastDifferentiation` | |
| `AutoFiniteDiff` | ✅ |
| `AutoFiniteDifferences` | ✅ |
| `AutoForwardDiff` | ✅ |
| `AutoGTPSA` | ✅ |
| `AutoMooncake` | ✅ |
| `AutoPolyesterForwardDiff` | ✅ |
| `AutoReverseDiff` | ✅ |
| `AutoSymbolics` | |
| `AutoTracker` | ✅ |
| `AutoZygote` | ✅ |
| | [`Constant`](@ref) | [`Cache`](@ref) |
| -------------------------- | ------------------ | --------------- |
| `AutoChainRules` | ✅ | ❌ |
| `AutoDiffractor` | ❌ | ❌ |
| `AutoEnzyme` (forward) | ✅ | ✅ |
| `AutoEnzyme` (reverse) | ✅ | ✅ |
| `AutoFastDifferentiation` | | ✅ |
| `AutoFiniteDiff` | ✅ | ✅ |
| `AutoFiniteDifferences` | ✅ | ✅ |
| `AutoForwardDiff` | ✅ | ✅ |
| `AutoGTPSA` | ✅ | ❌ |
| `AutoMooncake` | ✅ | ❌ |
| `AutoPolyesterForwardDiff` | ✅ | ✅ |
| `AutoReverseDiff` | ✅ | ❌ |
| `AutoSymbolics` | | ❌ |
| `AutoTracker` | ✅ | ❌ |
| `AutoZygote` | ✅ | ❌ |

## Second order

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,23 @@

DI.check_available(::AutoFastDifferentiation) = true

monovec(x::Number) = [x]

myvec(x::Number) = monovec(x)
myvec(x::Number) = [x]

Check warning on line 21 in DifferentiationInterface/ext/DifferentiationInterfaceFastDifferentiationExt/DifferentiationInterfaceFastDifferentiationExt.jl

View check run for this annotation

Codecov / codecov/patch

DifferentiationInterface/ext/DifferentiationInterfaceFastDifferentiationExt/DifferentiationInterfaceFastDifferentiationExt.jl#L21

Added line #L21 was not covered by tests
myvec(x::AbstractArray) = vec(x)

variablize(::Number, name::Symbol) = only(make_variables(name))
variablize(x::AbstractArray, name::Symbol) = make_variables(name, size(x)...)

Check warning on line 25 in DifferentiationInterface/ext/DifferentiationInterfaceFastDifferentiationExt/DifferentiationInterfaceFastDifferentiationExt.jl

View check run for this annotation

Codecov / codecov/patch

DifferentiationInterface/ext/DifferentiationInterfaceFastDifferentiationExt/DifferentiationInterfaceFastDifferentiationExt.jl#L24-L25

Added lines #L24 - L25 were not covered by tests

function variablize(contexts::NTuple{C,DI.Context}) where {C}
map(enumerate(contexts)) do (k, c)
variablize(DI.unwrap(c), Symbol("context$k"))

Check warning on line 29 in DifferentiationInterface/ext/DifferentiationInterfaceFastDifferentiationExt/DifferentiationInterfaceFastDifferentiationExt.jl

View check run for this annotation

Codecov / codecov/patch

DifferentiationInterface/ext/DifferentiationInterfaceFastDifferentiationExt/DifferentiationInterfaceFastDifferentiationExt.jl#L27-L29

Added lines #L27 - L29 were not covered by tests
end
end

dense_ad(backend::AutoFastDifferentiation) = backend
dense_ad(backend::AutoSparse{<:AutoFastDifferentiation}) = ADTypes.dense_ad(backend)

myvec_unwrap(x) = myvec(DI.unwrap(x))

Check warning on line 36 in DifferentiationInterface/ext/DifferentiationInterfaceFastDifferentiationExt/DifferentiationInterfaceFastDifferentiationExt.jl

View check run for this annotation

Codecov / codecov/patch

DifferentiationInterface/ext/DifferentiationInterfaceFastDifferentiationExt/DifferentiationInterfaceFastDifferentiationExt.jl#L36

Added line #L36 was not covered by tests

include("onearg.jl")
include("twoarg.jl")

Expand Down
Loading
Loading