Skip to content

Commit 003cbd3

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Split AD tests into a dedicated off-downgrade group (Mooncake 0.5 needs >= 1.10.8) (#617)
* Run downgrade CI on Julia 1.11 (Mooncake 0.5 needs >= 1.10.8) The Downgrade (Core) job fails on master with `ERROR: LoadError: Unsatisfiable`. The downgrade resolver runs `--min=@deps` and minimizes the Julia version to the floor implied by the workflow's Julia channel. With the default `lts` channel that floor is 1.10.0, but every Mooncake 0.5.x release (used by RecursiveArrayToolsMooncakeExt) declares `julia = "1.10.8 - 1.10, 1.11.6 - 1"`, so no Mooncake version is installable at 1.10.0 and Mooncake gets no candidate version. Reproduced locally with the actual julia-actions/julia-downgrade-compat downgrade.jl driver against a checkout of this repo: julia_version=1.10 -> ERROR: LoadError: Unsatisfiable julia_version=1.11 -> "Successfully resolved minimal versions" Pin the downgrade job to Julia 1.11 (the same approach OrdinaryDiffEq.jl uses), where 1.10.8+ is satisfied and every declared floor is jointly installable. Core support for Julia 1.10 is unchanged and is still exercised by the normal lts test legs; this only affects which Julia the downgrade resolver minimizes against. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Fix typo: tupe -> type in named_array_partition comment Fixes the Spell Check with Typos CI failure flagging `tupe` in src/named_array_partition.jl. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Split AD tests into a dedicated off-downgrade group Move the Mooncake/Zygote/ForwardDiff/ReverseDiff test files out of the root Core group and into a dedicated `AD` group with its own sub-environment (test/AD/Project.toml, [sources] RecursiveArrayTools = path), modeled on the NoPre group. The AD group is marked in_all = false and is not run in the Downgrade lane (which runs only Core), so its deps are never fed to the downgrade resolver. This removes Mooncake (and the other AD backends) from the root [targets].test set. The downgrade workflow builds/tests with project: "@." (the repo root) and minimizes every direct dep plus the Julia version to the 1.10.0 LTS floor; Mooncake 0.5 requires Julia >= 1.10.8, so at the 1.10.0 floor it was Unsatisfiable. With Mooncake out of the root test target the resolver no longer sees it, fixing the wall at the source instead of pinning the downgrade Julia version. This reverts the Downgrade.yml julia-version: "1.11" approach from this branch in favor of the AD split. Mooncake/Zygote/ForwardDiff/ReverseDiff remain as [weakdeps]+[compat] for the AD extensions; the AD tests still run (in their own group on a normal Julia). The tupe->type spellcheck fix is kept. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 37288fd commit 003cbd3

7 files changed

Lines changed: 42 additions & 8 deletions

File tree

Project.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@ julia = "1.10"
8585

8686
[extras]
8787
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
88-
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
8988
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
9089
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
91-
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
9290
MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
9391
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
9492
Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588"
@@ -101,9 +99,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
10199
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
102100
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
103101
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
104-
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
105102
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
106-
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
107103

108104
[targets]
109-
test = ["FastBroadcast", "ForwardDiff", "KernelAbstractions", "Measurements", "Mooncake", "Pkg", "Polyester", "Random", "RecursiveArrayToolsShorthandConstructors", "ReverseDiff", "SafeTestsets", "SciMLTesting", "SparseArrays", "StaticArrays", "Statistics", "StructArrays", "Tables", "Test", "Unitful", "Zygote"]
105+
test = ["FastBroadcast", "KernelAbstractions", "Measurements", "Pkg", "Polyester", "Random", "RecursiveArrayToolsShorthandConstructors", "SafeTestsets", "SciMLTesting", "SparseArrays", "StaticArrays", "Statistics", "StructArrays", "Tables", "Test", "Unitful"]

src/named_array_partition.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function Base.similar(
146146
return NamedArrayPartition(similar(ArrayPartition(x)), getfield(x, :names_to_indices))
147147
end
148148

149-
# when broadcasting with ArrayPartition + another array type, the output is the other array tupe
149+
# when broadcasting with ArrayPartition + another array type, the output is the other array type
150150
function Base.BroadcastStyle(
151151
::Broadcast.ArrayStyle{NamedArrayPartition}, ::Broadcast.DefaultArrayStyle{1}
152152
)

test/AD/Project.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[deps]
2+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
3+
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
4+
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
5+
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
6+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
7+
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
8+
9+
[sources]
10+
RecursiveArrayTools = {path = "../.."}
11+
12+
[compat]
13+
ForwardDiff = "0.10.38, 1"
14+
Mooncake = "0.5"
15+
RecursiveArrayTools = "4"
16+
ReverseDiff = "1.15"
17+
Test = "1"
18+
Zygote = "0.7"

test/runtests.jl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ run_tests(;
2222
@time @safetestset "Table traits" include("Core/tabletraits.jl")
2323
@time @safetestset "StaticArrays Tests" include("Core/copy_static_array_test.jl")
2424
@time @safetestset "Linear Algebra Tests" include("Core/linalg.jl")
25-
@time @safetestset "Adjoint Tests" include("Core/adjoints.jl")
26-
@time @safetestset "Mooncake Tests" include("Core/mooncake.jl")
2725
return @time @safetestset "Measurement Tests" include("Core/measurements.jl")
2826
end,
2927
groups = Dict(
@@ -70,6 +68,18 @@ run_tests(;
7068
return @time @safetestset "JET Tests" include("NoPre/jet_tests.jl")
7169
end,
7270
),
71+
# AD lives in its own env (test/AD/Project.toml) so its heavy AD-backend
72+
# deps (Mooncake/Zygote/ForwardDiff/ReverseDiff) stay out of the root test
73+
# target. It is deliberately absent from `all` and not run in the Downgrade
74+
# lane: Mooncake 0.5 requires Julia >= 1.10.8, which the downgrade resolver
75+
# cannot satisfy when it minimizes Julia to the 1.10.0 LTS floor.
76+
"AD" => (;
77+
env = joinpath(@__DIR__, "AD"),
78+
body = function ()
79+
@time @safetestset "Adjoint Tests" include("AD/adjoints.jl")
80+
return @time @safetestset "Mooncake Tests" include("AD/mooncake.jl")
81+
end,
82+
),
7383
),
7484
qa = (;
7585
env = joinpath(@__DIR__, "QA"),

test/test_groups.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ num_threads = 2
1818
versions = ["lts", "1"]
1919
num_threads = 2
2020

21+
# AD backends (Mooncake/Zygote/ForwardDiff/ReverseDiff) live in their own env
22+
# (test/AD/Project.toml) and run as their own CI group. in_all = false keeps them
23+
# out of the "All" aggregate, and the Downgrade lane only runs "Core", so AD is
24+
# never fed to the downgrade resolver -- Mooncake 0.5 needs Julia >= 1.10.8, which
25+
# the downgrade resolver cannot place when it minimizes Julia to the 1.10.0 floor.
26+
[AD]
27+
versions = ["lts", "1"]
28+
num_threads = 2
29+
in_all = false
30+
2131
[GPU]
2232
versions = ["1"]
2333
runner = ["self-hosted", "Linux", "X64", "gpu"]

0 commit comments

Comments
 (0)