Skip to content

Commit b8fb610

Browse files
committed
Skip type stability on 1.12
1 parent 90d4e56 commit b8fb610

10 files changed

Lines changed: 33 additions & 24 deletions

File tree

.github/workflows/Test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ jobs:
6363
version: "pre"
6464
- version: "1"
6565
group: Back/ChainRules
66+
- version: "pre"
67+
group: Back/Enzyme
68+
- version: "pre"
69+
group: Back/Mooncake
70+
- version: "pre"
71+
group: Back/DifferentiateWith
6672
env:
6773
JULIA_DI_TEST_GROUP: ${{ matrix.group }}
6874
JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }}

DifferentiationInterface/test/Back/Enzyme/test.jl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,6 @@ end;
7474
)
7575
end
7676

77-
#=
78-
# TODO: reactivate type stability tests
79-
80-
test_differentiation(
81-
AutoEnzyme(; mode=Enzyme.Forward), # TODO: add more
82-
default_scenarios(; include_batchified=false);
83-
correctness=false,
84-
type_stability=:prepared,
85-
excluded=SECOND_ORDER,
86-
logging=LOGGING,
87-
);
88-
=#
89-
9077
@testset "Second order" begin
9178
test_differentiation(
9279
[

DifferentiationInterface/test/Back/ForwardDiff/test.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,16 @@ end
4848
)
4949

5050
test_differentiation(
51-
AutoForwardDiff(); correctness=false, type_stability=:prepared, logging=LOGGING
51+
AutoForwardDiff();
52+
correctness=false,
53+
type_stability=safetypestab(:prepared),
54+
logging=LOGGING,
5255
)
5356

5457
test_differentiation(
5558
AutoForwardDiff(; chunksize=5);
5659
correctness=false,
57-
type_stability=:full,
60+
type_stability=safetypestab(:full),
5861
excluded=[:hessian],
5962
logging=LOGGING,
6063
)

DifferentiationInterface/test/Back/GTPSA/test.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ end
1919
test_differentiation(
2020
AutoGTPSA(),
2121
default_scenarios(; include_constantified=true);
22-
type_stability=:full,
22+
type_stability=safetypestab(:full),
2323
logging=LOGGING,
2424
);
2525

2626
# Test with Descriptor:
2727
d1 = GTPSA.Descriptor(20, 2) # 20 variables to 2nd order
28-
test_differentiation(AutoGTPSA(d1); type_stability=:full, logging=LOGGING);
28+
test_differentiation(AutoGTPSA(d1); type_stability=safetypestab(:full), logging=LOGGING);
2929

3030
# Test with Descriptor using varying orders
3131
vos = 2 * ones(Int, 20)
3232
vos[1] = 3
3333
d2 = GTPSA.Descriptor(vos, 3)
34-
test_differentiation(AutoGTPSA(d2); type_stability=:full, logging=LOGGING);
34+
test_differentiation(AutoGTPSA(d2); type_stability=safetypestab(:full), logging=LOGGING);

DifferentiationInterface/test/Core/ZeroBackends/test.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ end
2727
],
2828
default_scenarios(; include_batchified=false, include_constantified=true);
2929
correctness=false,
30-
type_stability=:full,
30+
type_stability=safetypestab(:full),
3131
logging=LOGGING,
3232
)
3333

3434
test_differentiation(
3535
AutoSparse.(zero_backends, coloring_algorithm=GreedyColoringAlgorithm()),
3636
default_scenarios(; include_constantified=true);
3737
correctness=false,
38-
type_stability=:full,
38+
type_stability=safetypestab(:full),
3939
excluded=[
4040
:pushforward, :pullback, :gradient, :derivative, :hvp, :second_derivative
4141
],

DifferentiationInterface/test/testutils.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ function MyAutoSparse(backend::AbstractADType)
2020
coloring_algorithm=GreedyColoringAlgorithm(),
2121
)
2222
end
23+
24+
safetypestab(symb) = VERSION < v"1.12-" ? :none : symb # TODO: remove

DifferentiationInterfaceTest/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterfaceTest-v0.10.1...main)
8+
## [Unreleased](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterfaceTest-v0.10.2...main)
9+
10+
### Fixed
11+
12+
- Allow JET v0.10 but disable test stability
13+
14+
## [0.10.2](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterfaceTest-v0.10.1...DifferentiationInterfaceTest-v0.10.2)
915

1016
### Fixed
1117

DifferentiationInterfaceTest/test/formalities.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ using Test
1010
Aqua.test_all(DifferentiationInterfaceTest; ambiguities=false, undocumented_names=true)
1111
end
1212
@testset verbose = true "JET" begin
13-
JET.test_package(DifferentiationInterfaceTest; target_defined_modules=true)
13+
# until https://github.com/JuliaLang/julia/pull/59321 is released
14+
if VERSION <= v"1.12-"
15+
JET.test_package(DifferentiationInterfaceTest; target_defined_modules=true)
16+
end
1417
end
1518

1619
@testset "Documentation" begin

DifferentiationInterfaceTest/test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ using DifferentiationInterfaceTest:
1717

1818
GROUP = get(ENV, "JULIA_DIT_TEST_GROUP", "All")
1919

20+
safetypestab(symb) = VERSION < v"1.12-" ? :none : symb # TODO: remove
21+
2022
## Main tests
2123

2224
@time @testset verbose = true "DifferentiationInterfaceTest.jl" begin

DifferentiationInterfaceTest/test/zero_backends.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LOGGING = get(ENV, "CI", "false") == "false"
1212
test_differentiation(
1313
AutoZeroForward(),
1414
map(zero, default_scenarios(; include_batchified=false));
15-
type_stability=:full,
15+
type_stability=safetypestab(:full),
1616
logging=LOGGING,
1717
reprepare=false,
1818
)
@@ -24,7 +24,7 @@ test_differentiation(
2424
default_scenarios(; include_batchified=false),
2525
);
2626
correctness=false,
27-
type_stability=:prepared,
27+
type_stability=safetypestab(:prepared),
2828
logging=LOGGING,
2929
)
3030

0 commit comments

Comments
 (0)