Skip to content

Commit a266e80

Browse files
authored
fix!: turn Chairmarks and JET into weakdeps (#958)
* fix!: turn Chairmarks and JET into weakdeps * Fixes * No column access * JET * Fix * Fixes * Fix imports * Fixes * Fixes * Fix and test Tables API * Fix * Fix stuff
1 parent 8d33550 commit a266e80

File tree

26 files changed

+391
-122
lines changed

26 files changed

+391
-122
lines changed

DifferentiationInterface/test/Back/FiniteDiff/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[deps]
22
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
3+
Chairmarks = "0ca39b1e-fe0b-4e98-acfc-b1656634c4de"
4+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
35
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
46
DifferentiationInterfaceTest = "a82114a7-5aa3-49a8-9643-716bb13727a3"
57
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"

DifferentiationInterface/test/Back/FiniteDiff/benchmark.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
using Pkg
22

33
using ADTypes: ADTypes
4+
using DataFrames: DataFrame
45
using DifferentiationInterface, DifferentiationInterfaceTest
56
import DifferentiationInterface as DI
67
import DifferentiationInterfaceTest as DIT
78
using FiniteDiff: FiniteDiff
89
using Test
10+
import Chairmarks
911

1012
@testset "Benchmarking sparse" begin
1113
filtered_sparse_scenarios = filter(sparse_scenarios(; band_sizes = [])) do scen
@@ -21,7 +23,7 @@ using Test
2123
benchmark = :prepared,
2224
excluded = SECOND_ORDER,
2325
logging = LOGGING,
24-
)
26+
) |> DataFrame
2527
@testset "Analyzing benchmark results" begin
2628
@testset "$(row[:scenario])" for row in eachrow(data)
2729
@test row[:allocs] == 0

DifferentiationInterface/test/Back/ForwardDiff/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
[deps]
22
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
3+
Chairmarks = "0ca39b1e-fe0b-4e98-acfc-b1656634c4de"
34
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
5+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
46
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
57
DifferentiationInterfaceTest = "a82114a7-5aa3-49a8-9643-716bb13727a3"
68
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
79
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
10+
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
811
JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb"
912
SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5"
1013
SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"

DifferentiationInterface/test/Back/ForwardDiff/benchmark.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Pkg
22

33
using ADTypes: ADTypes
4+
using DataFrames: DataFrame
45
using DifferentiationInterface, DifferentiationInterfaceTest
56
import DifferentiationInterface as DI
67
import DifferentiationInterfaceTest as DIT
@@ -18,7 +19,7 @@ using Test
1819
benchmark = :prepared,
1920
excluded = [:hessian, :pullback], # TODO: figure this out
2021
logging = LOGGING,
21-
)
22+
) |> DataFrame
2223
@testset "Analyzing benchmark results" begin
2324
@testset "$(row[:scenario])" for row in eachrow(data)
2425
@test row[:allocs] == 0
@@ -40,7 +41,7 @@ end
4041
benchmark = :prepared,
4142
excluded = SECOND_ORDER,
4243
logging = LOGGING,
43-
)
44+
) |> DataFrame
4445
@testset "Analyzing benchmark results" begin
4546
@testset "$(row[:scenario])" for row in eachrow(data)
4647
@test row[:allocs] == 0

DifferentiationInterface/test/Back/ForwardDiff/test.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ using ForwardDiff: ForwardDiff
99
using StaticArrays: StaticArrays, @SVector
1010
using JLArrays: JLArrays
1111
using Test
12+
import JET, Chairmarks
1213

1314
using ExplicitImports
1415
check_no_implicit_imports(DifferentiationInterface)

DifferentiationInterface/test/Back/GTPSA/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
44
DifferentiationInterfaceTest = "a82114a7-5aa3-49a8-9643-716bb13727a3"
55
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
66
GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8"
7+
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
78
SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5"
89
SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"
910
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

DifferentiationInterface/test/Back/GTPSA/test.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ include("../../testutils.jl")
33
using DifferentiationInterface, DifferentiationInterfaceTest
44
using GTPSA: GTPSA
55
using Test
6+
import JET
67

78
using ExplicitImports
89
check_no_implicit_imports(DifferentiationInterface)

DifferentiationInterface/test/Core/ZeroBackends/test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using JLArrays: JLArrays
77
using SparseMatrixColorings
88
using StaticArrays: StaticArrays
99
using Test
10-
10+
using JET
1111

1212
zero_backends = [AutoZeroForward(), AutoZeroReverse()]
1313

DifferentiationInterface/test/Project.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
33
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
4+
Chairmarks = "0ca39b1e-fe0b-4e98-acfc-b1656634c4de"
45
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
56
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
67
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -23,11 +24,12 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2324
[compat]
2425
ADTypes = "1.18"
2526
Aqua = "0.8.12"
27+
Chairmarks = "1.2.1"
2628
ComponentArrays = "0.15.27"
2729
DataFrames = "1.7.0"
2830
Dates = "1"
2931
DifferentiationInterface = "0.7.10"
30-
DifferentiationInterfaceTest = "0.10.3"
32+
DifferentiationInterfaceTest = "0.11.0"
3133
ExplicitImports = "1.10.1"
3234
InteractiveUtils = "1"
3335
JET = "0.9,0.10,0.11"
@@ -42,4 +44,4 @@ Test = "1"
4244
julia = "1.10.10"
4345

4446
[sources]
45-
DifferentiationInterface = { path = ".." }
47+
DifferentiationInterface = { path = ".." }

DifferentiationInterfaceTest/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ 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.4...main)
8+
## [Unreleased](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterfaceTest-v0.11.0...main)
9+
10+
## [0.11.0](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterfaceTest-v0.10.4...DifferentiationInterfaceTest-v0.11.0)
11+
12+
### Changed
13+
14+
- Benchmarking and type stability analysis are now implemented in package extensions, which depend on Chairmarks and JET respectively
15+
- Benchmarking no longer returns a `DataFrame` but a Tables.jl-compatible object.
916

1017
## [0.10.4](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterfaceTest-v0.10.3...DifferentiationInterfaceTest-v0.10.4)
1118

0 commit comments

Comments
 (0)