From 462be07e3f5690cf42451defe4338c194b34b2c8 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 20 Mar 2026 01:12:03 +0100 Subject: [PATCH] Add Mooncake to tested AD backends --- test/Project.toml | 2 ++ test/runtests.jl | 3 ++- test/test_utils.jl | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/Project.toml b/test/Project.toml index 09c2ff006..8285c20ff 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -13,6 +13,7 @@ ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Kronecker = "2c470bb0-bcc8-11e8-3dad-c9649493f05e" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" @@ -39,4 +40,5 @@ ReverseDiff = "1.2" SpecialFunctions = "0.10, 1, 2" StaticArrays = "1" Statistics = "1" +Mooncake = "0.5" Zygote = "0.6.38" diff --git a/test/runtests.jl b/test/runtests.jl index 842705a21..a404e99ef 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -18,7 +18,8 @@ using ForwardDiff: ForwardDiff using ReverseDiff: ReverseDiff using FiniteDifferences: FiniteDifferences using Compat: only -using ADTypes: AutoForwardDiff, AutoReverseDiff, AutoZygote, AutoFiniteDifferences +using Mooncake: Mooncake +using ADTypes: AutoForwardDiff, AutoReverseDiff, AutoZygote, AutoFiniteDifferences, AutoMooncake, AutoEnzyme using DifferentiationInterface: DifferentiationInterface as DI using DifferentiationInterfaceTest: Scenario, test_differentiation diff --git a/test/test_utils.jl b/test/test_utils.jl index eade8ece0..e3a65301e 100644 --- a/test/test_utils.jl +++ b/test/test_utils.jl @@ -25,7 +25,7 @@ testdiagfunction(k::MOKernel, A, B) = sum(kernelmatrix_diag(k, A, B)) const FD_BACKEND = AutoFiniteDifferences(; fdm=FDM) const _DEFAULT_BACKENDS = let - backends = [AutoForwardDiff(), AutoReverseDiff()] + backends = [AutoForwardDiff(), AutoReverseDiff(), AutoMooncake()] _TEST_ZYGOTE && pushfirst!(backends, AutoZygote()) backends end @@ -34,6 +34,7 @@ const _BACKEND_MAP = Dict{Symbol,Any}( :ForwardDiff => AutoForwardDiff(), :ReverseDiff => AutoReverseDiff(), :Zygote => AutoZygote(), + :Mooncake => AutoMooncake(), :FiniteDiff => FD_BACKEND, )