Skip to content

fix(k1): planar off on non-AVX2 builds; drop WIP loop; f32 planar in the exactness gate - #1086

Merged
JustVugg merged 1 commit into
devfrom
fix/k1-followup
Aug 18, 2026
Merged

fix(k1): planar off on non-AVX2 builds; drop WIP loop; f32 planar in the exactness gate#1086
JustVugg merged 1 commit into
devfrom
fix/k1-followup

Conversation

@JustVugg

Copy link
Copy Markdown
Owner

Three user-reported findings against #1079 β€” all verified real, all fixed:

  1. planar_on() did not exclude ARM, but matmul_i4p has no NEON arm: on a CPU-only ARM box (Graviton, RPi, macOS without Metal) a planar tensor's f32 dispatch degraded to scalar and changed the FP accumulation order vs the pair kernel's NEON arm β€” so the bit-identical claim only held on AVX2. Planar now requires an AVX2 build, with a comment stating the re-enable condition: a NEON matmul_i4p with matching per-lane order.
  2. Dead WIP loop in planarize_i4_row (two computed-then-voided indices) β€” removed.
  3. The f32 planar kernel had no in-tree coverage: the exactness gate now also asserts matmul_i4p == matmul_i4 bitwise (S=3, I=6100 so the pair-layout tail is exercised), gated __AVX2__ β€” the test asserts the claim exactly where the gate makes it. 2,944 checks, 0 failures locally; the ARM job from ci: ARM oracle job + integer-kernel bit-exactness gate (closes #1081)Β #1083 keeps holding the integer-kernel bar with NEON live.

Credit to the reporter β€” finding 1 in particular is precisely the class the new ARM job exists for, and the ARM re-enable now has a written condition instead of a silent gap.

πŸ€– Generated with Claude Code

…the exactness gate

Three user-reported findings against #1079, all real:

- planar_on() did not exclude ARM, but matmul_i4p has no NEON arm: on
  Graviton/RPi/macOS-without-Metal a planar tensor's f32 path degraded
  to scalar AND changed the FP accumulation order vs the pair kernel's
  NEON arm β€” the bit-identical claim only holds where both twins exist.
  Planar now requires an AVX2 build until a NEON matmul_i4p lands with
  matching per-lane order.

- planarize_i4_row carried a WIP loop computing two unused indices β€”
  removed.

- the exactness gate now also asserts matmul_i4p == matmul_i4 bitwise
  (f32, S=3, I=6100 so the pair-layout tail is exercised), gated
  __AVX2__ β€” the test asserts the claim exactly where the gate makes
  it. 2,944 checks, 0 failures locally.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JustVugg
JustVugg merged commit 0ad0ca7 into dev Aug 18, 2026
21 checks passed
BColsey pushed a commit to BColsey/colibri that referenced this pull request Aug 18, 2026
The dev push CI failed on an AVX-512-VNNI runner: matmul_i4 takes the
dot_i4f_avx512 arm there (different accumulation order), while the
engine's planar gate deliberately keeps planar OFF on AVX-512F builds
(JustVugg#1086) β€” so the test asserted a claim the engine never makes. The PR
run had passed on an AVX2-only runner: runner lottery, not a code
change, flipped the result.

The f32 comparison is now gated __AVX2__ && !(__AVX512F__&&__AVX512BW__),
matching planar_on() to the letter, with a comment telling the story so
the next gate change updates both places.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JustVugg
JustVugg deleted the fix/k1-followup branch August 20, 2026 00:57
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