EnzymeAD/Enzyme.jl

enzyme_sparse_accumulate and co in Julia

Offen

#1.947 geöffnet am 09.10.2024

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Julia (96 Forks)batch import
help wanted

Repository-Metriken

Stars
 (563 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 5T 1h) (76 gemergte PRs in 30 T)

Beschreibung

What would we need to do to define support for sparse operations/jacobians in Enzyme.jl?

using Enzyme
using SparseArrays

julia> Enzyme.jacobian(Enzyme.Forward, x->sum(abs2, x, dims=2), sprandn(12, 0.5))
12×12 Matrix{Float64}:
  0.0       0.0       0.0      0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0
 -1.88261  -1.88261   0.0      0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0
  0.0       0.0      -3.04331  0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0
  0.0       0.0       0.0      0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0
  0.0       0.0       0.0      0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0
  0.0       0.0       0.0      0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0
  0.0       0.0       0.0      1.2327  1.2327  1.2327  1.2327  0.0      0.0  0.0  0.0  0.0
  0.0       0.0       0.0      0.0     0.0     0.0     0.0     1.63961  0.0  0.0  0.0  0.0
  0.0       0.0       0.0      0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0
  0.0       0.0       0.0      0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0
  0.0       0.0       0.0      0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0
  0.0       0.0       0.0      0.0     0.0     0.0     0.0     0.0      0.0  0.0  0.0  0.0

Contributor Guide