-
Notifications
You must be signed in to change notification settings - Fork 107
feat(concurrency): implement Default for ConcurrencyConfig #1952
feat(concurrency): implement Default for ConcurrencyConfig #1952
Conversation
13eb747
to
4642dca
Compare
669e636
to
89932c8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1952 +/- ##
=======================================
Coverage 78.17% 78.17%
=======================================
Files 62 62
Lines 8842 8842
Branches 8842 8842
=======================================
Hits 6912 6912
Misses 1492 1492
Partials 438 438 ☔ View full report in Codecov by Sentry. |
89932c8
to
53ff368
Compare
4642dca
to
544be6f
Compare
53ff368
to
3ea071a
Compare
544be6f
to
1415441
Compare
83a8c9d
to
ab6459d
Compare
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @barak-b-starkware, @MohammadNassar1, @noaov1, and @Yoni-Starkware)
crates/blockifier/src/blockifier/config.rs
line 15 at r1 (raw file):
impl Default for ConcurrencyConfig { fn default() -> Self { Self { enabled: false, n_workers: 64, chunk_size: 4 }
n_workers
and chunk_size
here have swapped values from the default consts in utils.rs
.
Why don't you use the constants here?
Suggestion:
Self { enabled: false, n_workers: 4, chunk_size: 64 }
crates/blockifier/src/concurrency/utils.rs
line 15 at r1 (raw file):
pub const DEFAULT_CHUNK_SIZE: usize = 64; pub const DEFAULT_N_WORKERS: usize = 4;
Ittay Dror said we should determine the number of workers automatically based on the actual hardware we are running on. Otherwise, we would have to reconfigure the batcher each time we change the machine it is running on.
This is probably not in the scope of this PR, but maybe add a TODO somewhere?
Nonblocking.
Code quote:
pub const DEFAULT_N_WORKERS: usize = 4;
1415441
to
7f99a32
Compare
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avi-starkware, @MohammadNassar1, @noaov1, @OriStarkware, and @Yoni-Starkware)
crates/blockifier/src/blockifier/config.rs
line 15 at r1 (raw file):
Previously, avi-starkware wrote…
n_workers
andchunk_size
here have swapped values from the default consts inutils.rs
.Why don't you use the constants here?
Done.
To use constants from the concurrency
module, we need to find some workaround since the concurrency
module can be seen only when adding --feartures=concurrency
.
I think we can remove the #[cfg(feature = concurrency)]
.
crates/blockifier/src/concurrency/utils.rs
line 15 at r1 (raw file):
Previously, avi-starkware wrote…
Ittay Dror said we should determine the number of workers automatically based on the actual hardware we are running on. Otherwise, we would have to reconfigure the batcher each time we change the machine it is running on.
This is probably not in the scope of this PR, but maybe add a TODO somewhere?
Nonblocking.
Removed from this PR.
ab6459d
to
0ff98da
Compare
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.
Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @MohammadNassar1, @noaov1, @OriStarkware, and @Yoni-Starkware)
7f99a32
to
17e6209
Compare
0ff98da
to
5f969f5
Compare
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.
Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @MohammadNassar1, @noaov1, and @OriStarkware)
5f969f5
to
e54a9a4
Compare
f0df83a
to
43bdffe
Compare
e54a9a4
to
c85364c
Compare
6140939
to
41307ad
Compare
c85364c
to
eacfd9b
Compare
2d02615
to
81163fa
Compare
eacfd9b
to
1117635
Compare
81163fa
to
0308a90
Compare
1117635
to
268fcab
Compare
0308a90
to
1ffb398
Compare
268fcab
to
038132b
Compare
1ffb398
to
4868ea8
Compare
038132b
to
f992363
Compare
4868ea8
to
3719ff4
Compare
8b18f10
to
12572b9
Compare
3719ff4
to
e41aa81
Compare
The base branch was changed.
12572b9
to
1f84a68
Compare
1f84a68
to
cf5a729
Compare
This change is