Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -100,18 +111,23 @@ jobs:
fail-fast: true
matrix:
version:
- "1.10"
- "lts"
- "1"
- "pre"
group:
- Formalities
- Zero
- Standard
- 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 }}
Expand Down
13 changes: 0 additions & 13 deletions DifferentiationInterface/test/Back/Enzyme/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down
7 changes: 5 additions & 2 deletions DifferentiationInterface/test/Back/ForwardDiff/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
6 changes: 3 additions & 3 deletions DifferentiationInterface/test/Back/GTPSA/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
4 changes: 2 additions & 2 deletions DifferentiationInterface/test/Core/ZeroBackends/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ end
],
default_scenarios(; include_batchified=false, include_constantified=true);
correctness=false,
type_stability=:full,
type_stability=safetypestab(:full),
logging=LOGGING,
)

test_differentiation(
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
],
Expand Down
2 changes: 1 addition & 1 deletion DifferentiationInterface/test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions DifferentiationInterface/test/testutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ function MyAutoSparse(backend::AbstractADType)
coloring_algorithm=GreedyColoringAlgorithm(),
)
end

safetypestab(symb) = VERSION < v"1.12-" ? symb : :none # TODO: remove
8 changes: 7 additions & 1 deletion DifferentiationInterfaceTest/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion DifferentiationInterfaceTest/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion DifferentiationInterfaceTest/test/formalities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions DifferentiationInterfaceTest/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions DifferentiationInterfaceTest/test/zero_backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -24,7 +24,7 @@ test_differentiation(
default_scenarios(; include_batchified=false),
);
correctness=false,
type_stability=:prepared,
type_stability=safetypestab(:prepared),
logging=LOGGING,
)

Expand Down
Loading