ChainRules.jl
ChainRules.jl copied to clipboard
Audit use of `zeros` vs `Zero`
Some of the code used
zero(X), or @thunk(zero(X))
I feel like if Zero is working right we should be able to replace that with Zero()
E.g. https://github.com/JuliaDiff/ChainRules.jl/blob/master/test/rules/linalg/factorization.jl
Probably related to #46. Although we probably don't need the size information here.
So that particular use-case is because we currently do not allow dervivatives that are NamedTuples to contain AbstractDifferentials for each element.
We probably should. We do need to give that whole case more thought still.
- https://github.com/JuliaDiff/ChainRules.jl/blob/3d2618e58dc55cf688e8570f97648ed9b4cb60f3/src/rulesets/LinearAlgebra/blas.jl#L8
- https://github.com/JuliaDiff/ChainRules.jl/blob/3a1422c40e4915184561dce95f2e7a979b8dc5fa/test/rulesets/LinearAlgebra/factorization.jl#L34
- https://github.com/JuliaDiff/ChainRules.jl/blob/3a1422c40e4915184561dce95f2e7a979b8dc5fa/test/rulesets/Base/base.jl#L114