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

Something is embarrassingly slow (with current message passing backend?) #36

Closed
awintel opened this issue Nov 7, 2021 · 3 comments · Fixed by #87
Closed

Something is embarrassingly slow (with current message passing backend?) #36

awintel opened this issue Nov 7, 2021 · 3 comments · Fixed by #87
Assignees
Labels
area: magma/runtime Issues with something in lava/magma/runtime performance Relates to performance issues or performance enhancements of Lava

Comments

@awintel
Copy link
Contributor

awintel commented Nov 7, 2021

@ashishrao7's quadratic programming process in lava-optim seems to be super slow compared to a pure numpy implementation. Since the only main difference between the two implementation seems to be the event-based message passing in between, we need to figure out why that is the case.

@awintel awintel added performance Relates to performance issues or performance enhancements of Lava area: magma/runtime Issues with something in lava/magma/runtime labels Nov 7, 2021
@ashishrao7
Copy link
Collaborator

To provide more context the process model for the solver is shown below:
image
The update equations (top right) running in numpy take ~20ms for 1000 iterations. The process models implementing the same update equations in LAVA when run on the same machine take about 100 seconds for 1000 iterations.

@awintel
Copy link
Contributor Author

awintel commented Nov 8, 2021

Please also check what is setup time and what is actual execution time.

@ashishrao7
Copy link
Collaborator

ashishrao7 commented Nov 12, 2021

Adding the profiling results on some small QPs. Most of the time seems to be spent on some acquire method of a thread.lock object
Added scripts for problems of size
3x3 with 2 constraints => ports of size (3,1) and (2,1),
3x3QPprofiling.txt

4x4 with 3 constraints => ports of size (4,1) and (3,1)
4x4QPprofiling.txt

5x5 with 3 constraints => ports of size (5,1) and (3,1)
5x5QPprofiling.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: magma/runtime Issues with something in lava/magma/runtime performance Relates to performance issues or performance enhancements of Lava
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants