Balance large CUDA proofs across CPU and GPU - #79
Open
arthurpaulino wants to merge 1 commit into
Open
Conversation
Large mixed-height proofs no longer make an all-GPU or all-CPU placement choice. Partition complete height groups from measured device capacity and host parallelism, overlap Rayon LDE construction with CUDA, and merge canonical Goldilocks/BLAKE3 digest frontiers into one byte-compatible Merkle commitment. Carry hybrid commitments through lookup, quotient, openings, and FRI. Keep reusable matrices resident, defer host copies until they are needed, spill by phase-specific byte budgets, evaluate host-backed quotient inputs through bounded staging buffers, split exceptionally large lookup rows across CPU and GPU, and batch resident FRI reductions without changing transcript order. Reuse pinned host allocations to keep repeated spill traffic bounded. Methodology: build Ix cb23e50 in release mode against this checkout, compile Init once, split its manifest into 16 deterministic shards, prove shards 7 and 8, independently reprove their recursive wrap slots 12 and 13 with --jobs 1 --max-ram 240, then independently reprove structural join slot 14. Measure external wall time and maximum RSS with /usr/bin/time -v on an RTX PRO 6000 Blackwell (97,887 MiB), CUDA 13.3/driver 595.84, a 32-thread Xeon Platinum 8559C host, and 249 GiB RAM. The configuration uses 64 FRI queries. The CPU baseline was 102.27s and 117.25s for the shard proofs, 90.81s and 93.11s for their lifts, and about 74.10s for the join (the join is isolated by subtracting the two lifts from a 258.02s recursive run): 477.54s total. CUDA measured 57.87s, 65.84s, 41.03s, 41.59s, and 33.26s respectively: 239.59s total, a 1.99x end-to-end speedup. The recursive portion falls from 258.02s to 115.88s (2.23x), and peak external RSS falls from 209.03 GiB to 143.27 GiB. Excluding Aiur execution and witness generation, CUDA STARK proving took 24.28s for shard 7 and 34.09s for shard 8. Validate the normal CUDA-independent build with 35 release tests. Validate the opt-in CUDA path with 53 release tests, clippy with warnings denied, and the complete cuda/smoke.sh suite, including field arithmetic, DFT/coset-LDE, BLAKE3/MMCS, lookup/quotient, interpolation/FRI, forced spill/reopen, CPU verification, and byte-for-byte CPU/CUDA proof comparison.
arthurpaulino
force-pushed
the
ap/gpu
branch
from
September 4, 2026 19:44
3047a46 to
c683c69
Compare
johnchandlerburnham
approved these changes
Sep 4, 2026
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.
Large mixed-height proofs no longer make an all-GPU or all-CPU placement choice. Partition complete height groups from measured device capacity and host parallelism, overlap Rayon LDE construction with CUDA, and merge canonical Goldilocks/BLAKE3 digest frontiers into one byte-compatible Merkle commitment.
Carry hybrid commitments through lookup, quotient, openings, and FRI. Keep reusable matrices resident, defer host copies until they are needed, spill by phase-specific byte budgets, evaluate host-backed quotient inputs through bounded staging buffers, split exceptionally large lookup rows across CPU and GPU, and batch resident FRI reductions without changing transcript order. Reuse pinned host allocations to keep repeated spill traffic bounded.
Methodology: build Ix cb23e50 in release mode against this checkout, compile Init once, split its manifest into 16 deterministic shards, prove shards 7 and 8, independently reprove their recursive wrap slots 12 and 13 with --jobs 1 --max-ram 240, then independently reprove structural join slot 14. Measure external wall time and maximum RSS with /usr/bin/time -v on an RTX PRO 6000 Blackwell (97,887 MiB), CUDA 13.3/driver 595.84, a 32-thread Xeon Platinum 8559C host, and 249 GiB RAM. The configuration uses 64 FRI queries.
The CPU baseline was 102.27s and 117.25s for the shard proofs, 90.81s and 93.11s for their lifts, and about 74.10s for the join (the join is isolated by subtracting the two lifts from a 258.02s recursive run): 477.54s total. CUDA measured 57.87s, 65.84s, 41.03s, 41.59s, and 33.26s respectively: 239.59s total, a 1.99x end-to-end speedup. The recursive portion falls from 258.02s to 115.88s (2.23x), and peak external RSS falls from 209.03 GiB to 143.27 GiB. Excluding Aiur execution and witness generation, CUDA STARK proving took 24.28s for shard 7 and 34.09s for shard 8.
Validate the normal CUDA-independent build with 35 release tests. Validate the opt-in CUDA path with 53 release tests, clippy with warnings denied, and the complete cuda/smoke.sh suite, including field arithmetic, DFT/coset-LDE, BLAKE3/MMCS, lookup/quotient, interpolation/FRI, forced spill/reopen, CPU verification, and byte-for-byte CPU/CUDA proof comparison.