diff --git a/Project.toml b/Project.toml index 787ebe7f..bcb216f5 100644 --- a/Project.toml +++ b/Project.toml @@ -85,10 +85,8 @@ julia = "1.10" [extras] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" -Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" @@ -101,9 +99,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" -Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [targets] -test = ["FastBroadcast", "ForwardDiff", "KernelAbstractions", "Measurements", "Mooncake", "Pkg", "Polyester", "Random", "RecursiveArrayToolsShorthandConstructors", "ReverseDiff", "SafeTestsets", "SciMLTesting", "SparseArrays", "StaticArrays", "Statistics", "StructArrays", "Tables", "Test", "Unitful", "Zygote"] +test = ["FastBroadcast", "KernelAbstractions", "Measurements", "Pkg", "Polyester", "Random", "RecursiveArrayToolsShorthandConstructors", "SafeTestsets", "SciMLTesting", "SparseArrays", "StaticArrays", "Statistics", "StructArrays", "Tables", "Test", "Unitful"] diff --git a/src/named_array_partition.jl b/src/named_array_partition.jl index 887f658e..d88f1c13 100644 --- a/src/named_array_partition.jl +++ b/src/named_array_partition.jl @@ -146,7 +146,7 @@ function Base.similar( return NamedArrayPartition(similar(ArrayPartition(x)), getfield(x, :names_to_indices)) end -# when broadcasting with ArrayPartition + another array type, the output is the other array tupe +# when broadcasting with ArrayPartition + another array type, the output is the other array type function Base.BroadcastStyle( ::Broadcast.ArrayStyle{NamedArrayPartition}, ::Broadcast.DefaultArrayStyle{1} ) diff --git a/test/AD/Project.toml b/test/AD/Project.toml new file mode 100644 index 00000000..dbbef75e --- /dev/null +++ b/test/AD/Project.toml @@ -0,0 +1,18 @@ +[deps] +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" +Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" +RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" +ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[sources] +RecursiveArrayTools = {path = "../.."} + +[compat] +ForwardDiff = "0.10.38, 1" +Mooncake = "0.5" +RecursiveArrayTools = "4" +ReverseDiff = "1.15" +Test = "1" +Zygote = "0.7" diff --git a/test/Core/adjoints.jl b/test/AD/adjoints.jl similarity index 100% rename from test/Core/adjoints.jl rename to test/AD/adjoints.jl diff --git a/test/Core/mooncake.jl b/test/AD/mooncake.jl similarity index 100% rename from test/Core/mooncake.jl rename to test/AD/mooncake.jl diff --git a/test/runtests.jl b/test/runtests.jl index 33c07597..a0fe285f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -22,8 +22,6 @@ run_tests(; @time @safetestset "Table traits" include("Core/tabletraits.jl") @time @safetestset "StaticArrays Tests" include("Core/copy_static_array_test.jl") @time @safetestset "Linear Algebra Tests" include("Core/linalg.jl") - @time @safetestset "Adjoint Tests" include("Core/adjoints.jl") - @time @safetestset "Mooncake Tests" include("Core/mooncake.jl") return @time @safetestset "Measurement Tests" include("Core/measurements.jl") end, groups = Dict( @@ -70,6 +68,18 @@ run_tests(; return @time @safetestset "JET Tests" include("NoPre/jet_tests.jl") end, ), + # AD lives in its own env (test/AD/Project.toml) so its heavy AD-backend + # deps (Mooncake/Zygote/ForwardDiff/ReverseDiff) stay out of the root test + # target. It is deliberately absent from `all` and not run in the Downgrade + # lane: Mooncake 0.5 requires Julia >= 1.10.8, which the downgrade resolver + # cannot satisfy when it minimizes Julia to the 1.10.0 LTS floor. + "AD" => (; + env = joinpath(@__DIR__, "AD"), + body = function () + @time @safetestset "Adjoint Tests" include("AD/adjoints.jl") + return @time @safetestset "Mooncake Tests" include("AD/mooncake.jl") + end, + ), ), qa = (; env = joinpath(@__DIR__, "QA"), diff --git a/test/test_groups.toml b/test/test_groups.toml index 2da0790b..ebea6523 100644 --- a/test/test_groups.toml +++ b/test/test_groups.toml @@ -18,6 +18,16 @@ num_threads = 2 versions = ["lts", "1"] num_threads = 2 +# AD backends (Mooncake/Zygote/ForwardDiff/ReverseDiff) live in their own env +# (test/AD/Project.toml) and run as their own CI group. in_all = false keeps them +# out of the "All" aggregate, and the Downgrade lane only runs "Core", so AD is +# never fed to the downgrade resolver -- Mooncake 0.5 needs Julia >= 1.10.8, which +# the downgrade resolver cannot place when it minimizes Julia to the 1.10.0 floor. +[AD] +versions = ["lts", "1"] +num_threads = 2 +in_all = false + [GPU] versions = ["1"] runner = ["self-hosted", "Linux", "X64", "gpu"]