-
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 Bitwise Xor to Preprocessed Column Enum #380
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c272e6c
to
c0071cd
Compare
3371f4d
to
5a55c1a
Compare
c0071cd
to
2b943c5
Compare
956615f
to
fdf98c9
Compare
2b943c5
to
55c4d13
Compare
fdf98c9
to
4993f46
Compare
55c4d13
to
e3bc6ac
Compare
4993f46
to
224e469
Compare
e3bc6ac
to
0990462
Compare
6e87c7c
to
e5e2a1d
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.
I dont think the enum was correct here, if all you do is trivially expose the structs' methods, this is what a dyn trait is for.
Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @alon-f, @andrewmilson, @Gali-StarkWare, and @shaharsamocha7)
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 55 at r2 (raw file):
} /// Generates a column according to the preprocessed column chosen.
not sure this adds information
Code quote:
/// Generates a column according to the preprocessed column chosen.
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 70 at r2 (raw file):
} /// Returns the values of the column at the given row.
this is less correct than the function's name
Code quote:
/// Returns the values of the column at the given row.
0990462
to
9af63ed
Compare
e5e2a1d
to
457af27
Compare
9af63ed
to
e10f225
Compare
457af27
to
dae840e
Compare
bf7cb1d
to
66509a5
Compare
bc5a93f
to
e800704
Compare
66509a5
to
efc8fd3
Compare
e800704
to
f9def60
Compare
efc8fd3
to
6d40dc9
Compare
8f27867
to
25cf96b
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 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @alon-f, @andrewmilson, @Gali-StarkWare, and @ohad-starkware)
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 35 at r5 (raw file):
} pub enum PreProcessedColumn {
@Gali-StarkWare can you add a TODO to change the enum to a trait?
Code quote:
pub enum PreProcessedColumn {
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 @alon-f, @andrewmilson, @ohad-starkware, and @shaharsamocha7)
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 35 at r5 (raw file):
Previously, shaharsamocha7 wrote…
@Gali-StarkWare can you add a TODO to change the enum to a trait?
Already done
25cf96b
to
21b338f
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, 1 unresolved discussion (waiting on @alon-f, @andrewmilson, and @ohad-starkware)
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: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @alon-f, @andrewmilson, @Gali-StarkWare, and @shaharsamocha7)
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 65 at r3 (raw file):
Previously, Gali-StarkWare wrote…
I wanted to have it as a default implementation as a step before removing the rest of the gen_column_simd from the structs. That might be a reason why we would keep packed_at inside the trait when we switch to it. For now, done.
I agree, exposing packed_at so you can have a generic collect function (same as in pack_values)
albeit, it would be in a different trait.
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 162 at r6 (raw file):
let col: Col<SimdBackend, BaseField> = (0..((1 << self.log_size()) / N_LANES)) .flat_map(|i| self.packed_at(i).to_array()) .collect();
why do you need that to_array, try collecting the packed elements in to a vector?
Code quote:
let col: Col<SimdBackend, BaseField> = (0..((1 << self.log_size()) / N_LANES))
.flat_map(|i| self.packed_at(i).to_array())
.collect();
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: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @alon-f, @andrewmilson, @ohad-starkware, and @shaharsamocha7)
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 65 at r3 (raw file):
Previously, ohad-starkware (Ohad) wrote…
I agree, exposing packed_at so you can have a generic collect function (same as in pack_values)
albeit, it would be in a different trait.
OK
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 162 at r6 (raw file):
Previously, ohad-starkware (Ohad) wrote…
why do you need that to_array, try collecting the packed elements in to a vector?
I couldn't without errors, you can suggest if you find a way
6d40dc9
to
b8dd76c
Compare
21b338f
to
cb12a09
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: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @alon-f, @andrewmilson, @Gali-StarkWare, and @shaharsamocha7)
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 155 at r7 (raw file):
.collect(); CircleEvaluation::new(CanonicCoset::new(self.log_size()).circle_domain(), col) }
Suggestion:
pub fn gen_column_simd(&self) -> CircleEvaluation<SimdBackend, BaseField, BitReversedOrder> {
CircleEvaluation::new(
CanonicCoset::new(self.log_size()).circle_domain(),
BaseColumn::from_simd(
(0..(1 << (self.log_size() - LOG_N_LANES)))
.map(|i| self.packed_at(i))
.collect(),
),
)
}
cb12a09
to
af0097b
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: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @alon-f, @andrewmilson, @ohad-starkware, and @shaharsamocha7)
stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
line 155 at r7 (raw file):
.collect(); CircleEvaluation::new(CanonicCoset::new(self.log_size()).circle_domain(), col) }
You got it
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 1 files at r8, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @alon-f, @andrewmilson, and @shaharsamocha7)
This change is