-
Notifications
You must be signed in to change notification settings - Fork 6
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
chore: Move parallel evaluation code to CircuitChunks
#528
Conversation
CircuitChunks
CircuitChunks
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #528 +/- ##
==========================================
+ Coverage 83.96% 84.00% +0.03%
==========================================
Files 61 61
Lines 6685 6700 +15
Branches 6191 6206 +15
==========================================
+ Hits 5613 5628 +15
- Misses 790 791 +1
+ Partials 282 281 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the PR! It looks like it improves the badger optimiser startup time quite a lot :)
I just have a small style suggestion.
@@ -440,7 +441,7 @@ where | |||
logger.log_best(circ_cost.clone(), num_rewrites); | |||
|
|||
let (joins, rx_work): (Vec<_>, Vec<_>) = chunks | |||
.iter_mut() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if this would improve the runtime, since the map
block below is mostly just about creating new threads. But a quick test showed that this whole let (joins, rx_works) = ...
block is now a lot faster!
On my laptop, trying multiple shots of
cargo run -p badger-optimiser --release -- -e test_files/eccs/nam_6_3.rwr -i
test_files/barenco_tof_10.json --split-circ -j N
while measuring the block time I get
Threads (N ) |
Block time with iter_mut |
with par_iter_mut |
Comparison |
---|---|---|---|
2 | 100ms | 57ms | 0.57 |
10 | 719ms | 471ms | 0.65 |
resolves #266