perf: encode leaves in coefficient form#279
Open
yoaveshel wants to merge 2 commits into
Open
Conversation
mcarilli
reviewed
May 6, 2026
Comment on lines
+1415
to
+1416
| let extended_generator = domain_generator_for_size::<F>((trace_len * num_cosets) as u64); | ||
| let coset_generator = extended_generator.pow(num_cosets as u32); |
There was a problem hiding this comment.
i think these two lines can be condensed to
let coset_generator = domain_generator_for_size::<F>(trace_len as u64);
6 tasks
mcarilli
added a commit
that referenced
this pull request
Jun 10, 2026
…ffs (#308) ## What ❔ Adds GPU support for #279. Implements "Improving running time via alternate domain evaluation" from page 15 of https://eprint.iacr.org/2024/1586.pdf. The new kernel transforms values for each leaf in-place and preserves natural coset order. This maximizes uniformity with the non-transformed path and has several benefits: - Transformed output can be passed directly to ab_blake2s_leaves_from_ntt_multi_coset_kernel. - Transformed leaves can still be gathered by schedule_query_merkle_paths_into_from_ntt. - Unblocks in-place L2 chunking from the LDEs all the way to leaf hashing. To ease the transition, the current non-transformed path is still present. Choosing the transformed or non-transformed path is controlled by a boolean argument to `TraceHolder::commit_all[_into]_from_ntt`. ## Is this a breaking change? - [ ] Yes - [x] No ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted. --------- Co-authored-by: mcarilli <mcarilli@gmail.com>
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.
What ❔
Switches WHIR intermediate-oracle leaves from evaluation form to multilinear-coefficient form, eliminating per-query field inversions and the fold_coset butterfly in internal/final rounds.
Transpiler cycle counts,
sec_80,cachesvariant. Baseline =av_gkr_compiler(eval-form leaves) after rebase; numbers updated from the original measurement as the circuit set changed (FMA opcode, add/sub fix,unsigned_mul_divandblake2_g_functionadded).Why ❔
Is this a breaking change?
Checklist