diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index e30a3ae34..5785d6e94 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -25,11 +25,12 @@ jobs: actions: write contents: read strategy: - fail-fast: false # TODO: toggle + fail-fast: true # TODO: toggle matrix: version: - - "1.10" + - "lts" - "1" + - "pre" group: - Core/Internals - Back/DifferentiateWith @@ -53,11 +54,21 @@ jobs: - Down/Lux skip_lts: - ${{ github.event.pull_request.draft }} + skip_pre: + - ${{ github.event.pull_request.draft }} exclude: - skip_lts: true - version: "1.10" + version: "lts" + - skip_pre: true + version: "pre" - version: "1" group: Back/ChainRules + - version: "pre" + group: Back/Enzyme + - version: "pre" + group: Back/Mooncake + - version: "pre" + group: Back/DifferentiateWith env: JULIA_DI_TEST_GROUP: ${{ matrix.group }} JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }} @@ -100,8 +111,9 @@ jobs: fail-fast: true matrix: version: - - "1.10" + - "lts" - "1" + - "pre" group: - Formalities - Zero @@ -109,9 +121,13 @@ jobs: - Weird skip_lts: - ${{ github.event.pull_request.draft }} + skip_pre: + - ${{ github.event.pull_request.draft }} exclude: - skip_lts: true - version: "1.10" + version: "lts" + - skip_pre: true + version: "pre" env: JULIA_DIT_TEST_GROUP: ${{ matrix.group }} JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }} diff --git a/DifferentiationInterface/test/Back/Enzyme/test.jl b/DifferentiationInterface/test/Back/Enzyme/test.jl index ecc120718..9f799cbb9 100644 --- a/DifferentiationInterface/test/Back/Enzyme/test.jl +++ b/DifferentiationInterface/test/Back/Enzyme/test.jl @@ -74,19 +74,6 @@ end; ) end -#= -# TODO: reactivate type stability tests - -test_differentiation( - AutoEnzyme(; mode=Enzyme.Forward), # TODO: add more - default_scenarios(; include_batchified=false); - correctness=false, - type_stability=:prepared, - excluded=SECOND_ORDER, - logging=LOGGING, -); -=# - @testset "Second order" begin test_differentiation( [ diff --git a/DifferentiationInterface/test/Back/ForwardDiff/test.jl b/DifferentiationInterface/test/Back/ForwardDiff/test.jl index d840f0024..42448a7c0 100644 --- a/DifferentiationInterface/test/Back/ForwardDiff/test.jl +++ b/DifferentiationInterface/test/Back/ForwardDiff/test.jl @@ -48,13 +48,16 @@ end ) test_differentiation( - AutoForwardDiff(); correctness=false, type_stability=:prepared, logging=LOGGING + AutoForwardDiff(); + correctness=false, + type_stability=safetypestab(:prepared), + logging=LOGGING, ) test_differentiation( AutoForwardDiff(; chunksize=5); correctness=false, - type_stability=:full, + type_stability=safetypestab(:full), excluded=[:hessian], logging=LOGGING, ) diff --git a/DifferentiationInterface/test/Back/GTPSA/test.jl b/DifferentiationInterface/test/Back/GTPSA/test.jl index c0541406f..209f995e2 100644 --- a/DifferentiationInterface/test/Back/GTPSA/test.jl +++ b/DifferentiationInterface/test/Back/GTPSA/test.jl @@ -19,16 +19,16 @@ end test_differentiation( AutoGTPSA(), default_scenarios(; include_constantified=true); - type_stability=:full, + type_stability=safetypestab(:full), logging=LOGGING, ); # Test with Descriptor: d1 = GTPSA.Descriptor(20, 2) # 20 variables to 2nd order -test_differentiation(AutoGTPSA(d1); type_stability=:full, logging=LOGGING); +test_differentiation(AutoGTPSA(d1); type_stability=safetypestab(:full), logging=LOGGING); # Test with Descriptor using varying orders vos = 2 * ones(Int, 20) vos[1] = 3 d2 = GTPSA.Descriptor(vos, 3) -test_differentiation(AutoGTPSA(d2); type_stability=:full, logging=LOGGING); +test_differentiation(AutoGTPSA(d2); type_stability=safetypestab(:full), logging=LOGGING); diff --git a/DifferentiationInterface/test/Core/ZeroBackends/test.jl b/DifferentiationInterface/test/Core/ZeroBackends/test.jl index e79383d00..396e7d455 100644 --- a/DifferentiationInterface/test/Core/ZeroBackends/test.jl +++ b/DifferentiationInterface/test/Core/ZeroBackends/test.jl @@ -27,7 +27,7 @@ end ], default_scenarios(; include_batchified=false, include_constantified=true); correctness=false, - type_stability=:full, + type_stability=safetypestab(:full), logging=LOGGING, ) @@ -35,7 +35,7 @@ end AutoSparse.(zero_backends, coloring_algorithm=GreedyColoringAlgorithm()), default_scenarios(; include_constantified=true); correctness=false, - type_stability=:full, + type_stability=safetypestab(:full), excluded=[ :pushforward, :pullback, :gradient, :derivative, :hvp, :second_derivative ], diff --git a/DifferentiationInterface/test/Project.toml b/DifferentiationInterface/test/Project.toml index 7fea60c1e..5e06b62f7 100644 --- a/DifferentiationInterface/test/Project.toml +++ b/DifferentiationInterface/test/Project.toml @@ -23,7 +23,7 @@ ComponentArrays = "0.15.27" DataFrames = "1.7.0" Dates = "1" ExplicitImports = "1.10.1" -JET = "0.9" +JET = "0.9,0.10" JLArrays = "0.2.0" Pkg = "1" Random = "1" diff --git a/DifferentiationInterface/test/testutils.jl b/DifferentiationInterface/test/testutils.jl index 4c7366b40..657a1834d 100644 --- a/DifferentiationInterface/test/testutils.jl +++ b/DifferentiationInterface/test/testutils.jl @@ -20,3 +20,5 @@ function MyAutoSparse(backend::AbstractADType) coloring_algorithm=GreedyColoringAlgorithm(), ) end + +safetypestab(symb) = VERSION < v"1.12-" ? symb : :none # TODO: remove diff --git a/DifferentiationInterfaceTest/CHANGELOG.md b/DifferentiationInterfaceTest/CHANGELOG.md index e516089fe..cb8ed2b76 100644 --- a/DifferentiationInterfaceTest/CHANGELOG.md +++ b/DifferentiationInterfaceTest/CHANGELOG.md @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterfaceTest-v0.10.1...main) +## [Unreleased](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterfaceTest-v0.10.2...main) + +### Fixed + + - Allow JET v0.10 but disable test stability + +## [0.10.2](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterfaceTest-v0.10.1...DifferentiationInterfaceTest-v0.10.2) ### Fixed diff --git a/DifferentiationInterfaceTest/Project.toml b/DifferentiationInterfaceTest/Project.toml index 3a53d059f..f40e7d571 100644 --- a/DifferentiationInterfaceTest/Project.toml +++ b/DifferentiationInterfaceTest/Project.toml @@ -50,7 +50,7 @@ FiniteDifferences = "0.12" Flux = "0.16" ForwardDiff = "0.10.36,1" Functors = "0.4, 0.5" -JET = "0.4 - 0.8, 0.9" +JET = "0.9,0.10" JLArrays = "0.1, 0.2" LinearAlgebra = "1" Lux = "1.1.0" diff --git a/DifferentiationInterfaceTest/test/formalities.jl b/DifferentiationInterfaceTest/test/formalities.jl index 5f827e8f4..e05731041 100644 --- a/DifferentiationInterfaceTest/test/formalities.jl +++ b/DifferentiationInterfaceTest/test/formalities.jl @@ -10,7 +10,10 @@ using Test Aqua.test_all(DifferentiationInterfaceTest; ambiguities=false, undocumented_names=true) end @testset verbose = true "JET" begin - JET.test_package(DifferentiationInterfaceTest; target_defined_modules=true) + # until https://github.com/JuliaLang/julia/pull/59321 is released + if VERSION <= v"1.12-" + JET.test_package(DifferentiationInterfaceTest; target_defined_modules=true) + end end @testset "Documentation" begin diff --git a/DifferentiationInterfaceTest/test/runtests.jl b/DifferentiationInterfaceTest/test/runtests.jl index 17ed63d9d..ee96ca118 100644 --- a/DifferentiationInterfaceTest/test/runtests.jl +++ b/DifferentiationInterfaceTest/test/runtests.jl @@ -17,6 +17,8 @@ using DifferentiationInterfaceTest: GROUP = get(ENV, "JULIA_DIT_TEST_GROUP", "All") +safetypestab(symb) = VERSION < v"1.12-" ? symb : :none # TODO: remove + ## Main tests @time @testset verbose = true "DifferentiationInterfaceTest.jl" begin diff --git a/DifferentiationInterfaceTest/test/zero_backends.jl b/DifferentiationInterfaceTest/test/zero_backends.jl index b958c6a79..b0931264d 100644 --- a/DifferentiationInterfaceTest/test/zero_backends.jl +++ b/DifferentiationInterfaceTest/test/zero_backends.jl @@ -12,7 +12,7 @@ LOGGING = get(ENV, "CI", "false") == "false" test_differentiation( AutoZeroForward(), map(zero, default_scenarios(; include_batchified=false)); - type_stability=:full, + type_stability=safetypestab(:full), logging=LOGGING, reprepare=false, ) @@ -24,7 +24,7 @@ test_differentiation( default_scenarios(; include_batchified=false), ); correctness=false, - type_stability=:prepared, + type_stability=safetypestab(:prepared), logging=LOGGING, )