... which is bad for autodiff since reverse passes are more expensive than forward passes.
I wonder if this could be due to the order in which we iterate through the stars / trees? It doesn't seem to be influenced by the order in which we greedily color vertices.
A = diagm(ones(Bool, 3))
problem = ColoringProblem{:nonsymmetric,:bidirectional}()
algo = GreedyColoringAlgorithm(RandomOrder(); postprocessing=true)
for _ in 1:10
result = coloring(A, problem, algo)
@show column_colors(result), row_colors(result)
end
Perhaps in this line
https://github.com/gdalle/SparseMatrixColorings.jl/blob/7efc6bc7650c442c326aa40fe3063d27f6bd8ea5/src/coloring.jl#L646
we could use the computed vertex order instead, or its reverse order? Not sure which one makes more sense?
I noticed this because in JuliaDiff/DifferentiationInterface.jl#864 I sometimes got empty forward groups but never empty reverse groups.
@amontoison
... which is bad for autodiff since reverse passes are more expensive than forward passes.
I wonder if this could be due to the order in which we iterate through the stars / trees? It doesn't seem to be influenced by the order in which we greedily color vertices.
Perhaps in this line
https://github.com/gdalle/SparseMatrixColorings.jl/blob/7efc6bc7650c442c326aa40fe3063d27f6bd8ea5/src/coloring.jl#L646
we could use the computed vertex order instead, or its reverse order? Not sure which one makes more sense?
I noticed this because in JuliaDiff/DifferentiationInterface.jl#864 I sometimes got empty forward groups but never empty reverse groups.
@amontoison