About some deprecated functions of the cuSPARSE library

Hello,

I’ve seen that the functions cusparsennz_compress() and cusparseXpruneCsr2csr() are marked as deprecated. My understanding is that these functions will be removed in the next major release so I thought I should explain why these functions are important for the geophysical problems I’m dealing with.

The most computationally challenging problem in geophysics is to solve a linear equation such as Ax=b to obtain the vector x. In this equation set, b is a dense vector and A is a sparse matrix obtained by numerical methods such as finite differences or finite elements. Especially for finite elements, creating the sparse matrix A could be very time-consuming and for that reason, I use GPUs to create this sparse matrix in addition to solving the equations.

In my algorithm, while building this sparse matrix on a GPU in CSR format, I have to add some zero-valued entries into the sparse matrix (due to my implementation detail). Afterward, I remove those zero entries with using the nnz_compress or pruneCsr2csr functions. So these functions are very crucial for me, if they are not replaced with something else, I believe I cannot build my sparse matrices on GPUs.

In short, I’d like to report that these functions are very useful for my case and I want to be able to use them in the future.

Regards
Deniz

thanks for the feedback. We will consider providing a replacement with the generic APIs or maintaining the legacy routines.

Hi, @fbusato

Regarding the deprecation of the cusparseXpruneCsr2csr API, we are currently leveraging it as part of our solution. Our model generates softmax scores over a very large vocabulary, and we use this function to prune the results based on a threshold before further processing. Could you please let us know if there are any recommended alternatives following the deprecation?

Hi @toothache9010. Thanks for letting us know your use case. We haven’t had alternatives for
cusparseXpruneCsr2csr now. Thus, we’ll keep it until we introduce a generic API for this functionality.

1 Like

Thank you!

In addition to cusparseXpruneCsr2csr, we also use cusparseXpruneDense2csr, which, as far as I know, currently has no alternative for threshold-based pruning. Could you confirm if this function will also remain available?

Yes. It still will be available.