Closed jczhang07 closed 2 months ago
Yes, you should use different buffers and run cusparseSpMV_preprocess()
with each buffer for your SpMVs respectively.
From my preliminary experiment, it seems I have to use the same external buffer for both y = Ax
and u = A^t v
. I am not sure that is the meaning of
The same external_buffer must be used for all cusparseSpMV calls. [CUSPARSE-1897]
at https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cusparse-release-12-6
The release note means that the same external buffer must be used for all SpMVs with a same matrix. Here, you have 2 SpMVs on different matrices A and A^t. Each SpMV needs to use its own buffer, and they can't use different buffers for all SpMV calls.
There's a bug at the moment that you must use a same buffer for a matrix descriptor. To use a different buffer for A^t * v, you need to create a different matrix descriptor to perform SpMV with A^t.
Thanks, I now knew the crash in our CI is not my fault :)
Hello, See https://docs.nvidia.com/cuda/cusparse/#cusparsespmv.
Suppose I want to compute both
y = Ax
andu = A^t v
with the same matrixA
, do I need to callcusparseSpMV_bufferSize()
andcusparseSpMV_preprocess()
twice, one forCUSPARSE_OPERATION_NON_TRANSPOSE
and the other forCUSPARSE_OPERATION_TRANSPOSE
, to get two external buffers, and use them selectively in the subsequentcusparseSpMV()
call?