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

Fall back to CPU in small FRI. #840

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

alonh5
Copy link
Contributor

@alonh5 alonh5 commented Sep 18, 2024

This change is Reviewable

Copy link
Contributor Author

alonh5 commented Sep 18, 2024

Copy link
Contributor

@andrewmilson andrewmilson left a comment

Choose a reason for hiding this comment

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

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


crates/prover/src/core/backend/simd/circle.rs line 337 at r1 (raw file):

        a.swap_with_slice(&mut c[0..n0]);
    }
    fold(&poly.coeffs.to_cpu(), &mappings)

Suggestion:

poly.coeffs.as_slice()

crates/prover/src/core/backend/simd/fri.rs line 59 at r1 (raw file):

    }

    fn fold_circle_into_line(

Tests for these?

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: 2 of 5 files reviewed, 2 unresolved discussions (waiting on @andrewmilson and @shaharsamocha7)


crates/prover/src/core/backend/simd/circle.rs line 337 at r1 (raw file):

        a.swap_with_slice(&mut c[0..n0]);
    }
    fold(&poly.coeffs.to_cpu(), &mappings)

Done.


crates/prover/src/core/backend/simd/fri.rs line 59 at r1 (raw file):

Previously, andrewmilson (Andrew Milson) wrote…

Tests for these?

I added tests for a full proof of wide_fib with sizes 3 and 2, do you think that should be enough?

@alonh5 alonh5 force-pushed the 09-18-fall_back_to_cpu_in_small_fri branch from 89d9f9b to a60c629 Compare September 19, 2024 08:42
@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.01%. Comparing base (e1acffa) to head (d14ba6b).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #840      +/-   ##
==========================================
+ Coverage   91.99%   92.01%   +0.01%     
==========================================
  Files          90       90              
  Lines       12188    12204      +16     
  Branches    12188    12204      +16     
==========================================
+ Hits        11212    11229      +17     
  Misses        869      869              
+ Partials      107      106       -1     
Flag Coverage Δ
92.01% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@alonh5 alonh5 force-pushed the 09-17-fall_back_to_cpu_in_small_constraint_eval branch from 1a9755a to e601d40 Compare September 19, 2024 10:43
@alonh5 alonh5 force-pushed the 09-18-fall_back_to_cpu_in_small_fri branch from a60c629 to dccfd18 Compare September 19, 2024 10:43
@alonh5 alonh5 force-pushed the 09-17-fall_back_to_cpu_in_small_constraint_eval branch from e601d40 to 9119571 Compare September 19, 2024 11:11
@alonh5 alonh5 force-pushed the 09-18-fall_back_to_cpu_in_small_fri branch from dccfd18 to e0bfe23 Compare September 19, 2024 11:11
@alonh5 alonh5 force-pushed the 09-17-fall_back_to_cpu_in_small_constraint_eval branch from 9119571 to 8455db6 Compare September 19, 2024 11:33
@alonh5 alonh5 force-pushed the 09-18-fall_back_to_cpu_in_small_fri branch from e0bfe23 to 001b48b Compare September 19, 2024 11:33
@alonh5 alonh5 force-pushed the 09-17-fall_back_to_cpu_in_small_constraint_eval branch from 8455db6 to 37ca835 Compare September 19, 2024 12:54
@alonh5 alonh5 force-pushed the 09-18-fall_back_to_cpu_in_small_fri branch from 001b48b to ceb9ebb Compare September 19, 2024 12:54
@alonh5 alonh5 force-pushed the 09-17-fall_back_to_cpu_in_small_constraint_eval branch from 37ca835 to 125f43e Compare September 19, 2024 13:09
@alonh5 alonh5 force-pushed the 09-18-fall_back_to_cpu_in_small_fri branch from ceb9ebb to 2390e49 Compare September 19, 2024 13:09
Copy link
Contributor

@andrewmilson andrewmilson left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 2 of 6 files reviewed, all discussions resolved (waiting on @shaharsamocha7)

@alonh5 alonh5 force-pushed the 09-17-fall_back_to_cpu_in_small_constraint_eval branch from 125f43e to ec30186 Compare September 22, 2024 10:11
@alonh5 alonh5 force-pushed the 09-18-fall_back_to_cpu_in_small_fri branch from 2390e49 to cfb13e3 Compare September 22, 2024 10:11
@alonh5 alonh5 force-pushed the 09-17-fall_back_to_cpu_in_small_constraint_eval branch from ec30186 to a8fff1b Compare September 24, 2024 08:29
@alonh5 alonh5 force-pushed the 09-18-fall_back_to_cpu_in_small_fri branch from cfb13e3 to 0aafcdf Compare September 24, 2024 08:29
Copy link
Contributor Author

alonh5 commented Sep 24, 2024

Merge activity

  • Sep 24, 4:47 AM EDT: @alonh5 started a stack merge that includes this pull request via Graphite.
  • Sep 24, 4:54 AM EDT: Graphite rebased this pull request as part of a merge.
  • Sep 24, 4:58 AM EDT: @alonh5 merged this pull request with Graphite.

@alonh5 alonh5 changed the base branch from 09-17-fall_back_to_cpu_in_small_constraint_eval to graphite-base/840 September 24, 2024 08:48
@alonh5 alonh5 changed the base branch from graphite-base/840 to dev September 24, 2024 08:52
@alonh5 alonh5 force-pushed the 09-18-fall_back_to_cpu_in_small_fri branch from 0aafcdf to d14ba6b Compare September 24, 2024 08:53
@alonh5 alonh5 merged commit 8fbb759 into dev Sep 24, 2024
15 of 16 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