Skip to content

Optimize redundant MPI EQ polynomial evaluations#282

Closed
shirin-shahabi wants to merge 1 commit intomainfrom
automolt/jstprove/perf-sumcheck-mpi-eq-redundancy
Closed

Optimize redundant MPI EQ polynomial evaluations#282
shirin-shahabi wants to merge 1 commit intomainfrom
automolt/jstprove/perf-sumcheck-mpi-eq-redundancy

Conversation

@shirin-shahabi
Copy link
Copy Markdown
Contributor

Summary

Eliminate redundant MPI EQ polynomial evaluations

Status

Halted at gate2.

Reason

["Out-of-scope change: the hunk in compiler/circuit-std-rs/src/logup.rs (improved error message for query_id out of bounds) is not mentioned in the approved proposal 'sumcheck-mpi-eq-redundancy', which is strictly scoped to sumcheck_gkr_vanilla.rs and sumcheck_gkr_square.rs. This line must be reverted or submitted under a separate proposal.", 'DRY violation: the unsafe byte-serialization + root_broadcast_bytes pattern is duplicated verbatim in both sumcheck_gkr_square.rs and sumcheck_gkr_vanilla.rs. This should be extracted to a helper — either a new method on MPIEngine (e.g. broadcast_challenge_field_slice) or a free function in the sumcheck prover_helper module — and called from both sites.', 'API asymmetry: sumcheck_gkr_square::prepare_mpi accesses mpi_config via self.mpi_config, while sumcheck_gkr_vanilla::prepare_mpi now takes mpi_config as an explicit &impl MPIEngine parameter. The approach should be consistent across both helpers. Either both should take the parameter explicitly or both should use self.mpi_config.']

Methodology

In sumcheck_gkr_vanilla.rs:233, EqPolynomial::eq_eval_at is called for ALL MPI world ranks redundantly. Only the root process needs the full evaluation. Implement rank-selective evaluation: compute on root, broadcast result to others. Same fix needed in sumcheck_gkr_square.rs:175.

Acceptance (unmet)

cargo test --release -p sumcheck passes. MPI rank 0 computes eq_eval, others receive broadcast.


DSPy-trace: f285aa53-5f1a-4157-91cc-b6197a260081

…ler/circuit-std-rs/src/logup.rs (improved error message for query_id out of boun

DSPy-trace: f285aa53-5f1a-4157-91cc-b6197a260081
@shirin-shahabi
Copy link
Copy Markdown
Contributor Author

Closed after gate2 failure: ["Out-of-scope change: the hunk in compiler/circuit-std-rs/src/logup.rs (improved error message for query_id out of bounds) is not mentioned in the approved proposal 'sumcheck-mpi-eq-redundancy', which is strictly scoped to sumcheck_gkr_vanilla.rs and sumcheck_gkr_square.rs. This line must be reverted or submitted under a separate proposal.", 'DRY violation: the unsafe byte-serialization + root_broadcast_bytes pattern is duplicated verbatim in both sumcheck_gkr_square.rs and sumcheck_gkr_vanilla

@shirin-shahabi shirin-shahabi self-assigned this Apr 14, 2026
@shirin-shahabi
Copy link
Copy Markdown
Contributor Author

Dry run violation without explicit benchmark result, need to improve DSPy-trace: f285aa53-5f1a-4157-91cc-b6197a260081; suggested formating.

@shirin-shahabi shirin-shahabi deleted the automolt/jstprove/perf-sumcheck-mpi-eq-redundancy branch April 14, 2026 22:05
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