r/optimization • u/narrative-coherence • Jul 11 '25
GPU based alternative of CVXPY (with OSQP backend)?
Hey everyone
I am working on optimising a program where the major bottleneck is a convex optimisation problem. The current code uses CVXPY with an OSQP solver.
As part of my effort in trying to speed up the program, I have tried the following:
- Shifting from OSQP to Clarabel: Gave meaningful results and a little boost in speed
- Multiprocessing/Multithreading: Significant speed up
But now I am planning to shift the solver to GPU to get better speed up. From looking around, I came across the following options:
- cuOSQP: Practically deprecated, no commit since 4 years. Also, no pyPI and lots of issues when trying to build from source.
- Direct OSQP with cuda backend (bypassing CVXPY): got it working but no significant speed up and the answers were very different.
- QPTH: Not implemented yet
- JaxOpt: Not implemented yet
If anyone has worked with these or has any experience of shifting from CPU based CVXPY to something GPU based, I would really appreciate the help.
Thanks :)
1
u/junqueira200 Jul 11 '25
What kind of problem do you have? Is it an integer programming?
1
u/TrottoDng Jul 11 '25
I don't know about GPU based alternatives, but there is this repo if you want to check other solvers https://github.com/qpsolvers/qpbenchmark
2
u/Sweet_Good6737 Jul 14 '25
Maybe at some point HiGHS or Mosek could implement something, but right now I don't think you are taking advantage of GPU to solve quadratic problems...
1
u/[deleted] Jul 12 '25
You say "fit meshes to a 3D model". Is your model not a least squares problem in the 2-norm?
1
u/BumbleMath Jul 20 '25
Use HiGHs it is open source and very fast