# How to use the basic Sparse matrix operations (multiplication, .etc) in PyCUDA

I try to use sparse matrix operations in GPU in Python and now try to use PyCUDA with theano. But I can't find how to do sparse matrix and vector multiplication. I only got an example showing how to solve $A\cdot x=b$ using CG from the library document. Is there any document or example detailing how to do some basic sparse matrix operations?

By the way, is there another python library that can do sparse matrix operations in GPU?

• Yes, but CG is built on (sparse) matrix-vector multiplication. The relevant lines are 30-31, where the sparse matvec operator spmv is defined for a matrix $A$ given in scipy.sparse.crs format. If you look at the cg source (line 123), you see that $b=Ax$ is then computed via b=spmv(x). – Christian Clason May 23 '15 at 15:17