Skip to content
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

Implement trace generator for fibonacci. #674

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

alonh5
Copy link
Contributor

@alonh5 alonh5 commented Jun 24, 2024

This change is Reviewable

Copy link
Contributor Author

alonh5 commented Jun 24, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @alonh5 and the rest of your teammates on Graphite Graphite

This was referenced Jun 24, 2024
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from f3e308f to c629f7d Compare June 25, 2024 08:38
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 5d208c1 to de2e6d8 Compare June 25, 2024 08:38
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from c629f7d to f39cfea Compare June 26, 2024 10:24
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from de2e6d8 to 7635b6b Compare June 26, 2024 10:24
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from f39cfea to 3aa5079 Compare June 27, 2024 10:56
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 7635b6b to 667d583 Compare June 27, 2024 10:57
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 90.13%. Comparing base (4231088) to head (9b98357).

Files Patch % Lines
crates/prover/src/trace_generation/mod.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #674      +/-   ##
==========================================
+ Coverage   90.09%   90.13%   +0.04%     
==========================================
  Files          75       76       +1     
  Lines       10053    10059       +6     
  Branches    10053    10059       +6     
==========================================
+ Hits         9057     9067      +10     
+ Misses        915      910       -5     
- Partials       81       82       +1     

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

@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from 3aa5079 to 673b1b3 Compare June 27, 2024 11:43
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 667d583 to 3c78c05 Compare June 27, 2024 11:43
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from 673b1b3 to 50be746 Compare June 30, 2024 08:32
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 3c78c05 to e710e4a Compare June 30, 2024 08:33
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from 50be746 to ca2c907 Compare July 1, 2024 10:48
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from e710e4a to 0fd6240 Compare July 1, 2024 10:48
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from ca2c907 to 2f0aac7 Compare July 1, 2024 11:10
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch 3 times, most recently from b5fcd66 to 84ef79b Compare July 1, 2024 11:57
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from 2f0aac7 to 0d56bd7 Compare July 2, 2024 12:58
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 84ef79b to 2d40280 Compare July 2, 2024 12:59
@alonh5 alonh5 marked this pull request as ready for review July 3, 2024 07:10
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 2d40280 to 6ff8f56 Compare July 3, 2024 07:13
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from 0d56bd7 to 93dd654 Compare July 3, 2024 07:49
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch 2 times, most recently from 483dabf to 45989be Compare July 3, 2024 07:52
Copy link
Collaborator

@ohad-starkware ohad-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 12 files at r3, all commit messages.
Reviewable status: 9 of 12 files reviewed, 2 unresolved discussions (waiting on @alonh5 and @shaharsamocha7)


crates/prover/src/examples/fibonacci/air.rs line 51 at r3 (raw file):

            .registry
            .get_generator::<FibonacciTraceGenerator>("fibonacci");
        // TODO(AlonH): Take instead of clone.

left by accident?


crates/prover/src/examples/fibonacci/component.rs line 137 at r3 (raw file):

#[derive(Clone)]
pub struct FibonacciTraceGenerator {

Option


crates/prover/src/examples/fibonacci/component.rs line 172 at r3 (raw file):

        registry: &mut ComponentGenerationRegistry,
    ) -> ColumnVec<CircleEvaluation<CpuBackend, BaseField, BitReversedOrder>> {
        let component = registry.get_generator_mut::<Self>(component_id);

Suggestion:

trace_generator

crates/prover/src/examples/wide_fibonacci/simd.rs line 53 at r3 (raw file):

// TODO(AlonH): Remove this once the Cpu and Simd implementations are aligned.
#[derive(Clone)]

The way to get rid of this struct is to have a separate WideFibSimdTraceGenerator and implementing TraceGenerator


crates/prover/src/trace_generation/mod.rs line 54 at r3 (raw file):

    fn write_trace(&mut self) -> Vec<CircleEvaluation<B, BaseField, BitReversedOrder>> {
        vec![]

temporary, right?

Copy link
Contributor Author

@alonh5 alonh5 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: 9 of 12 files reviewed, 2 unresolved discussions (waiting on @ohad-starkware and @shaharsamocha7)


crates/prover/src/examples/fibonacci/air.rs line 51 at r3 (raw file):

Previously, ohad-starkware (Ohad) wrote…

left by accident?

Yes, thanks.


crates/prover/src/examples/fibonacci/component.rs line 137 at r3 (raw file):

Previously, ohad-starkware (Ohad) wrote…

Option

WDYM?


crates/prover/src/examples/wide_fibonacci/simd.rs line 53 at r3 (raw file):

Previously, ohad-starkware (Ohad) wrote…

The way to get rid of this struct is to have a separate WideFibSimdTraceGenerator and implementing TraceGenerator

We will still need this struct then, it just own't implement TraceGenerator.


crates/prover/src/trace_generation/mod.rs line 54 at r3 (raw file):

Previously, ohad-starkware (Ohad) wrote…

temporary, right?

Yes, added a TODO to remove it.

@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch 2 times, most recently from 5e17a6e to 1e0cc3d Compare July 3, 2024 09:56
Copy link
Collaborator

@ohad-starkware ohad-starkware 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 12 files at r3, 2 of 3 files at r4.
Reviewable status: 11 of 12 files reviewed, all discussions resolved (waiting on @shaharsamocha7)


crates/prover/src/examples/fibonacci/component.rs line 139 at r4 (raw file):

pub struct FibonacciTraceGenerator {
    log_size: Option<u32>,
    claim: Option<BaseField>,

Suggestion:

input: Option<FibonacciInput>

@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 1e0cc3d to 1e85cf1 Compare July 3, 2024 10:04
Copy link
Contributor Author

@alonh5 alonh5 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: 10 of 12 files reviewed, all discussions resolved (waiting on @ohad-starkware and @shaharsamocha7)


crates/prover/src/examples/fibonacci/component.rs line 139 at r4 (raw file):

pub struct FibonacciTraceGenerator {
    log_size: Option<u32>,
    claim: Option<BaseField>,

Done.

Copy link
Collaborator

@ohad-starkware ohad-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @shaharsamocha7)

@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from 93dd654 to f8d5799 Compare July 8, 2024 07:32
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 1e85cf1 to 239af41 Compare July 8, 2024 07:32
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from f8d5799 to 9bb7d3a Compare July 8, 2024 08:07
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 239af41 to 70c76e0 Compare July 8, 2024 08:07
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from 9bb7d3a to 4e36e51 Compare July 8, 2024 10:30
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 70c76e0 to 640151c Compare July 8, 2024 10:30
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from 4e36e51 to ddf0fe6 Compare July 8, 2024 11:00
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from 640151c to b9ac5d3 Compare July 8, 2024 11:00
@alonh5 alonh5 force-pushed the 06-23-merge_trace_writer_and_trace_generator branch from ddf0fe6 to 2ce2998 Compare July 8, 2024 11:06
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from b9ac5d3 to a12c233 Compare July 8, 2024 11:06
Copy link
Contributor Author

alonh5 commented Jul 8, 2024

Merge activity

  • Jul 8, 7:18 AM EDT: @alonh5 started a stack merge that includes this pull request via Graphite.
  • Jul 8, 7:21 AM EDT: Graphite rebased this pull request as part of a merge.
  • Jul 8, 7:24 AM EDT: @alonh5 merged this pull request with Graphite.

@alonh5 alonh5 changed the base branch from 06-23-merge_trace_writer_and_trace_generator to dev July 8, 2024 11:19
@alonh5 alonh5 force-pushed the 06-24-implement_trace_generator_for_fibonacci branch from a12c233 to 9b98357 Compare July 8, 2024 11:20
@alonh5 alonh5 merged commit a9bb818 into dev Jul 8, 2024
13 of 14 checks passed
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.

3 participants