Skip to content

Make the rrule for 3-arg dot lazy  #788

Open
@mohamed82008

Description

@mohamed82008

Currently this line

dA = @thunk project_A(ΔΩ .* x .* adjoint(y))
leads to a loss of structure because it constructs a dense matrix from 2 vectors. We should make this a lazy outer product (like in SciML/LinearSolve.jl#484) such that the m x n matrix's co-tangent only requires O(m + n) memory. See https://discourse.julialang.org/t/zygote-jl-how-to-get-the-gradient-of-sparse-matrix/59067/12 for the potential gain and suggested implementation. If the idea gets a green light, I will open a PR.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions