-
-
Notifications
You must be signed in to change notification settings - Fork 855
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
Need kmax = min(m,n) number of singular values in cupyx.scipy.sparse.linalg.svds
#8636
Comments
Thanks for your report and interest in contributing to CuPy. I'd like to see the output you're reporint, so would you share some input to reproduce the result with us? |
Right now, for example with this code:
The max value I can give k for getting result is k=77 which gives me at max 77 singular values. This is the error for k=78, 79:
and for k=80 the code is not compatible. I want to make it work for k=80 (which is min(80, 100)) for a particular use case in a project. Please guide me how should I proceed with this? |
Thanks for sharing the reproducer. I can see the result you reported. Seems that the default value of CuPy: cupy/cupyx/scipy/sparse/linalg/_eigen.py Lines 69 to 72 in ff2846e
If you're interested, would you make a PR that fixes this issue as well as tests the case? We have tests for svds in There are some pointers to contribute to CuPy: |
Thanks for this information, I have rectified it in my fork and will create a PR for it by today. Can you also look into this:
|
|
Hi @takagi Could you please share some resources to help me get started on this? It's currently a major bottleneck in our pipeline. |
You can find proback's code below: Porting proback to cupy may not be an easy task, and I'm not sure if proback on GPU have enough performance improvement you need in your lab. Are the sparse matrices you're handling too large for computing on CPU with Scipy? |
@takagi Actually, we were using it for some CFD simulations, and in our use case number of singular values should be equal to min(m,n) for further processing. Thanks for your help. |
Description
In the scipy's implementation of svds we can get the number of singular values to be at max equal to min(M,N) using propack solver. I needed this particular implementation in the cupy's version of svds (where kmax is mandatorily lesser then min(M,N) )for a project that I am working in IIT Bombay's structure lab.
Can anyone guide me how to add this?
Check the scipy's implementation:
Number of singular values and singular vectors to compute. Must satisfy 1 <= k <= kmax, where kmax=min(M, N) for solver='propack' and kmax=min(M, N) - 1 otherwise.
Additional Information
No response
The text was updated successfully, but these errors were encountered: