Skip to content

perf(stark): GPU transfer-residency#862

Draft
jotabulacios wants to merge 12 commits into
mainfrom
pr/gpu-transfer-residency
Draft

perf(stark): GPU transfer-residency#862
jotabulacios wants to merge 12 commits into
mainfrom
pr/gpu-transfer-residency

Conversation

@jotabulacios

@jotabulacios jotabulacios commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

GPU transfer-residency: keep composition + FRI + DEEP resident on device

Motivation

The GPU prover shipped large intermediates across PCIe every prove: the extended
composition LDE crossed the bus three times (D2H, re-upload for Merkle, re-upload
for DEEP), the FRI layer evals were copied to host for the query phase, and the
DEEP→FRI bridge did D2H + CPU bit-reverse + H2D before the first fold. The GPU
sat idle waiting on these round-trips.

Description

Keep the intermediates on the device; gather only what the openings need.

  • Composition: retain the extended-LDE buffer as a typed handle and build the
    Merkle tree, R3 OOD, and R4 openings from it; drop the host D2H when a table's
    DEEP inputs are all resident (others keep the host fallback). Cross-stream
    ordering via a recorded "LDE-ready" event.
  • FRI: keep each committed layer's folded evals resident; gather queried
    opening values from device instead of copying full layers to host.
  • DEEP→FRI: pass the natural-order codeword to FRI as a resident handle; the
    first fold reads br(2j)/br(2j+1), folding the bit-reverse into the fold and
    removing the D2H + CPU bit-reverse + H2D bridge.

@jotabulacios

Copy link
Copy Markdown
Collaborator Author

/bench-gpu

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

GPU Benchmark (ABBA) — 738f79cf8d vs main (14 pairs)

RTX 5090 · Vast.ai datacenter @ $0.8423148148148147/hr · prover/cuda · drift-free A/B/B/A

=== ABBA paired result  (improvement: - = PR faster) ===
  pairs: 14   mean A (PR): 13.573s   mean B (base): 15.293s

  [parametric] paired-t   mean -11.24%   sd 1.24%   se 0.33%
               95% CI: [-11.96%, -10.52%]   (t df=13 = 2.16)
  [robust]     median -11.52%   Wilcoxon W+=0 W-=105  p(exact)=0.0001  (z=-3.26)

  --- server stability (this run; compare across servers) ---
  run-to-run jitter:    A CV 1.01%   B CV 1.31%        (lower = steadier)
  within-session drift: +2.66% over the run, 1st->2nd half +1.30%
    (jitter -> Tier-1 cached gate floor; drift -> whether the cached baseline can be trusted)

  VERDICT: REAL IMPROVEMENT - PR faster by ~11.24% (t-CI and Wilcoxon agree)

  raw pairs: /tmp/abba_run/pairs.csv

- = PR faster. Trust the verdict when paired-t and Wilcoxon agree.

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.

1 participant