From a6276fa8ce487a7b6246238bc30e34615adc3f65 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 3 Jul 2026 16:46:34 -0400 Subject: [PATCH] Move heavy AD backends out of root [extras] into group envs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Chris Rackauckas --- Project.toml | 11 +---------- test/AD/Project.toml | 23 +++++++++++++++++++++++ test/{ => AD}/other_ad_engines_tests.jl | 0 test/Enzyme/Project.toml | 21 +++++++++++++++++++++ test/test_groups.toml | 3 +++ 5 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 test/AD/Project.toml rename test/{ => AD}/other_ad_engines_tests.jl (100%) create mode 100644 test/Enzyme/Project.toml diff --git a/Project.toml b/Project.toml index 152bf6e..e6cd323 100644 --- a/Project.toml +++ b/Project.toml @@ -25,7 +25,6 @@ FastPowerTrackerExt = "Tracker" [compat] Enzyme = "0.13.89" -EnzymeTestUtils = "0.2" ForwardDiff = "0.10, 1" Measurements = "2.5" MonteCarloMeasurements = "1" @@ -33,22 +32,14 @@ Mooncake = "0.4, 0.5" ReverseDiff = "1.14" SafeTestsets = "0.1, 1" SciMLTesting = "1" -StableRNGs = "1" Test = "1" Tracker = "0.2" julia = "1.10" [extras] -Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" -EnzymeTestUtils = "12d8515a-0907-448a-8884-5fe00fdf1c5a" -ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" -Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" -ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" -StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [targets] -test = ["Enzyme", "EnzymeTestUtils", "ForwardDiff", "Mooncake", "ReverseDiff", "SafeTestsets", "SciMLTesting", "StableRNGs", "Test", "Tracker"] +test = ["SafeTestsets", "SciMLTesting", "Test"] diff --git a/test/AD/Project.toml b/test/AD/Project.toml new file mode 100644 index 0000000..a215c1e --- /dev/null +++ b/test/AD/Project.toml @@ -0,0 +1,23 @@ +[deps] +FastPower = "a4df4552-cc26-4903-aec0-212e50a0e84b" +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" +Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" +ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[sources] +FastPower = {path = "../.."} + +[compat] +FastPower = "1" +ForwardDiff = "0.10, 1" +Mooncake = "0.4, 0.5" +ReverseDiff = "1.14" +SafeTestsets = "0.1, 1" +SciMLTesting = "1" +Test = "1" +Tracker = "0.2" +julia = "1.10" diff --git a/test/other_ad_engines_tests.jl b/test/AD/other_ad_engines_tests.jl similarity index 100% rename from test/other_ad_engines_tests.jl rename to test/AD/other_ad_engines_tests.jl diff --git a/test/Enzyme/Project.toml b/test/Enzyme/Project.toml new file mode 100644 index 0000000..289d050 --- /dev/null +++ b/test/Enzyme/Project.toml @@ -0,0 +1,21 @@ +[deps] +Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" +EnzymeTestUtils = "12d8515a-0907-448a-8884-5fe00fdf1c5a" +FastPower = "a4df4552-cc26-4903-aec0-212e50a0e84b" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" +StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +FastPower = {path = "../.."} + +[compat] +Enzyme = "0.13.89" +EnzymeTestUtils = "0.2" +FastPower = "1" +SafeTestsets = "0.1, 1" +SciMLTesting = "1" +StableRNGs = "1" +Test = "1" +julia = "1.10" diff --git a/test/test_groups.toml b/test/test_groups.toml index ef028de..2185e4e 100644 --- a/test/test_groups.toml +++ b/test/test_groups.toml @@ -1,6 +1,9 @@ [Core] versions = ["lts", "1", "pre"] +[AD] +versions = ["lts", "1"] + [Enzyme] versions = ["lts", "1"]