@@ -424,14 +424,10 @@ pub fn table_parallelism() -> usize {
424424 }
425425}
426426
427- /// Heuristic peak device working set for one table, in bytes. Two parts: the
428- /// LDE columns co-resident on the GPU (main base field at 8 B, aux ext3 at
429- /// 24 B) times a scratch factor for the NTT and leaf hash transients, plus the
430- /// resident Merkle trees (main, aux, composition, FRI layers) kept on device R1
431- /// to R4. Each full tree is about `2*lde_size` nodes of 32 B (`64*lde_size`);
432- /// together at the R4 peak about 256 B per `lde_size` covers them. A deliberate
433- /// over estimate that gates a safety ceiling, not a precise allocator. Pass
434- /// `aux_cols == 0` where the aux LDE is not yet resident (R1 main commit).
427+ /// Heuristic peak device bytes for one table: co-resident LDE columns plus the
428+ /// resident Merkle trees, with a scratch factor for NTT and leaf transients. A
429+ /// deliberate over estimate for a safety ceiling, not a precise allocator. Pass
430+ /// aux_cols == 0 when the aux LDE is not yet resident (R1 main commit).
435431fn estimate_table_vram_bytes ( main_cols : usize , aux_cols : usize , lde_size : usize ) -> u64 {
436432 const BYTES_PER_BASE : u64 = 8 ;
437433 const EXT3_BYTES : u64 = 24 ;
@@ -445,16 +441,12 @@ fn estimate_table_vram_bytes(main_cols: usize, aux_cols: usize, lde_size: usize)
445441 lde_term. saturating_add ( tree_term)
446442}
447443
448- /// Plan contiguous table chunks for parallel proving.
449- ///
450- /// A chunk grows until it reaches `k` tables (the core and RAM bound limit) or
451- /// its summed VRAM estimate would exceed `budget`, whichever comes first. A
452- /// single table larger than `budget` forms its own chunk (it runs solo rather
453- /// than being excluded). With `budget == u64::MAX` the VRAM constraint is never
454- /// binding for any realistic estimate, so chunks fall back to fixed size `k`,
455- /// the same as the previous `step_by(k)` scheme. So on non-cuda builds and when
456- /// VRAM is not binding, scheduling (and therefore the proof) is unchanged.
457- /// Returns `(start, end)` half open ranges covering `0..estimates.len()` in order.
444+ /// Plan contiguous table chunks for parallel proving. A chunk grows until it
445+ /// hits `k` tables or its summed VRAM estimate would exceed `budget`; a single
446+ /// table larger than `budget` runs solo. With `budget == u64::MAX` (non-cuda,
447+ /// or VRAM not binding) chunks fall back to fixed size `k`, identical to the
448+ /// old `step_by(k)`, so scheduling and the proof are unchanged. Returns
449+ /// `(start, end)` half open ranges covering `0..estimates.len()` in order.
458450fn plan_table_chunks ( estimates : & [ u64 ] , k : usize , budget : u64 ) -> Vec < ( usize , usize ) > {
459451 let n = estimates. len ( ) ;
460452 let k = k. max ( 1 ) ;
0 commit comments