-
Notifications
You must be signed in to change notification settings - Fork 4
feat: using plonky3 maybe-rayon instead of rayon for optional parallelism #8
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
base: main
Are you sure you want to change the base?
Conversation
Hey @hero78119 I have updated some crates, could you take a look at the |
Hi @Sahilgill24 had a quick go-through and everything looks pretty neat to me! For WHIR what I suggested this PR can just cover change to use |
Thanks alot for the review @hero78119 . One last Query, In the trailing issue you had also mentioned not changing the dependancies for the sumcheck crate , should I do the changes for that crate as well. I would also love to contribute more to new issues if there are any intermediate or beginner friendly ones. |
At that moment we are working on sumcheck refactoring thus suggest not touch this crate. Thanks for the interests and will try mark few more issues to be |
Thanks alot @hero78119 , marking this ready for review. |
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.
Hi, it seems to be some left-over (I checked via search the places where in use of "rayon" but no "maybe-rayon")
E.g.
gkr-backend/crates/sumcheck/src/prover.rs
Lines 13 to 16 in a53d834
use rayon::{ | |
iter::{IndexedParallelIterator, IntoParallelRefIterator, IntoParallelRefMutIterator}, | |
prelude::{IntoParallelIterator, ParallelIterator}, | |
}; |
And probably so as other place. Would suggest to have a overall check and see whether other place got similar :)
Another place, as ceno are the major dependency of this repo, it will be nice if you can make a separate PR on ceno and point to your p3-maybe-rayon
feature branch and see whether any broken during compiler & integration test.
Hey @hero78119 , I checked this once, for the fixed the
Surely, will do this :) |
Hey @hero78119 , I fixed the use of all the unnecessary flags and the linting/formatting issues. Also this could be added to the test documentation, for any other users who might want to check the tests and formatting related stuff, all these commands mirror the CI/CD pipeline. cargo make tests
cargo make clippy
cargo fmt --all --check
taplo fmt --check --diff |
bac56d7
to
a2b035f
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.
Awesome job and all looks good to me!
I think one left over is testing with https://github.com/scroll-tech/ceno/
- assure ceno benchmark no impact, as now
parallel
flag is optional - on test environment, unittest failed not involve messy "rayon" stacktrace => this is the major purpose of this PR to enable clean stacktrace on unittest, better for message debugging
Will be nice if there is a separate Ceno PR to test above, or I will verify it later before we proceed the merge :)
Thanks for the review @hero78119 .
I shall make a separate PR on the Ceno repo for these additional tests and have also updated the branch to match the main. |
Hi, I reviewed again and think it might need some cosmetics of this PR The major adjustment is for Besides, also refactor |
Motivation
solves #4
Description
Using plonky3
maybe-rayon
crate as it provides same api for parallel and non-parallel case, thus helping to reduce the usage of theparallel
flag.Progress
rayon
was replaced byp3-maybe-rayon
currently in the following crates:-For the
whir
crate all the imports can be replaced with thep3::maybe_rayon::prelude::*
import, but as there are different variations of functions for the parallel and the non-parallel case for ex:- here so the removal of the#[cfg(feature = "parallel")]
is a bit tricky here and might require some changes in the core functions.