Skip to content

CPU Barycentric Evaluation and Test #1068

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

Draft
wants to merge 1 commit into
base: gali/barycentric
Choose a base branch
from

Conversation

Gali-StarkWare
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

Gali-StarkWare commented Apr 29, 2025

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a 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/constraints.rs line 37 at r1 (raw file):

}

pub fn coset_vanishing_derivative<F: ExtensionOf<BaseField>>(coset: Coset, p: CirclePoint<F>) -> F {

Which points are zeros for this function?
Why do we have exp = 4**(log_size - 1)?
document

Code quote:

pub fn coset_vanishing_derivative<F: ExtensionOf<BaseField>>(coset: Coset, p: CirclePoint<F>) -> F {

crates/prover/src/core/poly/circle/evaluation.rs line 165 at r1 (raw file):

// TODO(Gali): Remove.
#[allow(dead_code)]
fn weights(log_size: u32, sample_point: CirclePoint<SecureField>) -> Col<CpuBackend, SecureField> {

Is this going to be removed?
Or do we want to keep trivial weight calculation?

Code quote:

#[allow(dead_code)]
fn weights(log_size: u32, sample_point: CirclePoint<SecureField>) -> Col<CpuBackend, SecureField> {

crates/prover/src/core/poly/circle/evaluation.rs line 303 at r1 (raw file):

                .to_vec(),
        );
        let s = CanonicCoset::new(3);

Can we evaluate on a larger CanonicCoset here?

Code quote:

        let s = CanonicCoset::new(3);

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a 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, 3 unresolved discussions (waiting on @Alon-Ti and @Gali-StarkWare)


crates/prover/src/core/poly/circle/evaluation.rs line 165 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Is this going to be removed?
Or do we want to keep trivial weight calculation?

also we would probably need the talk to understand this code

@Gali-StarkWare Gali-StarkWare force-pushed the gali/cpu_barycentric branch from 92a5086 to 8abe2fe Compare May 14, 2025 07:25
@codecov-commenter
Copy link

codecov-commenter commented May 14, 2025

Codecov Report

Attention: Patch coverage is 99.26471% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.70%. Comparing base (61d1f6b) to head (bb9e718).

Files with missing lines Patch % Lines
crates/prover/src/core/poly/circle/evaluation.rs 99.16% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           gali/barycentric    #1068      +/-   ##
====================================================
+ Coverage             92.64%   92.70%   +0.06%     
====================================================
  Files                   106      106              
  Lines                 14273    14409     +136     
  Branches              14273    14409     +136     
====================================================
+ Hits                  13223    13358     +135     
- Misses                  969      970       +1     
  Partials                 81       81              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: bb9e718 Previous: 8b5436d Ratio
iffts/simd ifft/27 604473857 ns/iter (± 10795101) 277030291 ns/iter (± 5776193) 2.18
iffts/simd ifft/28 1223931924 ns/iter (± 18791726) 586165718 ns/iter (± 12065155) 2.09

This comment was automatically generated by workflow using github-action-benchmark.

CC: @shaharsamocha7

Copy link
Contributor Author

@Gali-StarkWare Gali-StarkWare left a 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, 3 unresolved discussions (waiting on @Alon-Ti, @Gali-StarkWare, and @shaharsamocha7)


crates/prover/src/core/constraints.rs line 37 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Which points are zeros for this function?
Why do we have exp = 4**(log_size - 1)?
document

Done.


crates/prover/src/core/poly/circle/evaluation.rs line 165 at r1 (raw file):

Previously, shaharsamocha7 wrote…

also we would probably need the talk to understand this code

I am in favor of keeping the cpu weight calculation, like you have the cpu version of eval_at_point


crates/prover/src/core/poly/circle/evaluation.rs line 303 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Can we evaluate on a larger CanonicCoset here?

Will do

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a 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 @Alon-Ti and @Gali-StarkWare)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants