cub icon indicating copy to clipboard operation
cub copied to clipboard

SpMV with different matrix and vector types

Open michaelmigliore opened this issue 3 years ago • 3 comments

Right now, the SpMV kernel allows to specify the matrix and vector type by specializing the ValueT type.

In our case, our sparse matrix elements is stored in CRS format and the blocks are 3x3 matrices, and our vector elements are vector3.
In practice, the 3x3 blocks are 3 float4, and the vector3 is a float4, and we have defined the multiplication operator.

Do you think it's possible to separate the matrix type and the vector type in two different templated types?

michaelmigliore avatar Aug 03 '22 06:08 michaelmigliore

Hello, @michaelmigliore! We were posponing cub::DeviceSpmv deprecation for a while. At the moment we are going to deprecate it in CUB 2.1. Therefore, I don't anticipate any efforts on this facility from our end. Is there any chance you could use cuSPARSE instead?

gevtushenko avatar Aug 05 '22 10:08 gevtushenko

Unfortunately it seems like cusparseSpMV only supports real types, and not more complicated custom types.

michaelmigliore avatar Aug 05 '22 11:08 michaelmigliore

cuSPARSE SpMV is limited to real and complex data types and doesn't support custom operators. We plan to add JIT LTO to SpMV (similar to SpMMOp) in the future to support this feature. You could also consider bsrmv

fbusato avatar Aug 05 '22 17:08 fbusato

Closing as we are planning to deprecate cub::SpMV and not adding any new features.

jrhemstad avatar Feb 23 '23 16:02 jrhemstad