Hi,
I have a basic preconditioned conjugate gradient (CG) routine that solves the Ax=b linear system with a preconditioner matrix M. The preconditioner matrix is split into two triangular matrices by ILU(0). Afterwards, in each CG iteration, those triangular matrices are applied to a vector via SpSV or SpSM functions.
My question, or in better words, my feature request is this: during the analyses phase of SpSV, I have to allocate two buffers, both for the backward sweep and for the forward sweep. I’ve realized I cannot use a single buffer for both operations. I think I’m right on this one.
The problem is this: for small matrices, the buffer size can be considered negligible, but I want to give you some numbers. I have a matrix A in CSR format that consumes around 4.5GB of VRAM; at the same time, I have a preconditioner matrix that consumes ~2GB of VRAM. I realized that those two buffers allocate 2.4GB of memory for each of them. That means 4.8GB of memory is just allocated for sparse triangular solutions. That is a lot of memory, and I think I cannot use a single buffer and save at least 2.4GB of memory.
In short, I wish I could use a single buffer for those sparse operations and save some memory space in the future.
Regards
Deniz