Skip to content

Commit e4bc9f8

Browse files
Move heavy AD backends (Enzyme/Mooncake) into a group env for FIRK and MIRK
BoundaryValueDiffEqFIRK and BoundaryValueDiffEqMIRK each list Enzyme and Mooncake in their old-style [extras]/[targets].test but not in [weakdeps]. Under the sublibrary Downgrade lane (DowngradeSublibraries.yml runs each lib's Core group at floor) these extra-only heavy backends are merged into [deps] as hard deps and force a large joint at-floor resolve of the whole graph. Move the different-AD-backend compatibility tests (the only files that use Enzyme/Mooncake) into a dedicated AD test group with its own test/AD/Project.toml, auto-activated by run_tests before the AD body runs (same mechanism the existing QA group uses). The heavy backends now resolve in the AD group env, so the main test environment (Core/EXPANDED/NESTED) no longer carries them and the Downgrade base resolve drops them. - FIRK: move test/expanded/ad_tests.jl -> test/AD/ad_tests.jl; add AD group + test_groups.toml entry; drop Enzyme/Mooncake from [extras]/[targets].test and their [compat] (extra-only, not weakdeps). - MIRK: move test/Core/ad_tests.jl -> test/AD/ad_tests.jl; same wiring and Project.toml trim. Downgrade base resolve verified (jdc-52 harness, Julia 1): BEFORE pulls full Enzyme+Mooncake into the base manifest; AFTER only lightweight EnzymeCore remains transitively. AD group env instantiates Enzyme/Mooncake/ForwardDiff by path against the developed sublibrary. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent 49a1718 commit e4bc9f8

10 files changed

Lines changed: 90 additions & 16 deletions

File tree

lib/BoundaryValueDiffEqFIRK/Project.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ BoundaryValueDiffEqCore = "2.2"
3737
ConcreteStructs = "0.2.3"
3838
DiffEqDevTools = "2.44, 3"
3939
DifferentiationInterface = "0.7.15"
40-
Enzyme = "0.13.33"
4140
FastAlmostBandedMatrices = "0.1.4"
4241
FastClosures = "0.3.2"
4342
ForwardDiff = "0.10.38, 1"
4443
LinearAlgebra = "1.10"
4544
LinearSolve = "2.36.2, 3"
46-
Mooncake = "0.4.146, 0.5"
4745
OrdinaryDiffEqRosenbrock = "1.15.1, 2"
4846
PreallocationTools = "1.2"
4947
PrecompileTools = "1.2"
@@ -63,9 +61,7 @@ julia = "1.10"
6361
[extras]
6462
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
6563
DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d"
66-
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
6764
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
68-
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
6965
OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce"
7066
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
7167
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
@@ -74,4 +70,4 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
7470
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
7571

7672
[targets]
77-
test = ["DiffEqDevTools", "Enzyme", "LinearSolve", "Mooncake", "OrdinaryDiffEqRosenbrock", "Random", "RecursiveArrayTools", "SciMLTesting", "StaticArrays", "Test", "SafeTestsets"]
73+
test = ["DiffEqDevTools", "LinearSolve", "OrdinaryDiffEqRosenbrock", "Random", "RecursiveArrayTools", "SciMLTesting", "StaticArrays", "Test", "SafeTestsets"]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[deps]
2+
BoundaryValueDiffEqCore = "56b672f2-a5fe-4263-ab2d-da677488eb3a"
3+
BoundaryValueDiffEqFIRK = "85d9eb09-370e-4000-bb32-543851f73618"
4+
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
5+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
6+
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
7+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
8+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
9+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
10+
11+
[sources]
12+
BoundaryValueDiffEqCore = {path = "../../../BoundaryValueDiffEqCore"}
13+
BoundaryValueDiffEqFIRK = {path = "../.."}
14+
15+
[compat]
16+
BoundaryValueDiffEqCore = "2"
17+
BoundaryValueDiffEqFIRK = "1"
18+
Enzyme = "0.13.33"
19+
ForwardDiff = "0.10.38, 1"
20+
Mooncake = "0.4.146, 0.5"
21+
SafeTestsets = "0.1.0"
22+
SciMLTesting = "1.7"
23+
Test = "1.10"
24+
julia = "1.10"
File renamed without changes.

lib/BoundaryValueDiffEqFIRK/test/runtests.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ run_tests(;
1515
"EXPANDED" => function ()
1616
@time @safetestset "FIRK Expanded Basic Tests" include("expanded/firk_basic_tests.jl")
1717
@time @safetestset "FIRK Expanded NLLS Tests" include("expanded/nlls_tests.jl")
18-
@time @safetestset "FIRK Expanded AD Tests" include("expanded/ad_tests.jl")
1918
@time @safetestset "FIRK Expanded Ensemble Tests" include("expanded/ensemble_tests.jl")
2019
@time @safetestset "FIRK Expanded Singular BVP Tests" include("expanded/singular_bvp_tests.jl")
2120
return @time @safetestset "FIRK Expanded VectorOfVector Initials Tests" include("expanded/vectorofvector_initials_tests.jl")
@@ -26,6 +25,16 @@ run_tests(;
2625
@time @safetestset "FIRK Nested Ensemble Tests" include("nested/ensemble_tests.jl")
2726
return @time @safetestset "FIRK Nested VectorOfVector Initials Tests" include("nested/vectorofvector_initials_tests.jl")
2827
end,
28+
# AD: the different-AD-backend compatibility tests. Enzyme and Mooncake are
29+
# heavy optional backends kept out of the main test environment (they force a
30+
# large joint at-floor resolve on the Downgrade lane); they live in this
31+
# group's own test/AD/Project.toml, auto-activated before the body runs.
32+
"AD" => (;
33+
env = joinpath(@__DIR__, "AD"),
34+
body = function ()
35+
return @time @safetestset "FIRK Expanded AD Tests" include("AD/ad_tests.jl")
36+
end,
37+
),
2938
),
3039
qa = (;
3140
env = joinpath(@__DIR__, "qa"),
@@ -35,7 +44,7 @@ run_tests(;
3544
return @time @safetestset "Quality Assurance" include("qa/qa.jl")
3645
end,
3746
),
38-
# "All" runs EXPANDED + NESTED + QA. "Core" is intentionally excluded: its basic
39-
# tests are already covered inside EXPANDED and NESTED.
40-
all = ["EXPANDED", "NESTED", "QA"],
47+
# "All" runs EXPANDED + NESTED + AD + QA. "Core" is intentionally excluded: its
48+
# basic tests are already covered inside EXPANDED and NESTED.
49+
all = ["EXPANDED", "NESTED", "AD", "QA"],
4150
)

lib/BoundaryValueDiffEqFIRK/test/test_groups.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,13 @@ timeout = 240
1818
versions = ["lts", "1", "pre"]
1919
timeout = 240
2020

21+
# AD: different-AD-backend (Enzyme/Mooncake) compatibility tests. The heavy
22+
# optional backends live in test/AD/Project.toml (kept out of the main test env so
23+
# the Downgrade lane does not force a joint at-floor resolve of them). Matches the
24+
# EXPANDED/NESTED version matrix.
25+
[AD]
26+
versions = ["lts", "1", "pre"]
27+
timeout = 240
28+
2129
[QA]
2230
versions = ["lts", "1"]

lib/BoundaryValueDiffEqMIRK/Project.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ BoundaryValueDiffEqCore = "2.2"
3535
ConcreteStructs = "0.2.3"
3636
DiffEqDevTools = "2.44, 3"
3737
DifferentiationInterface = "0.7.15"
38-
Enzyme = "0.13.33"
3938
FastAlmostBandedMatrices = "0.1.4"
4039
FastClosures = "0.3.2"
4140
ForwardDiff = "0.10.38, 1"
4241
LinearAlgebra = "1.10"
4342
LinearSolve = "2.36.2, 3"
44-
Mooncake = "0.4, 0.5"
4543
OptimizationIpopt = "1"
4644
OrdinaryDiffEqRosenbrock = "1, 2"
4745
PreallocationTools = "1.2"
@@ -62,9 +60,7 @@ julia = "1.10"
6260

6361
[extras]
6462
DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d"
65-
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
6663
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
67-
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
6864
OptimizationIpopt = "43fad042-7963-4b32-ab19-e2a4f9a67124"
6965
OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce"
7066
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
@@ -75,4 +71,4 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
7571
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
7672

7773
[targets]
78-
test = ["DiffEqDevTools", "Enzyme", "LinearSolve", "Mooncake", "OptimizationIpopt", "OrdinaryDiffEqRosenbrock", "Random", "RecursiveArrayTools", "SafeTestsets", "SciMLTesting", "StaticArrays", "Test"]
74+
test = ["DiffEqDevTools", "LinearSolve", "OptimizationIpopt", "OrdinaryDiffEqRosenbrock", "Random", "RecursiveArrayTools", "SafeTestsets", "SciMLTesting", "StaticArrays", "Test"]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[deps]
2+
BoundaryValueDiffEqCore = "56b672f2-a5fe-4263-ab2d-da677488eb3a"
3+
BoundaryValueDiffEqMIRK = "1a22d4ce-7765-49ea-b6f2-13c8438986a6"
4+
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
5+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
6+
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
7+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
8+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
9+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
10+
11+
[sources]
12+
BoundaryValueDiffEqCore = {path = "../../../BoundaryValueDiffEqCore"}
13+
BoundaryValueDiffEqMIRK = {path = "../.."}
14+
15+
[compat]
16+
BoundaryValueDiffEqCore = "2"
17+
BoundaryValueDiffEqMIRK = "1"
18+
Enzyme = "0.13.33"
19+
ForwardDiff = "0.10.38, 1"
20+
Mooncake = "0.4, 0.5"
21+
SafeTestsets = "0.1.0"
22+
SciMLTesting = "1.7"
23+
Test = "1.10"
24+
julia = "1.10"
File renamed without changes.

lib/BoundaryValueDiffEqMIRK/test/runtests.jl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@ run_tests(;
77
@time @safetestset "MIRK Basic Tests" include("Core/mirk_basic_tests.jl")
88
@time @safetestset "MIRK NLLS Tests" include("Core/nlls_tests.jl")
99
@time @safetestset "MIRK Ensemble Tests" include("Core/ensemble_tests.jl")
10-
@time @safetestset "MIRK AD Tests" include("Core/ad_tests.jl")
1110
@time @safetestset "MIRK Singular BVP Tests" include("Core/singular_bvp_tests.jl")
1211
@time @safetestset "MIRK VectorOfVector Initials Tests" include("Core/vectorofvector_initials_tests.jl")
1312
return @time @safetestset "MIRK Dynamic Optimization Tests" include("Core/dynamic_optimization_tests.jl")
1413
end,
14+
groups = Dict(
15+
# AD: the different-AD-backend compatibility tests. Enzyme and Mooncake are
16+
# heavy optional backends kept out of the main test environment (they force a
17+
# large joint at-floor resolve on the Downgrade lane); they live in this
18+
# group's own test/AD/Project.toml, auto-activated before the body runs.
19+
"AD" => (;
20+
env = joinpath(@__DIR__, "AD"),
21+
body = function ()
22+
return @time @safetestset "MIRK AD Tests" include("AD/ad_tests.jl")
23+
end,
24+
),
25+
),
1526
qa = (;
1627
env = joinpath(@__DIR__, "qa"),
1728
body = function ()
@@ -20,5 +31,5 @@ run_tests(;
2031
return @time @safetestset "Quality Assurance" include("qa/qa.jl")
2132
end,
2233
),
23-
all = ["Core", "QA"],
34+
all = ["Core", "AD", "QA"],
2435
)

lib/BoundaryValueDiffEqMIRK/test/test_groups.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,11 @@
99
[Core]
1010
versions = ["lts", "1", "pre"]
1111

12+
# AD: different-AD-backend (Enzyme/Mooncake) compatibility tests. The heavy
13+
# optional backends live in test/AD/Project.toml (kept out of the main test env so
14+
# the Downgrade lane does not force a joint at-floor resolve of them).
15+
[AD]
16+
versions = ["lts", "1", "pre"]
17+
1218
[QA]
1319
versions = ["lts", "1"]

0 commit comments

Comments
 (0)