Skip to content

Bicoloring postprocessing seems to favor removing column colors and not row colors #264

Description

@gdalle

... 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew feature or extension

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions