feat(prover): disk-spill mmap backend for large program proving#444
Closed
ColoCarletti wants to merge 5 commits into
Closed
feat(prover): disk-spill mmap backend for large program proving#444ColoCarletti wants to merge 5 commits into
ColoCarletti wants to merge 5 commits into
Conversation
Collaborator
Author
|
/bench |
Benchmark — fib_iterative_8M (median of 3)Table parallelism: 32 (auto = cores / 3)
Commit: 71c1377 · Baseline: built from main · Runner: self-hosted bench |
Collaborator
Author
|
/bench |
1 similar comment
Collaborator
Author
|
/bench |
cf94636 to
d7f53ed
Compare
Collaborator
Author
|
/bench |
1 similar comment
Collaborator
Author
|
/bench |
Collaborator
|
/bench |
1 similar comment
Collaborator
|
/bench |
Collaborator
|
/bench |
# Conflicts: # Cargo.lock # crypto/stark/src/table.rs # prover/src/tables/trace_builder.rs
d0875af to
dc4054c
Compare
Collaborator
|
superseded by #466 |
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.
Summary
Adds mmap-based disk spilling for trace tables, LDE columns, and Merkle tree nodes, enabling proving of large programs
(64M+ instructions) that would otherwise OOM.
Changes
Crypto layer — mmap backing for core data structures:
Table<F>:spill_to_disk()moves trace data from heap to mmap'd tempfile,get()reads transparently from eithersource
LDETraceTable:spill_main_from_pool()andadd_aux_from_pool()persist LDE columns to disk before pool buffers arereused
MerkleTree:spill_nodes_to_disk()moves tree nodes to mmap, accessed vianode_get()FieldElement<F>: added#[repr(transparent)]for safe mmap pointer castProver pipeline — chunked processing with disk spill:
Trace builder — memory-bounded bitwise processing:
chunk_generate_and_spill: generates each trace chunk and immediately spills to diskflush_bitwise!macro updates multiplicities in 1M-row batches instead of accumulating allbitwise ops (saves ~14 GB at 64M instructions)
memw_ops,lt_ops,cpu_opsfreed as soon as their traces are generatedCLI:
proveandverifycommands with--max-rowsflag for per-table chunk size controlAll changes are behind the
disk-spillfeature flag (default for CLI). Without the flag, behavior is identical to main.Test Results