File tree Expand file tree Collapse file tree
DifferentiationInterfaceTest/test
DifferentiationInterface/test/Back/FiniteDiff Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import DifferentiationInterface as DI
77import DifferentiationInterfaceTest as DIT
88using FiniteDiff: FiniteDiff
99using Test
10+ import Chairmarks
1011
1112@testset " Benchmarking sparse" begin
1213 filtered_sparse_scenarios = filter (sparse_scenarios (; band_sizes = [])) do scen
Original file line number Diff line number Diff line change 1313@testset verbose = true " JET" begin
1414 # until https://github.com/JuliaLang/julia/pull/59321 is released
1515 if VERSION <= v " 1.12-"
16- JET. test_package (DifferentiationInterfaceTest; target_defined_modules = true )
16+ JET. test_package (
17+ DifferentiationInterfaceTest;
18+ target_modules = (
19+ DifferentiationInterfaceTest,
20+ Base. get_extension (DifferentiationInterfaceTest, :DifferentiationInterfaceTestChairmarksExt ),
21+ Base. get_extension (DifferentiationInterfaceTest, :DifferentiationInterfaceTestJETExt ),
22+ )
23+ )
1724 end
1825end
1926
Original file line number Diff line number Diff line change 11using ADTypes
22import Chairmarks, JET
3+ using DataFrames
34using DifferentiationInterface
45using DifferentiationInterface: AutoZeroForward, AutoZeroReverse
56using DifferentiationInterfaceTest
@@ -33,7 +34,7 @@ data0 = benchmark_differentiation(
3334 AutoZeroForward (),
3435 no_matrices (default_scenarios (; include_batchified = false , include_constantified = true ));
3536 logging = LOGGING,
36- );
37+ ) |> DataFrame ;
3738
3839data1 = benchmark_differentiation (
3940 AutoZeroForward (),
@@ -42,7 +43,7 @@ data1 = benchmark_differentiation(
4243 logging = LOGGING,
4344 benchmark_seconds = 0.05 ,
4445 benchmark_aggregation = maximum,
45- );
46+ ) |> DataFrame ;
4647
4748struct FakeBackend <: ADTypes.AbstractADType end
4849ADTypes. mode (:: FakeBackend ) = ADTypes. ForwardMode ()
@@ -52,7 +53,7 @@ data2 = benchmark_differentiation(
5253 no_matrices (default_scenarios (; include_batchified = false ));
5354 logging = false ,
5455 benchmark_test = false ,
55- );
56+ ) |> DataFrame ;
5657
5758@testset " Benchmarking DataFrame" begin
5859 for col in eachcol (data1)
7778 excluded = [:pullback , :gradient ],
7879 benchmark = :prepared ,
7980 logging = LOGGING,
80- ),
81+ ) |> DataFrame ,
8182 benchmark_differentiation (
8283 AutoZeroReverse (),
8384 allocfree_scenarios ();
8485 excluded = [:pushforward , :derivative ],
8586 benchmark = :prepared ,
8687 logging = LOGGING,
87- ),
88+ ) |> DataFrame ,
8889 )
8990 @testset " $(collect (row[1 : 4 ])) " for row in collect (eachrow (data_allocfree))
9091 @test row[:allocs ] == 0
You can’t perform that action at this time.
0 commit comments