-
Notifications
You must be signed in to change notification settings - Fork 34
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
Strategy of solving many SOCPs with GPU #31
Comments
The first thing is to make sure you have the latest GPU version which includes this commit which provides about 10x speedup. The other tricks would be to use warm-starting if the problems are closely related and to use the ability of cvxpy to parse the problem once and reuse it so you only pay cvxpy's cost once. |
I have tried to parse the problem with On checking whether I have the latest GPU version installed, what is the difference between using setup.py and the commit you provided? I followed the gpu-version installation on scs-python:
If there is no difference, how should I check whether I have the latest GPU version? If there is a difference, how should I use the file private.c to install the newest gpu-version scs (kind of confused on using that file)? Thanks for your help! |
OK in the Let me know if that makes it faster for you, hopefully should be a big speedup! |
Yeah, it helped me to some extent. I was wondering why |
The speedup depends a lot on the data structure and sparsity. You can use |
Hey, I'm (co-)maintaining the conda-forge feedstock for scs, and I didn't know that CUDA is supported. That's awesome, I'll try to add GPU builds to conda-forge as well. Looking at your quote, it sounds like it'd make a lot of sense to have a new release that includes the commit you mention? Do you have any plans to cut a new release, or would you be able to do that? |
Oh awesome, yes it would be great to get the gpu build into the conda package, thanks! I will cut a new github release, do you also need a new pypi release? |
Cool thanks! Either is fine. Are there some GPU-specific tests? Feel free to chime in in conda-forge/scs-feedstock#21 as well. 🙃 |
Ok, I cut a new SCS github release and a new Pypi release (v2.1.3). |
@bodono: just checking in quickly - I'd like to make sure we're not pushing out packages that don't work, but cannot find anything in this repo that would explicitly exercise the GPU paths. The CI in conda-forge/scs-feedstock#21 runs through without having any GPUs (but I could test the produced artefacts locally with a GPU), so presumably the SCS-code switches behaviour based on whether a GPU is available? |
Hi @h-vetinari , thanks again for doing all this work, and sorry for the delay in responding. This file checks if the gpu path can be imported, and if it can it will test the gpu code. I think that's all the tests I have for gpus unfortunately. I can probably turn that into a real test, but it won't be for a little while I'm afraid. |
There's now a separate issue for GPU tests: #40 |
Hi,
Suppose I want to solve a sequence (a lot) of SOCPs of small or moderate size, would you recommend utilizing GPU? I can solve a single SOCP with SCS solver (called from cvxpy) with option "gpu=True", but running with GPU seems slower than running with CPU in my case (small-size SOCP). Maybe the cost of transferring data to GPU prevails. Now if I want to solve a sequence of them, then the cost of running with GPU would be much higher than the cost of running with CPU, do you have any suggestions on that?
Thank you
The text was updated successfully, but these errors were encountered: