Skip to content

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

@gdalle

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

for j in axes(S, 2)

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

Metadata

Metadata

Assignees

Labels

featureNew feature or extension

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions