Skip to content

Commit f20ffe1

Browse files
committed
Merge branch 'main' into gd/diffwith
2 parents d6645ab + ee29327 commit f20ffe1

6 files changed

Lines changed: 85 additions & 11 deletions

File tree

.github/workflows/Documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
steps:
3838
- uses: actions/checkout@v6
39-
- uses: julia-actions/setup-julia@v2
39+
- uses: julia-actions/setup-julia@v3
4040
with:
4141
version: '1' # TODO: 1
4242
- uses: julia-actions/cache@v3

.github/workflows/PreCommit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v6
22-
- uses: julia-actions/setup-julia@v2
22+
- uses: julia-actions/setup-julia@v3
2323
- uses: julia-actions/cache@v3
2424
- run: julia -e 'using Pkg; Pkg.add("Runic")'
2525
- uses: astral-sh/setup-uv@v7

.github/workflows/Test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }}
5151
steps:
5252
- uses: actions/checkout@v6
53-
- uses: julia-actions/setup-julia@v2
53+
- uses: julia-actions/setup-julia@v3
5454
with:
5555
version: ${{ matrix.version }}
5656
arch: x64
@@ -75,7 +75,7 @@ jobs:
7575
- uses: julia-actions/julia-processcoverage@v1
7676
with:
7777
directories: ./DifferentiationInterface/src,./DifferentiationInterface/ext,./DifferentiationInterface/test
78-
- uses: codecov/codecov-action@v5
78+
- uses: codecov/codecov-action@v6
7979
with:
8080
files: lcov.info
8181
flags: DI
@@ -135,7 +135,7 @@ jobs:
135135
JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }}
136136
steps:
137137
- uses: actions/checkout@v6
138-
- uses: julia-actions/setup-julia@v2
138+
- uses: julia-actions/setup-julia@v3
139139
with:
140140
version: ${{ matrix.version }}
141141
arch: x64
@@ -150,7 +150,7 @@ jobs:
150150
- uses: julia-actions/julia-processcoverage@v1
151151
with:
152152
directories: ./DifferentiationInterface/src,./DifferentiationInterface/ext,./DifferentiationInterface/test
153-
- uses: codecov/codecov-action@v5
153+
- uses: codecov/codecov-action@v6
154154
with:
155155
files: lcov.info
156156
flags: DI
@@ -191,7 +191,7 @@ jobs:
191191
JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }}
192192
steps:
193193
- uses: actions/checkout@v6
194-
- uses: julia-actions/setup-julia@v2
194+
- uses: julia-actions/setup-julia@v3
195195
with:
196196
version: ${{ matrix.version }}
197197
arch: x64
@@ -209,7 +209,7 @@ jobs:
209209
- uses: julia-actions/julia-processcoverage@v1
210210
with:
211211
directories: ./DifferentiationInterfaceTest/src,./DifferentiationInterfaceTest/ext,./DifferentiationInterfaceTest/test
212-
- uses: codecov/codecov-action@v5
212+
- uses: codecov/codecov-action@v6
213213
with:
214214
files: lcov.info
215215
flags: DIT

DifferentiationInterface/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ForwardDiff = "0.10.36,1"
7171
GPUArraysCore = "0.2"
7272
GTPSA = "1.4.0"
7373
LinearAlgebra = "1"
74-
Mooncake = "0.5.1"
74+
Mooncake = "0.5.1 - 0.5.24"
7575
PolyesterForwardDiff = "0.1.2"
7676
ReverseDiff = "1.15.1"
7777
SparseArrays = "1"

DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,81 @@ import SparseMatrixColorings as SMC
1919

2020
abstract type SMCSparseJacobianPrep{SIG} <: DI.SparseJacobianPrep{SIG} end
2121

22+
"""
23+
SMC.sparsity_pattern(prep::DI.SparseJacobianPrep)
24+
25+
Return the sparsity pattern of a sparse `prep` object created by [`prepare_jacobian`](@ref).
26+
"""
2227
SMC.sparsity_pattern(prep::DI.SparseJacobianPrep) = prep.sparsity
28+
29+
"""
30+
SMC.column_colors(prep::DI.SparseJacobianPrep)
31+
32+
Return the column colors of a sparse `prep` object created by [`prepare_jacobian`](@ref).
33+
"""
2334
SMC.column_colors(prep::DI.SparseJacobianPrep) = column_colors(prep.coloring_result)
35+
36+
"""
37+
SMC.column_groups(prep::DI.SparseJacobianPrep)
38+
39+
Return the column groups of a sparse `prep` object created by [`prepare_jacobian`](@ref).
40+
"""
2441
SMC.column_groups(prep::DI.SparseJacobianPrep) = column_groups(prep.coloring_result)
42+
43+
"""
44+
SMC.row_colors(prep::DI.SparseJacobianPrep)
45+
46+
Return the row colors of a sparse `prep` object created by [`prepare_jacobian`](@ref).
47+
"""
2548
SMC.row_colors(prep::DI.SparseJacobianPrep) = row_colors(prep.coloring_result)
49+
50+
"""
51+
SMC.row_groups(prep::DI.SparseJacobianPrep)
52+
53+
Return the row groups of a sparse `prep` object created by [`prepare_jacobian`](@ref).
54+
"""
2655
SMC.row_groups(prep::DI.SparseJacobianPrep) = row_groups(prep.coloring_result)
56+
57+
"""
58+
SMC.ncolors(prep::DI.SparseJacobianPrep)
59+
60+
Return the number of colors of a sparse `prep` object created by [`prepare_jacobian`](@ref).
61+
"""
2762
SMC.ncolors(prep::DI.SparseJacobianPrep) = ncolors(prep.coloring_result)
2863

64+
65+
"""
66+
SMC.sparsity_pattern(prep::DI.SparseHessianPrep)
67+
68+
Return the sparsity pattern of a sparse `prep` object created by [`prepare_hessian`](@ref).
69+
"""
2970
SMC.sparsity_pattern(prep::DI.SparseHessianPrep) = prep.sparsity
71+
72+
"""
73+
SMC.column_colors(prep::DI.SparseHessianPrep)
74+
75+
Return the column colors of a sparse `prep` object created by [`prepare_hessian`](@ref).
76+
"""
3077
SMC.column_colors(prep::DI.SparseHessianPrep) = column_colors(prep.coloring_result)
78+
79+
"""
80+
SMC.column_groups(prep::DI.SparseHessianPrep)
81+
82+
Return the column groups of a sparse `prep` object created by [`prepare_hessian`](@ref).
83+
"""
3184
SMC.column_groups(prep::DI.SparseHessianPrep) = column_groups(prep.coloring_result)
85+
86+
"""
87+
SMC.ncolors(prep::DI.SparseHessianPrep)
88+
89+
Return the number of colors of a sparse `prep` object created by [`prepare_hessian`](@ref).
90+
"""
3291
SMC.ncolors(prep::DI.SparseHessianPrep) = ncolors(prep.coloring_result)
3392

93+
3494
include("jacobian.jl")
3595
include("jacobian_mixed.jl")
3696
include("hessian.jl")
3797

98+
3899
end

DifferentiationInterface/test/Back/Mooncake/test.jl

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,20 @@ end
2323

2424
test_differentiation(
2525
backends[3:4],
26-
default_scenarios(;
27-
include_constantified = true, include_cachified = true, use_tuples = true
26+
default_scenarios();
27+
excluded = SECOND_ORDER,
28+
logging = LOGGING,
29+
);
30+
31+
test_differentiation(
32+
backends[3:4],
33+
nomatrix(
34+
default_scenarios(;
35+
include_normal = false,
36+
include_constantified = true,
37+
include_cachified = true,
38+
use_tuples = true
39+
)
2840
);
2941
excluded = SECOND_ORDER,
3042
logging = LOGGING,
@@ -49,6 +61,7 @@ end
4961
# Test second-order differentiation (forward-over-reverse)
5062
test_differentiation(
5163
[SecondOrder(AutoMooncakeForward(), AutoMooncake())],
64+
nomatrix(default_scenarios());
5265
excluded = EXCLUDED,
5366
logging = LOGGING,
5467
)

0 commit comments

Comments
 (0)