Repository navigation
Description
The target builds successive product layers serially. Once lazy storage exists, the fastest schedule also depends on public shape, worker count and hardware; deepest laziness is not uniformly best.
This issue owns parallel independent tree/table construction and a deterministic auto policy for choosing among implemented schedules.
Sources
The target repository's existing relation, field encoding, coordinate order, and transcript contracts are authoritative. The current target implementation determines compatibility; the PoC implementation is reference-only and must be re-derived against those contracts.
In scope
- Parallelize disjoint tree/table jobs while preserving logical order and reusing the configured thread pool; apply size gates to avoid tiny-job overhead.
- Provide forced L2/L4/L8 and auto modes, validate unsupported depth/path combinations, and record chosen schedule in benchmark metadata.
- Derive auto choices solely from public geometry/platform/worker count and matched measurements. Separate construction scheduling from the pool-sizing issue Size the rayon pool to the performance cores #48.
Out of scope: adding lazy algorithms themselves, changing GKR messages, dynamic private-value scheduling policy, or creating nested global pools.
Potential impact
Parallel construction can reduce setup/prover latency, while schedule selection trades retained layers against regeneration. The PoC records some Apple L8 cases costing 19–37% more time for about 19% less RSS; those are within-PoC observations, not target baselines. Prefer measured tradeoffs to maximum laziness.
Done when
- Serial/parallel and all eligible schedules produce identical layers, roots, proof/transcript bytes and terminal claims.
- Test worker counts including one, tall/wide/shallow shapes, invalid overrides and checked geometry; tampered messages/openings remain rejected.
- No race, duplicate work or stale scratch ownership appears under concurrent jobs; unsupported architectures retain a valid conservative policy.
- Publish matched construction/prove/RSS/allocation results for forced schedules and auto, separating scheduler gains from hardware and protocol changes.
Dependencies and coordination
Depends on #107. Coordinate with #52, #48. The GKR tracker #52 tracks the wider programme; this issue owns only the scoped implementation above.
Activity
zkfriendly commentedon Nov 24, 2026
Status update (
main34addac): partially implemented by #146 (f433296).lower_luts,layer3, andfold_layersincrates/gkr/src/lib.rsare now parallelized with Rayon. Remaining scope: parallelizingBitMatrix::transpose(crates/common/src/matrix.rs, ~2.1 ms serial) and auto-selecting lazy schedules once #107 supports multiple schedules.zkfriendly commentedon Nov 24, 2026
Closing as substantially completed by #146 (
f433296), which parallelizedlower_luts,layer3, andfold_layersincrates/gkr/src/lib.rs. Multi-schedule selection is unneeded now that #107 is closed, and parallelizingBitMatrix::transpose(~2.1 ms serial) is already tracked directly in #52.