Skip to content

[codex] refactor shared biased-linear kernel#199

Merged
AbdelStark merged 1 commit into
AbdelStark:mainfrom
adrienlacombe:codex/issue-182-shared-linear
Jun 10, 2026
Merged

[codex] refactor shared biased-linear kernel#199
AbdelStark merged 1 commit into
AbdelStark:mainfrom
adrienlacombe:codex/issue-182-shared-linear

Conversation

@adrienlacombe

Copy link
Copy Markdown
Contributor

Summary

  • add pwm_core::predictor::batched_linear as the shared sequence-row variant of the biased linear kernel
  • route prove_block BatchedLinear through the shared helper instead of keeping a local row loop
  • add deterministic random cross-check coverage that the flat and batched kernels produce Freivalds-accepted outputs

Root Cause

Issue #182 tracks drift risk from multiple biased-linear implementations. The flat helper was already shared, but the batched block prover still carried its own row-wise expansion. This keeps the batched path behind the same core kernel boundary as the reference and flat prover paths.

Closes #182.

Validation

  • cargo test -p pwm-core linear_kernels_match_freivalds_relation
  • cargo test -p pwm-verifier --test block accept_multiposition_attention_with_projection
  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings

@adrienlacombe adrienlacombe marked this pull request as ready for review June 10, 2026 17:35
@AbdelStark AbdelStark merged commit df7d55b into AbdelStark:main Jun 10, 2026
10 checks passed
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.

PRED-05 refactor: shared biased-linear kernel (remove prover/reference drift)

2 participants