Skip to content

Add two-point Kronecker multiplication - #9602

Open
kim-em wants to merge 5 commits into
mainfrom
poly-fast-kronecker
Open

Add two-point Kronecker multiplication#9602
kim-em wants to merge 5 commits into
mainfrom
poly-fast-kronecker

Conversation

@kim-em

@kim-em kim-em commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Implements the first coefficient-owner kernel from the multipoint Kronecker milestone in SPEC/Libraries/hex-poly-fast.md.

  • adds forced Hex.ZPoly.mulKronecker2, evaluating at B and -B with exactly two packed Int multiplications
  • derives the slot bound from min(size) * maxAbs(p) * maxAbs(q)
  • proves signed digit recovery, even/odd stream separation and interleaving, and mulKronecker2_eq
  • extends ZPoly conformance with signed, reversed-operand, and digit-boundary KS2 cases
  • extends the existing crossover grid with KS2 timing and checksum agreement

The 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.KroneckerCrossover
  • full 276-cell hexpolyz_kronecker_crossover sweep with matching checksums
  • python3 scripts/check_phase4.py --base origin/main
  • git diff --check

Kim Morrison 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.
kim-em added 3 commits August 26, 2026 14:52
# Conflicts:
#	scripts/bench/proof_only_runtime_exemptions.json
# Conflicts:
#	scripts/bench/proof_only_runtime_exemptions.json
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