Skip to content

Separate prover modes for high and low memory #1095

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

Open
jonathanpwang opened this issue Dec 16, 2024 · 0 comments
Open

Separate prover modes for high and low memory #1095

jonathanpwang opened this issue Dec 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jonathanpwang
Copy link
Contributor

The VmLocalProver can have a configuration flag for memory mode such that in high memory mode where there is no risk of OOM, it should parallelize maximally every chance it gets using rayon for work stealing. This means:

  • generate_air_proof_input should be parallelized across segments. There is a stupid Send+Sync stopping it because we have some RefCell inside ExecutionSegment, but we can make a wrapper type around ExecutionSegment and unsafe impl Send + Sync just for this purpose because we know it's safe.
  • proving can be parallelized across segments as well, but Engine is not threadsafe because plonky3 also uses RefCell in some DFT. If we give a Fn() -> Engine to reconstruct the engine from FriParameters in each thread, then we can parallelize.

These risk OOM since it requires much more memory, but it could improve single machine proving time.

@jonathanpwang jonathanpwang added the enhancement New feature or request label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant