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

Speed up subproblem #10

Merged
merged 6 commits into from
Apr 18, 2024
Merged

Speed up subproblem #10

merged 6 commits into from
Apr 18, 2024

Conversation

phschiele
Copy link
Collaborator

@phschiele phschiele commented Apr 17, 2024

Timings in seconds for the original QP/quad form formulation vs the updated formulation.
The number is the total time spent in the subproblem across the 10 iterations of the CPU version of the deepinvtesting notebook.

Solver QP sum_squares
Clarabel 256 400
MOSEK 431* 38
OSQP 94 114

*spent a lot of time in linear dependency checker step

Can speed up some more (guess: ~10-15%) by using parameters in CVXPY.
Could mention that switching the solver can have big performance impact in docs, and make the solver choice configurable.

@fabian-sp
Copy link
Owner

Adding here some stats for the example_residual with d=256, m=32

OSQP:

The whole time spent in self.SP.solve is around 0.05 sec per iter.
The pure cvxpy solve time (SP.solve_time) is around 0.03 sec per iter.

Clarabel:

The whole time spent in self.SP.solve is around 0.1 sec per iter.
The pure cvxpy solve time (SP.solve_time) is around 0.06 sec per iter.

Main question: can we speed up the time not spent for solving (that is, ca 0.02 sec for OSQP), with Parameters?

@fabian-sp
Copy link
Owner

After changing the seed, tests now also pass for me locally

@fabian-sp fabian-sp merged commit 7a1c796 into f-torch-sampling Apr 18, 2024
2 checks passed
@fabian-sp fabian-sp deleted the p-speed-up-qp branch April 18, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants