Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] GPU-support with CuPy #679

Open
jakorostami opened this issue Sep 23, 2023 · 1 comment
Open

[FEATURE REQUEST] GPU-support with CuPy #679

jakorostami opened this issue Sep 23, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jakorostami
Copy link

Hi!

I've been working with this package and found a bottleneck (atleast for my PC) when working with high-dimensional matrices. There is no GPU support from what I can see. It is relying on joblib (sklearn feature) for speeding up computation on the CPU.

For instance, taking a high-dimensional matrix of shape 3000x112000 (yes, 112 000) with the _time_delay_embedding with CuPy
delay=1, dimensions=3, and stride=1 takes about 1-1.5 seconds to compute and return whilst NumPy takes around 10-11 seconds.

I looked into the source code and saw that everything can be replaced with CuPy for the features that are defined by giotto-tdasimply by replacing with import cupy as cp and replacing all np. with cp. For inherited codebase like sklearn, then sklearn inherited code has to be changed as well to run on CuPy.

This would help to run TakensEmbedding. CollectionTransformer(PCA()), VietorisRipsPersistence, PersistenceEntropy in a pipeline.

I believe this would put giotto-tda at the forefront when doing Topological Signal Processing for audio data.

Thanks!

PC setup:

i5-9600K
48GB RAM
1TB SSD
RTX 3060 12GB RAM

@jakorostami jakorostami added the enhancement New feature or request label Sep 23, 2023
@matteocao
Copy link
Contributor

This would be a very nice feature, but we currently lack personnel to implement such big improvments. Any chance you would like to make a PR with the GPU support @jakorostami ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants