Skip to content

Commit 6aa277c

Browse files
authored
enable Mooncake on 1.12 (#424)
* Enable Enzyme tests that are fixed now * enable Mooncake
1 parent 79baf46 commit 6aa277c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1717
LogDensityProblems = "6fdf6af0-433a-55f7-b3ed-c6c6e0b8df7c"
1818
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
1919
MCMCDiagnosticTools = "be115224-59cd-429b-ad48-344e309966f0"
20+
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
2021
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2122
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
2223
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"

test/runtests.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ using FiniteDifferences
99
using ForwardDiff
1010
using Functors
1111
using LogExpFunctions
12+
using Mooncake
1213
using ReverseDiff
1314
using Pkg
1415

@@ -31,23 +32,21 @@ using InverseFunctions: InverseFunctions
3132
using LazyArrays: LazyArrays
3233

3334
const GROUP = get(ENV, "GROUP", "All")
34-
# Mooncake and Enzyme don't work on 1.12 yet
35-
const TEST_ENZYME_AND_MOONCAKE = VERSION < v"1.12.0"
35+
# Enzyme doesn't work on 1.12 yet
36+
const TEST_ENZYME = VERSION < v"1.12.0"
3637

3738
TEST_ADTYPES = [
3839
("ForwardDiff", AutoForwardDiff()),
3940
("ReverseDiff", AutoReverseDiff(; compile=false)),
4041
("ReverseDiffCompiled", AutoReverseDiff(; compile=true)),
42+
("Mooncake", AutoMooncake()),
4143
]
42-
if TEST_ENZYME_AND_MOONCAKE
44+
if TEST_ENZYME
4345
Pkg.add("Enzyme")
4446
Pkg.add("EnzymeTestUtils")
45-
Pkg.add("Mooncake")
4647
using Enzyme: Enzyme, set_runtime_activity, Forward, Reverse, Const
47-
using Mooncake
4848
TEST_ADTYPES = [
4949
TEST_ADTYPES...,
50-
("Mooncake", AutoMooncake()),
5150
(
5251
"EnzymeForward",
5352
AutoEnzyme(; mode=set_runtime_activity(Forward), function_annotation=Const),
@@ -83,9 +82,9 @@ end
8382
if GROUP == "All" || GROUP == "AD"
8483
# These tests specifically check the implementation of AD backend rules.
8584
include("ad/chainrules.jl")
86-
if TEST_ENZYME_AND_MOONCAKE
85+
include("ad/mooncake.jl")
86+
if TEST_ENZYME
8787
include("ad/enzyme.jl")
88-
include("ad/mooncake.jl")
8988
end
9089

9190
# These tests check that AD can differentiate through Bijectors

0 commit comments

Comments
 (0)