-
Notifications
You must be signed in to change notification settings - Fork 93
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
Use precomputed twiddles in avx #443
Use precomputed twiddles in avx #443
Conversation
Your org has enabled the Graphite merge queue for merging into devAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account in order to use the merge queue. Sign up using this link. |
8fff079
to
6aa41bc
Compare
30e1f97
to
86da951
Compare
6aa41bc
to
41f6f0a
Compare
86da951
to
37bb799
Compare
655019f
to
0b60491
Compare
87f6b9f
to
686f51a
Compare
0b60491
to
e2fa88e
Compare
686f51a
to
14ccf9d
Compare
e2fa88e
to
24220ed
Compare
14ccf9d
to
0857a54
Compare
24220ed
to
52a6ea3
Compare
0857a54
to
6accca8
Compare
52a6ea3
to
034a430
Compare
6accca8
to
db9ada9
Compare
034a430
to
07065a8
Compare
7b2d0e0
to
b710ea6
Compare
07065a8
to
b0988f6
Compare
b710ea6
to
917bf93
Compare
b0988f6
to
d6a9ea6
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 2 files at r2, 6 of 6 files at r4, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @spapinistarkware)
src/core/backend/avx512/circle.rs
line 22 at r4 (raw file):
// Decide if and when it's ok and what to do if it's not. impl PolyOps for AVX512Backend { type Twiddles = Vec<i32>;
I think that something should be written here w.r.t why the twiddle in the avx is a vec of i32.
Code quote:
type Twiddles = Vec<i32>
src/core/backend/avx512/circle.rs
line 118 at r4 (raw file):
&twiddles[layer_i] [i << (fft_log_size - 2 - layer_i)..(i + 1) << (fft_log_size - 2 - layer_i)] })
Why do we want this change?
Code quote:
let subdomain_twiddles = (0..(fft_log_size - 1))
.map(|layer_i| {
&twiddles[layer_i]
[i << (fft_log_size - 2 - layer_i)..(i + 1) << (fft_log_size - 2 - layer_i)]
})
src/core/backend/avx512/circle.rs
line 147 at r4 (raw file):
} fn precompute_twiddles(coset: Coset) -> TwiddleTree<Self> {
Do we maybe want the twiddles to be stored also in avx registers?
Code quote:
fn precompute_twiddles(coset: Coset) -> TwiddleTree<Self> {
src/core/backend/avx512/circle.rs
line 152 at r4 (raw file):
// TODO(spapini): Optimize. for layer in &rfft::get_twiddle_dbls(coset)[1..] {
Is this the only use of get_twiddle_dbls?
Why are we storing the layer0 twiddles there if we are going to ignore them anyway?
Code quote:
&rfft::get_twiddle_dbls(coset)[1..]
src/core/backend/avx512/circle.rs
line 155 at r4 (raw file):
twiddles.extend(layer); } twiddles.push(2);
Explain
Code quote:
twiddles.push(2)
cb666dd
to
7cf3a4c
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 7 files reviewed, 5 unresolved discussions (waiting on @shaharsamocha7)
src/core/backend/avx512/circle.rs
line 22 at r4 (raw file):
Previously, shaharsamocha7 wrote…
I think that something should be written here w.r.t why the twiddle in the avx is a vec of i32.
Done.
src/core/backend/avx512/circle.rs
line 118 at r4 (raw file):
Previously, shaharsamocha7 wrote…
Why do we want this change?
It seems that without it, I would need to access twiddles[layer_i-1]
, and doing the -1 is weird.
src/core/backend/avx512/circle.rs
line 147 at r4 (raw file):
Previously, shaharsamocha7 wrote…
Do we maybe want the twiddles to be stored also in avx registers?
Not all twiddles can, and its not that important.
Except for the first layer, only the first is loaded as an AVX register. The other are broadcasted.
src/core/backend/avx512/circle.rs
line 152 at r4 (raw file):
Previously, shaharsamocha7 wrote…
Is this the only use of get_twiddle_dbls?
Why are we storing the layer0 twiddles there if we are going to ignore them anyway?
Done.
src/core/backend/avx512/circle.rs
line 155 at r4 (raw file):
Previously, shaharsamocha7 wrote…
Explain
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 5 of 5 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @spapinistarkware)
src/core/backend/avx512/fft/ifft.rs
line 377 at r4 (raw file):
} pub fn get_itwiddle_dbls(mut coset: Coset) -> Vec<Vec<i32>> {
Document that this returns all the twiddles that relevant only for the line domains.
Code quote:
pub fn get_itwiddle_dbls(mut coset: Coset) -> Vec<Vec<i32>> {
7cf3a4c
to
3664014
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 @shaharsamocha7)
src/core/backend/avx512/fft/ifft.rs
line 377 at r4 (raw file):
Previously, shaharsamocha7 wrote…
Document that this returns all the twiddles that relevant only for the line domains.
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 r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @spapinistarkware)
Merge activity
|
<!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/starkware-libs/stwo/443) <!-- Reviewable:end -->
3664014
to
882e7f6
Compare
This change is