Skip to content

Commit 80ec41d

Browse files
committed
Fixes
1 parent 9caa52e commit 80ec41d

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

DifferentiationInterface/test/Back/FiniteDiff/benchmark.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import DifferentiationInterface as DI
77
import DifferentiationInterfaceTest as DIT
88
using FiniteDiff: FiniteDiff
99
using Test
10+
import Chairmarks
1011

1112
@testset "Benchmarking sparse" begin
1213
filtered_sparse_scenarios = filter(sparse_scenarios(; band_sizes = [])) do scen

DifferentiationInterfaceTest/test/formalities.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ end
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
1825
end
1926

DifferentiationInterfaceTest/test/zero_backends.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using ADTypes
22
import Chairmarks, JET
3+
using DataFrames
34
using DifferentiationInterface
45
using DifferentiationInterface: AutoZeroForward, AutoZeroReverse
56
using 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

3839
data1 = 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

4748
struct FakeBackend <: ADTypes.AbstractADType end
4849
ADTypes.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)
@@ -77,14 +78,14 @@ end
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

0 commit comments

Comments
 (0)