Skip to content

Commit 2905246

Browse files
committed
Merge branch 'main' into gd/diffwith
2 parents e0abdfc + f8f29d2 commit 2905246

9 files changed

Lines changed: 45 additions & 39 deletions

File tree

.github/workflows/Documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- uses: julia-actions/setup-julia@v2
4040
with:
4141
version: '1' # TODO: 1
42-
- uses: julia-actions/cache@v1
42+
- uses: julia-actions/cache@v3
4343
- name: Install dependencies
4444
run: julia --project=${{ matrix.pkg.dir}}/docs/ --color=yes -e '
4545
using Pkg;

.github/workflows/PreCommit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v6
2222
- uses: julia-actions/setup-julia@v2
23-
- uses: julia-actions/cache@v2
23+
- uses: julia-actions/cache@v3
2424
- run: julia -e 'using Pkg; Pkg.add("Runic")'
2525
- uses: astral-sh/setup-uv@v7
2626
- run: uv tool install pre-commit

.github/workflows/Test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
version: ${{ matrix.version }}
5656
arch: x64
57-
- uses: julia-actions/cache@v2
57+
- uses: julia-actions/cache@v3
5858
- name: Install dependencies & run tests
5959
run: julia --color=yes -e '
6060
using Pkg;
@@ -139,7 +139,7 @@ jobs:
139139
with:
140140
version: ${{ matrix.version }}
141141
arch: x64
142-
- uses: julia-actions/cache@v2
142+
- uses: julia-actions/cache@v3
143143
- name: Install dependencies & run tests
144144
run: julia --code-coverage=user --color=yes -e '
145145
using Pkg;
@@ -195,7 +195,7 @@ jobs:
195195
with:
196196
version: ${{ matrix.version }}
197197
arch: x64
198-
- uses: julia-actions/cache@v2
198+
- uses: julia-actions/cache@v3
199199
- name: Install dependencies & run tests
200200
run: julia --project=./DifferentiationInterfaceTest --color=yes -e '
201201
using Pkg;

DifferentiationInterface/README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22

33
# DifferentiationInterface
44

5-
[![Build Status](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml/badge.svg?branch=main)](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml?query=branch%3Amain)
6-
[![Coverage](https://codecov.io/gh/JuliaDiff/DifferentiationInterface.jl/branch/main/graph/badge.svg?flag=DI)](https://app.codecov.io/gh/JuliaDiff/DifferentiationInterface.jl)
7-
[![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl)
8-
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
9-
[![DOI](https://zenodo.org/badge/740973714.svg)](https://zenodo.org/doi/10.5281/zenodo.11092033)
10-
11-
| Package | Docs |
12-
| :--------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
13-
| DifferentiationInterface | [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/dev/) |
14-
| DifferentiationInterfaceTest | [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterfaceTest/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterfaceTest/dev/) |
5+
| Category | Badges |
6+
|---|---|
7+
| Build status | [![Tests](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml/badge.svg?branch=main)](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml?query=branch%3Amain) [![Coverage](https://codecov.io/gh/JuliaDiff/DifferentiationInterface.jl/branch/main/graph/badge.svg?flag=DI)](https://app.codecov.io/gh/JuliaDiff/DifferentiationInterface.jl) |
8+
| Documentation | [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/dev/) [![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) |
9+
| Code quality | [![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl) [![Aqua QA](https://juliatesting.github.io/Aqua.jl/dev/assets/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) |
10+
| Downloads | [![Downloads](https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv2%2Fmonthly_downloads%2FDifferentiationInterface&query=total_requests&suffix=%2Fmonth&label=Downloads)](http://juliapkgstats.com/pkg/DifferentiationInterface) [![Dependents](https://juliahub.com/docs/General/DifferentiationInterface/stable/deps.svg)](https://juliahub.com/ui/Packages/General/DifferentiationInterface?#dependents) |
11+
| References | [![DOI](https://zenodo.org/badge/740973714.svg)](https://zenodo.org/doi/10.5281/zenodo.11092033) |
1512

1613
An interface to various automatic differentiation (AD) backends in Julia.
1714

@@ -94,7 +91,7 @@ Whenever you refer to this package or the ideas it contains, please cite:
9491

9592
1. our JMLR paper [*A Common Interface for Automatic Differentiation*](https://jmlr.org/papers/v27/25-1024.html);
9693
2. our inspiration [AbstractDifferentiation.jl](https://github.com/JuliaDiff/AbstractDifferentiation.jl).
97-
3. if you use sparse differentiation capabilities, our companion packages [SparseConnectivityTracer.jl](https://github.com/adrhill/SparseConnectivityTracer.jl) and [SparseMatrixColorings.jl](https://github.com/gdalle/SparseMatrixColorings.jl) which provide these capabilities (see their respective repositories for guidelines).
94+
3. if you use sparse differentiation capabilities, our companion packages [SparseConnectivityTracer.jl](https://github.com/adrhill/SparseConnectivityTracer.jl) and [SparseMatrixColorings.jl](https://github.com/JuliaDiff/SparseMatrixColorings.jl) which provide these capabilities (see their respective repositories for guidelines).
9895

9996
For the first two items, you can use the provided [`CITATION.cff`](https://github.com/JuliaDiff/DifferentiationInterface.jl/blob/main/CITATION.cff) file or the following BibTeX entries:
10097

DifferentiationInterface/docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using Zygote: Zygote
1111
links = InterLinks(
1212
"ADTypes" => "https://sciml.github.io/ADTypes.jl/stable/",
1313
"SparseConnectivityTracer" => "https://adrianhill.de/SparseConnectivityTracer.jl/stable/",
14-
"SparseMatrixColorings" => "https://gdalle.github.io/SparseMatrixColorings.jl/stable/",
14+
"SparseMatrixColorings" => "https://juliadiff.org/SparseMatrixColorings.jl/stable/",
1515
"Symbolics" => "https://symbolics.juliasymbolics.org/stable/",
1616
)
1717

DifferentiationInterface/docs/src/explanation/advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ An `AutoSparse` backend must be constructed from three ingredients:
2323
+ [`DenseSparsityDetector`](@ref) from DifferentiationInterface.jl (beware that this detector only gives a locally valid pattern)
2424
+ [`KnownJacobianSparsityDetector`](@extref ADTypes.KnownJacobianSparsityDetector) or [`KnownHessianSparsityDetector`](@extref ADTypes.KnownHessianSparsityDetector) from [ADTypes.jl](https://github.com/SciML/ADTypes.jl) (if you already know the pattern)
2525

26-
3. A coloring algorithm following the [`ADTypes.AbstractColoringAlgorithm`](@extref ADTypes.AbstractColoringAlgorithm) interface, such as those from [SparseMatrixColorings.jl](https://github.com/gdalle/SparseMatrixColorings.jl):
26+
3. A coloring algorithm following the [`ADTypes.AbstractColoringAlgorithm`](@extref ADTypes.AbstractColoringAlgorithm) interface, such as those from [SparseMatrixColorings.jl](https://github.com/JuliaDiff/SparseMatrixColorings.jl):
2727

2828
+ [`GreedyColoringAlgorithm`](@extref SparseMatrixColorings.GreedyColoringAlgorithm) (our generic recommendation, don't forget to tune the `order` parameter)
2929
+ [`ConstantColoringAlgorithm`](@extref SparseMatrixColorings.ConstantColoringAlgorithm) (if you have already computed the optimal coloring and always want to return it)
@@ -48,7 +48,7 @@ But after preparation, the more zeros are present in the matrix, the greater the
4848
The complexity of sparse Jacobians or Hessians grows with the number of distinct colors in a coloring of the sparsity pattern.
4949
To reduce this number of colors, [`GreedyColoringAlgorithm`](@extref SparseMatrixColorings.GreedyColoringAlgorithm) has two main settings: the order used for vertices and the decompression method.
5050
Depending on your use case, you may want to modify either of these options to increase performance.
51-
See the documentation of [SparseMatrixColorings.jl](https://github.com/gdalle/SparseMatrixColorings.jl) for details.
51+
See the documentation of [SparseMatrixColorings.jl](https://github.com/JuliaDiff/SparseMatrixColorings.jl) for details.
5252

5353
### Mixed mode
5454

DifferentiationInterface/docs/src/tutorials/advanced.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ In the examples above, we didn't use preparation.
127127
Sparse preparation is more costly than dense preparation, but it is even more essential.
128128
Indeed, once preparation is done, sparse differentiation is much faster than dense differentiation, because it makes fewer calls to the underlying function.
129129

130-
Some result analysis functions from [SparseMatrixColorings.jl](https://github.com/gdalle/SparseMatrixColorings.jl) can help you figure out what the preparation contains.
130+
Some result analysis functions from [SparseMatrixColorings.jl](https://github.com/JuliaDiff/SparseMatrixColorings.jl) can help you figure out what the preparation contains.
131131
First, it records the sparsity pattern itself (the one returned by the detector).
132132

133133
```@example tuto_advanced

DifferentiationInterface/test/Back/Mooncake/test.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ using Test
77
using ExplicitImports
88
check_no_implicit_imports(DifferentiationInterface)
99

10+
nomatrix(scens) = filter(s -> !(s.x isa AbstractMatrix) && !(s.y isa AbstractMatrix), scens)
11+
1012
backends = [
1113
AutoMooncake(),
1214
AutoMooncakeForward(),
@@ -20,14 +22,21 @@ for backend in backends
2022
end
2123

2224
test_differentiation(
23-
backends,
25+
backends[3:4],
2426
default_scenarios(;
2527
include_constantified = true, include_cachified = true, use_tuples = true
2628
);
2729
excluded = SECOND_ORDER,
2830
logging = LOGGING,
2931
);
3032

33+
test_differentiation(
34+
backends[1:2],
35+
nomatrix(default_scenarios());
36+
excluded = SECOND_ORDER,
37+
logging = LOGGING,
38+
);
39+
3140
EXCLUDED = @static if VERSION v"1.11-" && VERSION v"1.12-"
3241
# testing only :hessian on 1.11 due to an opaque closure bug.
3342
# this is potentially the same issue as discussed in
@@ -54,7 +63,7 @@ end
5463

5564
test_differentiation(
5665
backends[3:4],
57-
static_scenarios();
66+
nomatrix(static_scenarios());
5867
logging = LOGGING,
5968
excluded = SECOND_ORDER
6069
)

DifferentiationInterfaceTest/README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
# DifferentiationInterfaceTest
22

3-
[![Build Status](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml/badge.svg?branch=main)](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml?query=branch%3Amain)
4-
[![Coverage](https://codecov.io/gh/JuliaDiff/DifferentiationInterface.jl/branch/main/graph/badge.svg?flag=DIT)](https://app.codecov.io/gh/JuliaDiff/DifferentiationInterface.jl)
5-
[![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl)
6-
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
7-
[![DOI](https://zenodo.org/badge/740973714.svg)](https://zenodo.org/doi/10.5281/zenodo.11092033)
8-
9-
| Package | Docs |
10-
| :--------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
11-
| DifferentiationInterface | [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/dev/) |
12-
| DifferentiationInterfaceTest | [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterfaceTest/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterfaceTest/dev/) |
3+
| Category | Badges |
4+
|---|---|
5+
| Build status | [![Tests](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml/badge.svg?branch=main)](https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/workflows/Test.yml?query=branch%3Amain) [![Coverage](https://codecov.io/gh/JuliaDiff/DifferentiationInterface.jl/branch/main/graph/badge.svg?flag=DIT)](https://app.codecov.io/gh/JuliaDiff/DifferentiationInterface.jl) |
6+
| Documentation | [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterfaceTest/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterfaceTest/dev/) [![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) |
7+
| Code quality | [![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl) [![Aqua QA](https://juliatesting.github.io/Aqua.jl/dev/assets/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) |
8+
| References | [![DOI](https://zenodo.org/badge/740973714.svg)](https://zenodo.org/doi/10.5281/zenodo.11092033) |
139

1410
Testing and benchmarking utilities for automatic differentiation (AD) in Julia, based on [DifferentiationInterface](https://github.com/JuliaDiff/DifferentiationInterface.jl/tree/main/DifferentiationInterface).
1511

1612
## Goal
1713

1814
Make it easy to know, for a given function:
1915

20-
- which AD backends can differentiate it
21-
- how fast they can do it
16+
- which AD backends can differentiate it
17+
- how fast they can do it
2218

2319
## Features
2420

25-
- Definition of custom test scenarios
26-
- Correctness tests
27-
- Type stability tests
28-
- Count calls to the function
29-
- Benchmark runtime and allocations
21+
- Definition of custom test scenarios
22+
- Correctness tests
23+
- Type stability tests
24+
- Count calls to the function
25+
- Benchmark runtime and allocations
3026

3127
## Installation
3228

@@ -53,3 +49,7 @@ Pkg.add(;
5349
subdir="DifferentiationInterfaceTest",
5450
)
5551
```
52+
53+
## Citation
54+
55+
See the citation instructions for [DifferentiationInterface](https://github.com/JuliaDiff/DifferentiationInterface.jl/tree/main/DifferentiationInterface).

0 commit comments

Comments
 (0)