Skip to content

Sparse matrix-vector products for solvers #16737

Answered by jakevdp
SNMS95 asked this question in Q&A
Discussion options

You must be logged in to vote

In general sparse operations will not be faster than dense operations, particularly on accelerators like GPU (this is not just true in JAX, but in virtually all systems that run on modern hardware). But sparse operations can be useful if the dense version of your matrix is too large to fit in memory, or if your matrix is extremely sparse (i.e. ~99.9% sparse) so that the indexing overhead does not dominate the cost of a dense matmul.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by SNMS95
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants