Skip to content

Commit b3c5c8a

Browse files
Move heavy AD backends out of root [extras] into group envs (#62)
FastPower's optional AD backends (Enzyme, ForwardDiff, Mooncake, ReverseDiff, Tracker) plus their test-only support deps (EnzymeTestUtils, StableRNGs) were declared in the root Project.toml's [extras]/[targets].test. Because the folder-model Core group and the Enzyme group folder both run in the main test env, this pulled the full joint AD graph into every root/Core resolve — including the Downgrade lane, which had to floor-resolve all five backends together against the base package. Move each backend into the group env whose files actually `using` it: * test/AD/Project.toml (new) — ForwardDiff/ReverseDiff/Tracker/Mooncake for the relocated test/AD/other_ad_engines_tests.jl (was a loose top-level Core file, now its own AD group declared in test_groups.toml). * test/Enzyme/Project.toml (new) — Enzyme/EnzymeTestUtils/StableRNGs for the existing test/Enzyme/ group folder (which previously had no Project.toml and so resolved against the root env). Root [extras]/[targets].test keeps only SafeTestsets/SciMLTesting/Test (the harness + Core deps). Weakdep [compat] entries (Enzyme, ForwardDiff, Mooncake, ReverseDiff, Tracker) stay since they still gate package extensions; the extra-only compats (EnzymeTestUtils, StableRNGs) are removed to avoid dangling. Under the folder-discovery harness each group folder auto-activates its own Project.toml, so no runtests.jl wiring changes are needed. The root/Core Downgrade lane no longer floor-resolves any AD backend; cross-backend AD tests are unchanged (AD 4/4, Enzyme 88/88, Core 1205/1205 all pass locally). Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
1 parent b6bd454 commit b3c5c8a

5 files changed

Lines changed: 48 additions & 10 deletions

File tree

Project.toml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,21 @@ FastPowerTrackerExt = "Tracker"
2525

2626
[compat]
2727
Enzyme = "0.13.89"
28-
EnzymeTestUtils = "0.2"
2928
ForwardDiff = "0.10, 1"
3029
Measurements = "2.5"
3130
MonteCarloMeasurements = "1"
3231
Mooncake = "0.4, 0.5"
3332
ReverseDiff = "1.14"
3433
SafeTestsets = "0.1, 1"
3534
SciMLTesting = "1"
36-
StableRNGs = "1"
3735
Test = "1"
3836
Tracker = "0.2"
3937
julia = "1.10"
4038

4139
[extras]
42-
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
43-
EnzymeTestUtils = "12d8515a-0907-448a-8884-5fe00fdf1c5a"
44-
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
45-
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
46-
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
4740
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
4841
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
49-
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
5042
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
51-
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
5243

5344
[targets]
54-
test = ["Enzyme", "EnzymeTestUtils", "ForwardDiff", "Mooncake", "ReverseDiff", "SafeTestsets", "SciMLTesting", "StableRNGs", "Test", "Tracker"]
45+
test = ["SafeTestsets", "SciMLTesting", "Test"]

test/AD/Project.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[deps]
2+
FastPower = "a4df4552-cc26-4903-aec0-212e50a0e84b"
3+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
4+
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
5+
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
6+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
7+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
8+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
9+
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
10+
11+
[sources]
12+
FastPower = {path = "../.."}
13+
14+
[compat]
15+
FastPower = "1"
16+
ForwardDiff = "0.10, 1"
17+
Mooncake = "0.4, 0.5"
18+
ReverseDiff = "1.14"
19+
SafeTestsets = "0.1, 1"
20+
SciMLTesting = "1"
21+
Test = "1"
22+
Tracker = "0.2"
23+
julia = "1.10"

test/Enzyme/Project.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[deps]
2+
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
3+
EnzymeTestUtils = "12d8515a-0907-448a-8884-5fe00fdf1c5a"
4+
FastPower = "a4df4552-cc26-4903-aec0-212e50a0e84b"
5+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
6+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
7+
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
8+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
9+
10+
[sources]
11+
FastPower = {path = "../.."}
12+
13+
[compat]
14+
Enzyme = "0.13.89"
15+
EnzymeTestUtils = "0.2"
16+
FastPower = "1"
17+
SafeTestsets = "0.1, 1"
18+
SciMLTesting = "1"
19+
StableRNGs = "1"
20+
Test = "1"
21+
julia = "1.10"

test/test_groups.toml

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

4+
[AD]
5+
versions = ["lts", "1"]
6+
47
[Enzyme]
58
versions = ["lts", "1"]
69

0 commit comments

Comments
 (0)