cusparseSpMV_bufferSize for SELL matrix


I recently met a problem: cusparseSpMV_bufferSize() returns a bufferSize of 0 byte, with a CUSPARSE_STATUS_SUCCESS return value. This happens with a Sliced-ELL format matA. I’ve checked all the inputs and they are all correctly initialized before passing to this function.

Then I just allocate a random size of buffer(e.g. 10000 bytes) on the device and pass it to do cusparseSpMV. The solve is successful.

Then, I notice in the documentation it states:

The routine requires extra storage for CSR/CSC format (all algorithms) and for COO format with CUSPARSE_SPMV_COO_ALG2 algorithm.

Does it mean that for Sliced-ELL format, it actually doesn’t need extra workspace, which leads to a 0 bufferSize returned? Thanks in advance.


Hi @417luke318,
Correct. CUSPARSE_SPMV_SELL_ALG1 does not need extra workspace. We will update the documentation to clarify this point.


Thanks @malmasri !

Hi @malmasri , I do have another question about the SELL SpMV.

So in some cases, the matrixA is padded with some extra zero-rows at the end, which means we have to pad the right-hand-side vector as well with some extra zeros in the end. But apparently, padding rhs is not requested from cusparseSpMV routine. So I assume that it is done internally. Can you confirm it? Or do I misunderstand somehow. Thank you a lot.

Hi @417luke318,
Yes, padding the RHS vector is not required by SELL SpMV.


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.