perf(stark): borrow trace rows in place for prover transition eval#767
Closed
MauroToscano wants to merge 1 commit into
Closed
perf(stark): borrow trace rows in place for prover transition eval#767MauroToscano wants to merge 1 commit into
MauroToscano wants to merge 1 commit into
Conversation
The LDE buffers have been row-major since the row-major LDE rework, but the evaluator still gather-copied every main and aux column of every transition offset into an owned Frame on each LDE point (~150-200 element clones per row per table) before the constraint body ran. Replace the Prover context's frame with RowFrame: one borrowed (main, aux) row-slice pair per transition offset, taken straight from the row-major storage with the same cyclic row arithmetic. The folder and the IR interpreter read rows[offset][col] directly; the per-thread preallocated Frame and fill_from_lde are deleted (single-row steps only - the sole shape since virtual columns were removed; asserted). Frame stays for the verifier/OOD path and debug validation, which bridges via Frame::as_row_frame. Reads the same values from the same memory - proofs are unchanged.
Contributor
Author
|
/bench-abba 32 |
|
⏳ ABBA tiebreaker started on the bench server (~30–40 min). The bench server is occupied until it finishes. |
Contributor
Author
ABBA tiebreaker —
|
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.
Stacked on #764. Candidate from the perf investigation — bench in isolation before deciding.
What
The LDE buffers have been row-major since the row-major LDE rework, but the evaluator still gather-copied every main + aux column of every transition offset into an owned
Frameon each LDE point (~150–200 element clones per row per table) before the constraint body ran.This replaces the Prover context's
framewithRowFrame: one borrowed(main, aux)row-slice pair per transition offset, taken straight from the row-major storage with the same cyclic row arithmetic. TheProverEvalFolderand the IR interpreter readrows[offset][col]directly. The per-thread preallocatedFrame+fill_from_ldeare deleted (single-row steps are the only shape since virtual columns were removed — asserted).Framestays for the verifier/OOD path and debug validation (bridged viaFrame::as_row_frame).Reads the same values from the same memory — proofs are unchanged. Gates: stark 165/165 (incl. folder-vs-capture differentials), emit differentials 13/13, release e2e prove→verify,
make lint.How to bench
Isolated against the base branch (recommended — measures only this change):
Or
/bench-abbaon this PR (measures vs main, i.e. this change + the whole switch branch).