JuliaDiff / JuliaDiff/ChainRules.jl
(Re)use factorizations in primal for \ etc in pullback
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 475
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/rulesets/LinearAlgebra/dense.jl at the cited lines and inspect how the adjoint currently refactorizes A'. Trace the backward pass and identify the existing factorization path; done means the repeated factorization is avoided and the same result is preserved for the affected pullback rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100