Cupy: Sparse SVD Implementation

Created on 2 Aug 2019  路  4Comments  路  Source: cupy/cupy

My current understanding is that SVD/TSVD may be available in cuSparse. @jeaton32 is exploring adding more sparse functionality. @davidsebfischer is interested in sparse GPU functionality as a user -- most of the data he works with is sparse and PCA is critical for operational is the single cell analysis space.

@davidsebfischer can speak to the flavor of SVD you required ? Would TSVD work ?

feature contribution-welcome

Most helpful comment

@venkywonka has built an LOBPCG solver in cupy for cuML. Specifically, we would like to use this to implement sparse TSVD. The LinearOperator API has also been implemented in his PR, which will allow us to implement PCA w/ the implicit mean centering trick (see related Scikit-learn issue).

If @venkywonka's Cupy-based LOBPCG implementation were to live in Cupy instead of cuML, we would be able to support the option solver='lobpcg' in cupyx.scipy.sparse.linalg.svds and just precondition with a LinearOperator in PCA to support sparse inputs by mean centering right in the solver (see implementation by Facebook).

All 4 comments

Thanks for the issue, @quasiben! TSVD is great, it is the current default for sparse matrices in our workflows.

@danielhanchen has been working on a Sparse RSVD primitive in cuML using cuSparse and cuSolver [1]

If we find that it brings a great benefit to performance, we'd love to support getting this functionality into cupy.

[1] https://github.com/rapidsai/cuml/pull/1298

@venkywonka has built an LOBPCG solver in cupy for cuML. Specifically, we would like to use this to implement sparse TSVD. The LinearOperator API has also been implemented in his PR, which will allow us to implement PCA w/ the implicit mean centering trick (see related Scikit-learn issue).

If @venkywonka's Cupy-based LOBPCG implementation were to live in Cupy instead of cuML, we would be able to support the option solver='lobpcg' in cupyx.scipy.sparse.linalg.svds and just precondition with a LinearOperator in PCA to support sparse inputs by mean centering right in the solver (see implementation by Facebook).

@venkywonka has built an LOBPCG solver in cupy for cuML. Specifically, we would like to use this to implement sparse TSVD. The LinearOperator API has also been implemented in his PR, which will allow us to implement PCA w/ the implicit mean centering trick (see related Scikit-learn issue).

If @venkywonka's Cupy-based LOBPCG implementation were to live in Cupy instead of cuML, we would be able to support the option solver='lobpcg' in cupyx.scipy.sparse.linalg.svds and just precondition with a LinearOperator in PCA to support sparse inputs by mean centering right in the solver (see implementation by Facebook).

hey @cjnolet , although I have implemented LOBPCG solver in cupy in cuML, I have not implemented the LinearOperator feature that scipy contains. The corresponding places, instead, use simple cupy matrix multiplication. Just wanted to clarify. That said, I'm all in for redirecting the contributions to cupy repo 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asi1024 picture asi1024  路  3Comments

Bartzi picture Bartzi  路  4Comments

kmaehashi picture kmaehashi  路  3Comments

ma-sadeghi picture ma-sadeghi  路  3Comments

rafael-fuente picture rafael-fuente  路  3Comments