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

Feat: enable GPU prover #1608

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

kunxian-xia
Copy link
Contributor

@kunxian-xia kunxian-xia commented Mar 5, 2025

Overview

Patches

We patch the following crates

Crate Patch
stark-backend openvm-stark-gpu
plonky3 plonky3-gpu

Summary by CodeRabbit

  • Chores
    • Integrated updates to external components that enhance GPU support and overall reliability.
    • Improved dependency management to ensure smoother performance on compute-intensive tasks.

Copy link

coderabbitai bot commented Mar 5, 2025

Walkthrough

This update modifies the dependency configuration for the zkvm-prover project. Two new patch sections are added in the Cargo.toml file. One patch section references the openvm-stark-gpu repository for GPU-enabled dependencies (openvm-stark-backend and openvm-stark-sdk) on the main branch. The other patch section references the plonky3-gpu repository, on the openvm-v2 branch, for a series of Plonky3-related dependencies with occasional additional features.

Changes

File Change Summary
zkvm-prover/Cargo.toml
(openvm-org)
Added patch section for openvm-org/stark-backend.git with dependencies: openvm-stark-backend and openvm-stark-sdk linked to the openvm-stark-gpu repository on branch main with the gpu feature.
zkvm-prover/Cargo.toml
(Plonky3)
Added patch section for Plonky3.git with multiple dependencies (e.g., p3-air, p3-field, p3-commit, etc.) linked to the plonky3-gpu repository on branch openvm-v2. Some dependencies include extra features (e.g., nightly-features for p3-baby-bear).

Poem

I'm a little rabbit hopping by,
Seeing new patches as they multiply.
Dependencies now dance in code's bright light,
GPU dreams taking off in flight.
With each commit, ears perk up with delight—
A garden of code, so fresh and right!
🐇🌟


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.13%. Comparing base (e27ab5a) to head (894f259).

Additional details and impacted files
@@                     Coverage Diff                      @@
##           omerfirmak/euclid-prover    #1608      +/-   ##
============================================================
- Coverage                     42.15%   42.13%   -0.02%     
============================================================
  Files                           222      222              
  Lines                         17733    17732       -1     
============================================================
- Hits                           7475     7472       -3     
- Misses                         9550     9551       +1     
- Partials                        708      709       +1     
Flag Coverage Δ
common 28.77% <ø> (ø)
coordinator 34.23% <ø> (-0.09%) ⬇️
database 42.05% <ø> (ø)
rollup 54.52% <ø> (ø)

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.

@kunxian-xia kunxian-xia changed the base branch from omerfirmak/euclid-prover to euclid-prover/update-zkvm-circuit-to-0.1.0-rc.6 March 7, 2025 05:15
@kunxian-xia kunxian-xia force-pushed the kunxian/euclid-gpu-prover branch from 5919aa2 to 327a1d8 Compare March 7, 2025 05:24
Base automatically changed from euclid-prover/update-zkvm-circuit-to-0.1.0-rc.6 to omerfirmak/euclid-prover March 7, 2025 05:28
@kunxian-xia
Copy link
Contributor Author

The zkvm gpu prover is built by https://github.com/scroll-tech/devops/pull/548.

@@ -7572,7 +7813,7 @@ dependencies = [
[[package]]
name = "scroll-zkvm-circuit-input-types"
version = "0.1.0-rc.6"
source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.1.0-rc.6#3c961e850691dd0990df4d64deea6d00e70dff00"
source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.1.0-rc.6#7be1d0617948491f572396f3863ac0a102235869"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update the commit of scroll-zkvm-prover v0.1.0-rc.6.

Base automatically changed from omerfirmak/euclid-prover to develop March 10, 2025 09:18
@kunxian-xia
Copy link
Contributor Author

We don't need this anymore. The gpu prover is always built in devops repo.

@kunxian-xia kunxian-xia reopened this Mar 10, 2025
@kunxian-xia kunxian-xia force-pushed the kunxian/euclid-gpu-prover branch from ef7310d to 2abbbbd Compare March 10, 2025 13:00
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
zkvm-prover/Cargo.toml (2)

48-50: Review: Stark Backend GPU Patch Configuration

The new patch section correctly routes both openvm-stark-backend and openvm-stark-sdk to the GPU-enabled fork (openvm-stark-gpu.git) on the main branch with the gpu feature enabled. Please verify that using SSH URLs is acceptable in your build environment (e.g., ensuring all CI/CD agents and developers have proper SSH key access), or consider using HTTPS URLs if broader accessibility is needed.


52-77: Review: Plonky3 GPU Patch Dependencies

This section comprehensively replaces the original Plonky3 dependencies with their GPU-enabled counterparts from plonky3-gpu.git on the openvm-v2 branch. The inline comment for p3-maybe-rayon clarifies that the "parallel" feature is not enabled by default, which is helpful. A few suggestions to consider:

  • Reproducible Builds: Since all dependencies are pointed to a branch, consider pinning them to a specific commit or tag to ensure reproducibility and avoid potential breaking changes if the branch is updated.
  • SSH URL Usage: As with the Stark backend patch, ensure that the SSH URLs do not hinder integration in environments that might not have SSH key configurations set up.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 056ebdc and 2abbbbd.

⛔ Files ignored due to path filters (1)
  • zkvm-prover/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • zkvm-prover/Cargo.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: tests

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.

2 participants