Skip to content

Balance large CUDA proofs across CPU and GPU - #79

Open
arthurpaulino wants to merge 1 commit into
mainfrom
ap/gpu
Open

Balance large CUDA proofs across CPU and GPU#79
arthurpaulino wants to merge 1 commit into
mainfrom
ap/gpu

Conversation

@arthurpaulino

Copy link
Copy Markdown
Member

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.

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.
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.

2 participants