# How do you speed up the linear sparse solver in Zygote?

**URL:** <https://discourse.julialang.org/t/how-do-you-speed-up-the-linear-sparse-solver-in-zygote/111801>\
**Category:** Numerics\
**Tags:** question, zygote, linearsolve, sparsearrays\
**Created:** [March 19, 2024, 7:15am UTC](https://discourse.julialang.org/t/how-do-you-speed-up-the-linear-sparse-solver-in-zygote/111801 "2024-03-19T07:15:50Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [March 20, 2024, 3:40pm UTC](https://discourse.julialang.org/t/how-do-you-speed-up-the-linear-sparse-solver-in-zygote/111801/15 "2024-03-20T15:40:39Z")

</div>

> [@ChrisRackauckas](#):
>
> It adds rules for Zygote and Enzyme and wraps pretty much every linear solver that people use in practice. That should handle this just fine?

To compute \nabla\_x \Vert A(x)^{-1} b \Vert with current AD tools where A(x) is sparse, you still have the problem of [trying to differentiate through the sparse-matrix constructor](https://discourse.julialang.org/t/zygote-jl-how-to-get-the-gradient-of-sparse-matrix/59067/6), no?

---

_[View the full topic](https://discourse.julialang.org/t/how-do-you-speed-up-the-linear-sparse-solver-in-zygote/111801)._
