Skip to content

Commit ea4536c

Browse files
authored
docs: add postprocessing advice for mixed mode sparse Jacobians (#817)
1 parent 8c234e6 commit ea4536c

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

DifferentiationInterface/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Feat
11+
12+
- Backend switching for Mooncake ([#768])
13+
1014
## [0.7.1]
1115

1216
### Feat
@@ -51,4 +55,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5155
[#795]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/795
5256
[#790]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/790
5357
[#788]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/788
54-
[#782]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/782
58+
[#782]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/782
59+
[#768]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/768

DifferentiationInterface/docs/src/explanation/advanced.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,16 @@ AutoSparse(
8686
)
8787
```
8888

89-
At the moment, mixed mode tends to work best when the [`GreedyColoringAlgorithm`](@extref SparseMatrixColorings.GreedyColoringAlgorithm) is provided with a [`RandomOrder`](@extref SparseMatrixColorings.RandomOrder) instead of the usual [`NaturalOrder`](@extref SparseMatrixColorings.NaturalOrder).
89+
At the moment, mixed mode tends to work best (output fewer colors) when the [`GreedyColoringAlgorithm`](@extref SparseMatrixColorings.GreedyColoringAlgorithm) is provided with a [`RandomOrder`](@extref SparseMatrixColorings.RandomOrder) instead of the usual [`NaturalOrder`](@extref SparseMatrixColorings.NaturalOrder), and when "post-processing" is activated after coloring.
90+
For full reproducibility, you should use a random number generator from [StableRNGs.jl](https://github.com/JuliaRandom/StableRNGs.jl).
91+
Thus, the right setup looks like:
92+
93+
```julia
94+
using StableRNGs
95+
96+
seed = 3
97+
coloring_algorithm = GreedyColoringAlgorithm(RandomOrder(StableRNG(seed), seed); postprocessing=true)
98+
```
9099

91100
## Batch mode
92101

0 commit comments

Comments
 (0)