-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add Range Check 128 Builtin Files #371
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4540370
to
4432a98
Compare
4432a98
to
755b942
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 4 of 4 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @shaharsamocha7)
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 1 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @andrewmilson and @Gali-StarkWare)
stwo_cairo_prover/crates/prover/src/components/range_check_builtin_bits_128/prover.rs
line 46 at r1 (raw file):
} impl ClaimGenerator { pub fn new(n_rows: usize, range_check_builtin_segment_start: u32) -> Self {
Let's assert here the n_rows is a power of 2
Code quote:
pub fn new(n_rows: usize, range_check_builtin_segment_start: u32) -> Self {
stwo_cairo_prover/crates/prover/src/components/range_check_builtin_bits_128/prover.rs
line 211 at r1 (raw file):
#[allow(clippy::needless_range_loop)] for i in 0..N_LANES { if bit_reverse_index(
We are in the case that all the rows are not padded and thus this if will always pass
Can you remove?
stwo_cairo_prover/crates/prover/src/components/range_check_builtin_bits_128/prover.rs
line 269 at r1 (raw file):
logup_gen.finalize_at([(1 << log_size) - 1, self.n_rows - 1]); (trace, total_sum, Some((claimed_sum, self.n_rows - 1))) };
replace
Suggestion:
let (trace, claimed_sum) = logup_gen.finalize_last();
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, 4 unresolved discussions (waiting on @andrewmilson and @Gali-StarkWare)
stwo_cairo_prover/crates/prover/src/components/range_check_builtin_bits_128/component.rs
line 28 at r1 (raw file):
#[derive(Copy, Clone, Serialize, Deserialize, CairoSerialize)] pub struct Claim { pub n_rows: usize,
Consider to change this to log_size
Suggestion:
pub log_size: usize,
755b942
to
5411574
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, 4 unresolved discussions (waiting on @andrewmilson and @shaharsamocha7)
stwo_cairo_prover/crates/prover/src/components/range_check_builtin_bits_128/component.rs
line 28 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Consider to change this to log_size
Done.
stwo_cairo_prover/crates/prover/src/components/range_check_builtin_bits_128/prover.rs
line 46 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Let's assert here the n_rows is a power of 2
Changed to log_size
stwo_cairo_prover/crates/prover/src/components/range_check_builtin_bits_128/prover.rs
line 211 at r1 (raw file):
Previously, shaharsamocha7 wrote…
We are in the case that all the rows are not padded and thus this if will always pass
Can you remove?
Done.
stwo_cairo_prover/crates/prover/src/components/range_check_builtin_bits_128/prover.rs
line 269 at r1 (raw file):
Previously, shaharsamocha7 wrote…
replace
Done.
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 2 of 2 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @andrewmilson)
5411574
to
125e8d7
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: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @andrewmilson and @shaharsamocha7)
stwo_cairo_prover/crates/prover/src/components/range_check_builtin_bits_128/prover.rs
line 62 at r3 (raw file):
SimdBackend: BackendForChannel<MC>, { let log_size = self.log_size;
I see we don't always work with max(log_size, LOG_N_LANES), maybe I can initialise it with it (after checking that the received log_size != 0) and then we don't have to remember to apply it everywhere?
125e8d7
to
f6a0bb9
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 2 of 2 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @andrewmilson)
f6a0bb9
to
80c32dd
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 1 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @andrewmilson)
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)