Skip to content

[WIP] Add TaylorDiff #635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
45 changes: 23 additions & 22 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
@@ -28,28 +28,29 @@ jobs:
fail-fast: false # TODO: toggle
matrix:
version:
- "1.10"
# - "1.10"
- "1"
group:
- Misc/Internals
- Misc/DifferentiateWith
- Misc/FromPrimitive
- Misc/SparsityDetector
- Misc/ZeroBackends
- Back/ChainRules
# - Misc/DifferentiateWith
# - Misc/FromPrimitive
# - Misc/SparsityDetector
# - Misc/ZeroBackends
# - Back/ChainRules
# - Back/Diffractor
- Back/Enzyme
- Back/FiniteDiff
- Back/FiniteDifferences
- Back/ForwardDiff
- Back/Mooncake
- Back/PolyesterForwardDiff
- Back/ReverseDiff
- Back/SymbolicBackends
- Back/Tracker
- Back/Zygote
- Down/Flux
- Down/Lux
# - Back/Enzyme
# - Back/FiniteDiff
# - Back/FiniteDifferences
# - Back/ForwardDiff
# - Back/Mooncake
# - Back/PolyesterForwardDiff
# - Back/ReverseDiff
# - Back/SymbolicBackends
- Back/TaylorDiff
# - Back/Tracker
# - Back/Zygote
# - Down/Flux
# - Down/Lux
skip_lts:
- ${{ github.event.pull_request.draft }}
exclude:
@@ -96,13 +97,13 @@ jobs:
fail-fast: true
matrix:
version:
- "1.10"
# - "1.10"
- "1"
group:
- Formalities
- Zero
- Standard
- Weird
# - Zero
# - Standard
# - Weird
skip_lts:
- ${{ github.event.pull_request.draft }}
# exclude:
File renamed without changes.
6 changes: 5 additions & 1 deletion DifferentiationInterface/Project.toml
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
TaylorDiff = "b36ab563-344f-407b-a36a-4f200bebf99c"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

@@ -40,6 +41,7 @@ DifferentiationInterfaceSparseArraysExt = "SparseArrays"
DifferentiationInterfaceSparseMatrixColoringsExt = "SparseMatrixColorings"
DifferentiationInterfaceStaticArraysExt = "StaticArrays"
DifferentiationInterfaceSymbolicsExt = "Symbolics"
DifferentiationInterfaceTaylorDiffExt = "TaylorDiff"
DifferentiationInterfaceTrackerExt = "Tracker"
DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"]

@@ -63,6 +65,7 @@ SparseConnectivityTracer = "0.5.0,0.6"
StaticArrays = "1.9.7"
SparseMatrixColorings = "0.4.9"
Symbolics = "5.27.1, 6"
TaylorDiff = "0.3"
Tracker = "0.2.33"
Zygote = "0.6.69"
julia = "1.10"
@@ -94,9 +97,10 @@ SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
TaylorDiff = "b36ab563-344f-407b-a36a-4f200bebf99c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["ADTypes", "Aqua", "ComponentArrays", "DataFrames", "ExplicitImports", "ForwardDiff", "JET", "JLArrays", "JuliaFormatter", "Pkg", "Random", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings", "StableRNGs", "StaticArrays", "Test", "Zygote"]
test = ["ADTypes", "Aqua", "ComponentArrays", "DataFrames", "ExplicitImports", "ForwardDiff", "JET", "JLArrays", "JuliaFormatter", "Pkg", "Random", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings", "StableRNGs", "StaticArrays", "TaylorDiff", "Test", "Zygote"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module DifferentiationInterfaceTaylorDiffExt

using ADTypes: AutoTaylorDiff
import DifferentiationInterface as DI
using TaylorDiff

DI.check_available(::AutoTaylorDiff) = true

Check warning on line 7 in DifferentiationInterface/ext/DifferentiationInterfaceTaylorDiffExt/DifferentiationInterfaceTaylorDiffExt.jl

Codecov / codecov/patch

DifferentiationInterface/ext/DifferentiationInterfaceTaylorDiffExt/DifferentiationInterfaceTaylorDiffExt.jl#L7

Added line #L7 was not covered by tests
end
2 changes: 2 additions & 0 deletions DifferentiationInterface/src/DifferentiationInterface.jl
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ using ADTypes:
AutoPolyesterForwardDiff,
AutoReverseDiff,
AutoSymbolics,
AutoTaylorDiff,
AutoTracker,
AutoZygote
using LinearAlgebra: dot
@@ -113,6 +114,7 @@ export AutoMooncake
export AutoPolyesterForwardDiff
export AutoReverseDiff
export AutoSymbolics
export AutoTaylorDiff
export AutoTracker
export AutoZygote

16 changes: 16 additions & 0 deletions DifferentiationInterface/test/Back/TaylorDiff/test.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Pkg
Pkg.add("TaylorDiff")

using DifferentiationInterface, DifferentiationInterfaceTest
import DifferentiationInterfaceTest as DIT
using TaylorDiff: TaylorDiff
using Test

LOGGING = get(ENV, "CI", "false") == "false"

backends = [AutoTaylorDiff(), AutoTaylorDiff(; order=2)]

for backend in backends
@test check_available(backend)
@test check_inplace(backend)
end
2 changes: 1 addition & 1 deletion DifferentiationInterface/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ else
Pkg.add("DifferentiationInterfaceTest")
end

GROUP = get(ENV, "JULIA_DI_TEST_GROUP", "All")
GROUP = get(ENV, "JULIA_DI_TEST_GROUP", "Back/TaylorDiff")

## Main tests