feat(gpu): add bounded chip proving lanes - #1398
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GPU chip proving used an unbounded stream-pool worker count and lacked phase-level CUDA observability.
Design Rationale
Bounded lanes retain whole-task memory reservations and transcript order. Each lane owns one unique non-default CUDA stream, and completion events are awaited before stream or reservation release.
CENO_CHIP_PROVING_MODE=lanesis the default, with four lanes;CENO_CHIP_PROVING_LANESaccepts1..=8.Change Highlights
septic_curvetest import.Benchmark / Performance Impact
Block
23817600, RTX 4090 24 GB, CPU witness generation.Real baseline comparison:
Operation
app_prove.innerapp.proveLayer
The baseline used Ceno
6f6bc870and had an AOT cache miss (39.786scompile/load). The four-lane run used a cached AOT artifact, so the end-to-end improvement includes cache reuse and is not attributable only to scheduling.Matched cached-AOT, memory-tracked lane comparison using frozen input
23b97818...686e:app_prove.inner(s)app.prove(s)Four lanes produced the best measured time. All runs verified the root proof without OOM or reservation underestimation.
Benchmark command:
Environment: RTX 4090 24 GB; measured with Ceno
cc2d431b; mode-only rename inc576f3af; benchmark workflowd48d72b9.Raw data: baseline, 3 lanes, 4 lanes, 8 lanes.
Large-block scheduler regression check on block
25746900:app_prove.inner(s)Both runs initialized the 64-entry low-level stream pool; scheduler concurrency changed from 64 workers to four lanes. The legacy run had an AOT cache miss, while the four-lane run had an AOT cache hit, so outer application and total-proof times are omitted.
Testing
cargo fmt --all --check cargo check -p ceno_zkvm --features gpu --lib cargo test -p ceno_zkvm --features gpu --lib scheduler::testsGPU check passed; four scheduler tests passed; remote block proof and root verification passed.
Risks and Rollout
The default changes to four bounded lanes. Sequential mode remains available for rollback. Measured framebuffer headroom is below 1 GiB, so larger defaults are not selected.
Follow-ups (optional)
Run cached trials without memory tracking and use NVTX telemetry to evaluate reservation phase splitting.
Copilot Reviewer Directive (keep this section)
When Copilot reviews this PR, apply
.github/copilot-instructions.mdstrictly.