NVIDIA / CUDALibrarySamples

CUDA Library Samples
Other
1.62k stars 348 forks source link

how to implement batch spmv #210

Open zhouq123 opened 3 months ago

zhouq123 commented 3 months ago

i have batch matrix A and vector B, how to implement batch spmv

qanhpham commented 3 months ago

Hi @zhouq123, are matrices in the batch different from each other? Do they multiply with the same vector or vectors are different in the batch?

fbusato commented 3 months ago

please also note that the code should be similar to batched SpMM https://github.com/NVIDIA/CUDALibrarySamples/tree/master/cuSPARSE/spmm_csr_batched

zhouq123 commented 3 months ago

Hi @zhouq123, are matrices in the batch different from each other? Do they multiply with the same vector or vectors are different in the batch?

yes, they are all different from each other

zhouq123 commented 3 months ago

please also note that the code should be similar to batched SpMM https://github.com/NVIDIA/CUDALibrarySamples/tree/master/cuSPARSE/spmm_csr_batched

but there is an error "spmm_csr_batched_example test FAILED: wrong result" when I set B_num_cols to 1 in the example of spmm_csr_batched or spmm_coo_batched

qanhpham commented 3 months ago

This bug has been fixed in the latest version. Please upgraded to the latest cuSPARSE to avoid this issue.

zhouq123 commented 2 months ago

This bug has been fixed in the latest version. Please upgraded to the latest cuSPARSE to avoid this issue.

the latest version is cuda toolkit or CUDALibrarySamples? I had upgraded to the latest CUDALibrarySamples but this issue is still exist.