Sparse right-hand side inputs for cuDSS

Hello,

I’m trying to solve a system such as AX=B where A is a sparse matrix with a dimension of a couple of 100 thousand. My right-hand side matrix B is also a very sparse matrix with a couple of thousands of columns. In order to perform the solution, I need to convert matrix B to a full matrix which results in excessive memory consumption.

My question/request would be this; at some point, the hardware memory compression or some other feature such as supporting sparse right-hand-sides would be possible. This is not a problem for B matrices with single or few columns but it becomes a problem for me with large amounts of columns.

Regards
Deniz

Hi Deniz!

I think it would be reasonable if cuDSS supports a sparse rhs for your case. Right now the workaround I can suggest (which is similar to the simplest implementation we could put into cuDSS relatively quickly) is splitting your rhs into multiple chunks over columns, and converting piece-by-piece into a dense buffer to be passed into the solve phase.

A napkin-math: if you have n = 500000, fp64 ppecision and 2000 columns in your rhs, full dense rhs would take 500000 * 2000 * 8 bytes ~ 8 GB. Then solution takes the same amount of memory so it’s another 8 GB. 16 GB might be tolerable for the datacenter-class GPUs with 80+ GB of memory but of course are a much bigger portion for smaller cards.

Let me know if my math is incorrect or if there are other factors to consider here.

Regards,
Kirill

Hi again,

Yes, I use the splitting method to solve the AX=B. Matter of fact I just take a single column solve the equation and discard the right-hand side. On the other hand, if I can just put in the whole sparse matrix B the solution could be faster potentially.

There are numerous ways to deal with this but my main goal is this: I believe the cuDSS could be a very popular tool because it is faster than the CPU alternatives and I’m using it for LU factorization constantly. I know it is in the alpha/beta stage so I’m writing down its potential weaknesses so the developers might read them and if they see fit, they can add those features. Furthermore, maybe other users can comment on things I say if they feel the same way.

Regards
Deniz

1 Like