Skip to content

Conversation

zhiyong1997
Copy link
Collaborator

@zhiyong1997 zhiyong1997 commented May 27, 2025

We're currently calling mpi executor whenever we receive a request to prove a circuit. This works but the circuit needs to be reloaded each time we call the prove, which is very costly. This PR targets at making the proving a service so that the circuit can be pre-loaded.

  • Basic Framework.
  • Testing and Debug (The compatibility of MPI and the internal multi-threading of axum package is a big issue now).

It is still too costly to call the proving service kernel-by-kernel. To remedy this, we'd like to group the witness together and pass it to the service at once. Note that this breaks the current zkcuda framework a little bit, so we're changing the zkcuda framework first to allow more flexible proving system.

  • Zkcuda framework change to allow flexible proving strategy.
  • Huge refactor, move almost all the computation to the server.
  • Minimize the memory usage across mpi processes.
  • Add batch opening and verification for PCS to boost the performance.

Known Issues

  1. CI occasionally fails due to rust toolchain setup.
  2. When there are not enough physical cores, mpi overscribe will be enabled, but the proving will fail. MPI apis do not seem to behave as expected in the overscription mode.

@zhiyong1997 zhiyong1997 changed the title [WIP] Zf/zkcuda_service mode Zf/zkcuda_service mode May 29, 2025
@zhiyong1997
Copy link
Collaborator Author

parallelized zkcuda for keccak pass.

@zhiyong1997 zhiyong1997 force-pushed the zf/service_mode branch 2 times, most recently from 4ed546c to 00471ea Compare June 6, 2025 02:04
@zhiyong1997 zhiyong1997 requested a review from siq1 June 9, 2025 04:17
@siq1 siq1 merged commit 89e3204 into master Jun 9, 2025
24 checks passed
@siq1 siq1 mentioned this pull request Jun 9, 2025
@zhiyong1997 zhiyong1997 deleted the zf/service_mode branch June 11, 2025 08:48
@siq1 siq1 mentioned this pull request Jun 11, 2025
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