-
Notifications
You must be signed in to change notification settings - Fork 80
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
Modify bit_reverse for SIMD backend #594
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 05-02-Add_bit_reverse_for_SIMD_backend #594 +/- ##
==========================================================================
+ Coverage 91.24% 91.33% +0.09%
==========================================================================
Files 76 76
Lines 9529 9560 +31
Branches 9529 9560 +31
==========================================================================
+ Hits 8695 8732 +37
+ Misses 763 757 -6
Partials 71 71 ☔ View full report in Codecov by Sentry. |
0143448
to
9bd0fc4
Compare
faed46b
to
d56ea1d
Compare
e9ed60d
to
aca433d
Compare
bf357b0
to
ce999c2
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 all commit messages.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @andrewmilson)
a discussion (no related file):
Same here, do a first commit with just copying
ce999c2
to
e04a2f6
Compare
738f4bf
to
c8d160c
Compare
e04a2f6
to
9ccaf1f
Compare
c8d160c
to
5f8512f
Compare
9ccaf1f
to
c13b2e1
Compare
5f8512f
to
2774e5b
Compare
c13b2e1
to
4265dcb
Compare
4265dcb
to
b2f874d
Compare
2774e5b
to
2e79a5f
Compare
1a84c3c
to
a6a991b
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 all commit messages.
Reviewable status: 0 of 2 files reviewed, 5 unresolved discussions (waiting on @andrewmilson and @spapinistarkware)
crates/prover/src/core/backend/simd/bit_reverse.rs
line 124 at r2 (raw file):
} unsafe { transmute(data) }
Suggestion:
Have from_simd func?
Code quote:
unsafe { transmute(data) }
crates/prover/src/core/backend/simd/bit_reverse.rs
line 139 at r2 (raw file):
use crate::core::backend::Column; use crate::core::fields::m31::BaseField; use crate::core::utils::bit_reverse as ground_truth_bit_reverse;
rename?
Suggestion:
cpu_bit_reverse
crates/prover/src/core/backend/simd/bit_reverse.rs
line 144 at r2 (raw file):
fn test_bit_reverse16() { let data: Aligned<A64, [u32; 256]> = Aligned(array::from_fn(|i| i as u32)); let mut expected: Aligned<A64, [u32; 256]> = data;
Can you explain/document why we need this Aligned?
Code quote:
let data: Aligned<A64, [u32; 256]> = Aligned(array::from_fn(|i| i as u32));
let mut expected: Aligned<A64, [u32; 256]> = data;
crates/prover/src/core/backend/simd/mod.rs
line 45 at r2 (raw file):
fn bit_reverse_column(_column: &mut Self::Column) { todo!()
Don't you implement also this one?
Code quote:
todo!()
a6a991b
to
314685b
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 2 files reviewed, 4 unresolved discussions (waiting on @shaharsamocha7 and @spapinistarkware)
crates/prover/src/core/backend/simd/bit_reverse.rs
line 139 at r2 (raw file):
Previously, shaharsamocha7 wrote…
rename?
Done.
crates/prover/src/core/backend/simd/bit_reverse.rs
line 144 at r2 (raw file):
Previously, shaharsamocha7 wrote…
Can you explain/document why we need this Aligned?
Removed, updated.
crates/prover/src/core/backend/simd/mod.rs
line 45 at r2 (raw file):
Previously, shaharsamocha7 wrote…
Don't you implement also this one?
Not for &mut [PackedSecureField] only for &mut [PackedBaseField]
545100b
to
8c4703f
Compare
314685b
to
f50af06
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 r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @spapinistarkware)
crates/prover/src/core/backend/simd/mod.rs
line 45 at r2 (raw file):
Previously, andrewmilson (Andrew Milson) wrote…
Not for &mut [PackedSecureField] only for &mut [PackedBaseField]
Why not? in another pr?
8c4703f
to
42b44b6
Compare
f50af06
to
3b8ca2d
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: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @shaharsamocha7 and @spapinistarkware)
crates/prover/src/core/backend/simd/mod.rs
line 45 at r2 (raw file):
Previously, shaharsamocha7 wrote…
Why not? in another pr?
Sure, it's not used anywhere at the moment AFAIK and it's not trivial. AVX backend has a bogus implementation of it too
42b44b6
to
db1d83a
Compare
3b8ca2d
to
501b9ea
Compare
db1d83a
to
adcb5b9
Compare
501b9ea
to
6e55592
Compare
adcb5b9
to
15e93af
Compare
6e55592
to
2719965
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 3 files at r4, 1 of 1 files at r5.
Reviewable status: all files reviewed (commit messages unreviewed), 2 unresolved discussions (waiting on @andrewmilson)
crates/prover/src/core/backend/simd/bit_reverse.rs
line 119 at r5 (raw file):
for _ in 0..4 { // Apply the abcd:0123 => 0abc:123d permutation. // `LoLoInterleaveHiLo` allows us to interleave the first half of 2 words.
I don't see any reference for this (before as well). Maybe skip it, and just keep the interleave.
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 (commit messages unreviewed), 1 unresolved discussion (waiting on @andrewmilson)
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.
with one comment
Reviewed 1 of 3 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @andrewmilson)
15e93af
to
da34ddc
Compare
2719965
to
e4f0cbb
Compare
This change is