Add two-point Kronecker multiplication - #9602
Open
kim-em wants to merge 5 commits into
Open
Conversation
added 2 commits
August 25, 2026 04:06
Cost model: KS2 performs two packed integer multiplications at roughly half the KS1 bit width, plus linear packing, signed recovery, and interleaving. Slot width derives from min(size) * maxAbs(p) * maxAbs(q). The crossover sweep keeps this as a forced kernel because it rarely beats the existing KS1 implementation on the current grid.
This was referenced Aug 25, 2026
# Conflicts: # scripts/bench/proof_only_runtime_exemptions.json
# Conflicts: # scripts/bench/proof_only_runtime_exemptions.json
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.
Implements the first coefficient-owner kernel from the multipoint Kronecker milestone in
SPEC/Libraries/hex-poly-fast.md.Hex.ZPoly.mulKronecker2, evaluating atBand-Bwith exactly two packedIntmultiplicationsmin(size) * maxAbs(p) * maxAbs(q)mulKronecker2_eqThe full local crossover sweep found KS2 faster than KS1 in only 2/276 cells on this machine. This PR therefore intentionally exposes KS2 as a forced kernel without putting it in production dispatch; the measured dispatcher remains work for the completed KS2/KS3/KS4 comparison.
Validation:
lake build HexPolyZ HexPolyZ.Conformance HexPolyZ.KroneckerCrossoverhexpolyz_kronecker_crossoversweep with matching checksumspython3 scripts/check_phase4.py --base origin/maingit diff --check