-
Notifications
You must be signed in to change notification settings - Fork 79
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
Mut chunks for VeryPacked Base and Secure columns. #842
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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 2 files at r1, all commit messages.
Reviewable status: 1 of 2 files reviewed, 3 unresolved discussions (waiting on @Alon-Ti)
crates/prover/src/core/backend/simd/column.rs
line 223 at r1 (raw file):
const N_ELEMS: usize = N_LANES * N_VERY_PACKED_ELEMS; pub fn at(&self, index: usize) -> BaseField { self.0[index / Self::N_ELEMS].to_array()[index % N_LANES]
I'm not sure it's correct.
Do we have tests for this code?
Suggestion:
self.0[index / Self::N_ELEMS].to_array()[index % self::N_ELEMS]
crates/prover/src/core/backend/simd/column.rs
line 227 at r1 (raw file):
pub fn set(&mut self, index: usize, value: BaseField) { let mut packed = self.0[index / Self::N_ELEMS].to_array();
Rename?
Suggestion:
let mut packed_as_array = self.0[index / Self::N_ELEMS].to_array();
crates/prover/src/core/backend/simd/column.rs
line 519 at r1 (raw file):
.iter() .flat_map(|x| x.to_array()) .take(self.length)
Why do you need this? Don't you always want all the values?
Code quote:
.take(self.length)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #842 +/- ##
==========================================
- Coverage 91.86% 91.55% -0.31%
==========================================
Files 89 89
Lines 12080 12135 +55
Branches 12080 12135 +55
==========================================
+ Hits 11097 11110 +13
- Misses 876 918 +42
Partials 107 107
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.
Reviewable status: 1 of 2 files reviewed, 4 unresolved discussions (waiting on @Alon-Ti)
crates/prover/src/core/backend/simd/column.rs
line 220 at r1 (raw file):
pub struct VeryPackedBaseColumnMutSlice<'a>(pub &'a mut [VeryPackedBaseField]); impl<'a> VeryPackedBaseColumnMutSlice<'a> {
This entire impl can be removed
Code quote:
impl<'a> VeryPackedBaseColumnMutSlice<'a> {
2c88349
to
44cfa96
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: 1 of 2 files reviewed, 4 unresolved discussions (waiting on @shaharsamocha7)
crates/prover/src/core/backend/simd/column.rs
line 220 at r1 (raw file):
Previously, shaharsamocha7 wrote…
This entire impl can be removed
Done.
crates/prover/src/core/backend/simd/column.rs
line 223 at r1 (raw file):
Previously, shaharsamocha7 wrote…
I'm not sure it's correct.
Do we have tests for this code?
Removed.
crates/prover/src/core/backend/simd/column.rs
line 227 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Rename?
Removed.
crates/prover/src/core/backend/simd/column.rs
line 519 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Why do you need this? Don't you always want all the values?
That's specifically what length is for, so you can have vectors of length finer than whatever the packing is, the cpu impl would just save them at the correct length.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Alon-Ti)
This change is