Skip to content

Commit

Permalink
Add DifferentiationInterface test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Jun 24, 2024
1 parent f9b63ad commit a44f987
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
DifferentiationInterfaceTest = "a82114a7-5aa3-49a8-9643-716bb13727a3"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
EnzymeTestUtils = "12d8515a-0907-448a-8884-5fe00fdf1c5a"
Enzyme_jll = "7cc45869-7501-5eee-bdea-0790c847d4ef"
Expand Down
6 changes: 6 additions & 0 deletions test/differentiationinterface.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using DifferentiationInterface
using DifferentiationInterfaceTest
using Enzyme: Enzyme

test_differentiation([AutoEnzyme(; mode=Enzyme.Forward), AutoEnzyme(; mode=Enzyme.Reverse)];
second_order=false, logging=false)
5 changes: 4 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ end
include("blas.jl")
end

@static if VERSION >= v"1.10"
include("differentiationinterface.jl")
end

f0(x) = 1.0 + x
function vrec(start, x)
if start > length(x)
Expand Down Expand Up @@ -3411,4 +3415,3 @@ end


end

0 comments on commit a44f987

Please sign in to comment.