ChainRules.jl icon indicating copy to clipboard operation
ChainRules.jl copied to clipboard

(Re)use factorizations in primal for \ etc in pullback

Open DhairyaLGandhi opened this issue 5 years ago • 0 comments

Transferred from https://github.com/FluxML/Zygote.jl/issues/773

There are some adjoints which repeat calculations in the backwards pass which can be avoided, for example.

https://github.com/JuliaDiff/ChainRules.jl/blob/bb08bd80b5cee92947002547de1f54556a5e3ee7/src/rulesets/LinearAlgebra/dense.jl#L284-L310 This refactorizes A' and can be replaced with factorize and use that in the backwards pass

Cc @oxinabox

DhairyaLGandhi avatar Aug 24 '20 20:08 DhairyaLGandhi