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

feat: Parallel taso with crossbeam #113

Merged
merged 15 commits into from
Sep 21, 2023
Merged

feat: Parallel taso with crossbeam #113

merged 15 commits into from
Sep 21, 2023

Conversation

aborgna-q
Copy link
Collaborator

@aborgna-q aborgna-q commented Sep 15, 2023

Simplifies the multithreading logic by using a multi-consumer channel.
Includes some small improvements to the TASO bin.

Now, why is this a draft:

I'm testing with barenco_tof_5_rm and Nam_6_3_complete_ECC_set on my 12-core laptop. Here are some results with a timeout of 10 seconds:

circuits seen after 10s best size after 10s
single-threaded 7244 178
-j 2 31391 204
-j 10 42690 204

There's something wrong somewhere :P
(note that -j N means N worker threads, plus the master)

@aborgna-q
Copy link
Collaborator Author

I moved the priority queue to the workers, leaving them to trim it instead of using a centralized one.
That works a lot better for avoiding dropping the good finds.

circuits seen after 10s best size after 10s
single-threaded 7244 178
-j 2 11973 178
-j 10 25763 189

Here I'm thinking that Luca's multiple threads may work better now, since we can ensure that batched "good results" are distributed evenly between the workers 🤔

@aborgna-q aborgna-q marked this pull request as ready for review September 20, 2023 16:23
@aborgna-q aborgna-q requested a review from lmondada September 20, 2023 16:23
Copy link
Contributor

@lmondada lmondada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking nice!

src/optimiser/taso.rs Outdated Show resolved Hide resolved
src/optimiser/taso.rs Outdated Show resolved Hide resolved
Co-authored-by: Luca Mondada <[email protected]>
@aborgna-q aborgna-q merged commit 4c76248 into main Sep 21, 2023
7 checks passed
@aborgna-q aborgna-q deleted the feat/parallel-taso branch September 21, 2023 10:52
ss2165 pushed a commit that referenced this pull request Sep 25, 2023
Simplifies the multithreading logic by using a multi-consumer channel.
Includes some small improvements to the TASO bin.


Now, why is this a draft:

I'm testing with `barenco_tof_5_rm` and `Nam_6_3_complete_ECC_set` on my
12-core laptop. Here are some results with a timeout of `10` seconds:

|            | circuits seen after 10s | best size after 10s |
| ----------------- | ------ | ---- |
| single-threaded | 7244 | 178 |
| -j 2 | 31391 | 204 |
| -j 10 | 42690 | 204 |

There's something wrong somewhere :P
(note that `-j N` means `N` worker threads, plus the master)

---------

Co-authored-by: Luca Mondada <[email protected]>
Co-authored-by: Luca Mondada <[email protected]>
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