ci: ARM oracle job + integer-kernel bit-exactness gate (closes #1081) - #1083
Merged
Conversation
Every tiny-oracle job ran on x86, so NEON branches were never compiled, let alone executed β which is how the olmoe (#1044) / qwen36 (#712 review) / inkling (#1080) IDOT class shipped undetected. Two additions: 1. tests/test_int_kernel_exact.c β integer kernels have no rounding excuse: against a pure-C reference on the same inputs they must match bit for bit on every ISA. Covers dot_i4i8 (pair int4xint8), planarize_i4 round-trip, dot_i4p_u (K1 plane layout, the -8*sum(x) identity), and matmul_i4p_idot vs matmul_i4_idot bitwise. The test encodes the real activation contract: qrow_i8 clamps to [-127,127], and -128 must never reach the kernels (the abs/sign VNNI trick cannot represent its negation) β the first draft generated full-range int8 and produced 30 false failures against the SHIPPED kernel, which is the contract documenting itself. 2. An ubuntu-24.04-arm job (timeout-bounded per #953's direction): builds every engine (NEON compile coverage β K1's dot_i4p_u NEON branch had never been compiled by anyone), runs the exactness gate with the NEON branches live, and replays the glm_tiny teacher-forcing oracle against a fixture generated on the same runner (same-machine torch reference, no cross-ISA float excuses). The x86 efficiency job also runs the exactness gate, so both ISAs hold the same bar. deepseek-v4 tiny-check on ARM is follow-up (its ARCH plumbing needs checking for aarch64 first). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 18, 2026
Merged
This was referenced Aug 18, 2026
Merged
Merged
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.
Closes #1081.
What
tests/test_int_kernel_exact.cβ integer kernels have no rounding excuse: against a pure-C reference on the same inputs they must match bit for bit, on every ISA. Coversdot_i4i8, theplanarize_i4round-trip,dot_i4p_u(K1 plane layout, theβ8Β·sum(x)identity), andmatmul_i4p_idotvsmatmul_i4_idotbitwise. 2,176 checks, 0 failures on x86 (avx-vnni branch live).oracle-armjob (ubuntu-24.04-arm, timeout-bounded per ci: stop running every dev commit twice, and bound every jobΒ #953's direction): builds every engine β NEON compile coverage; K1'sdot_i4p_uNEON branch had never been compiled by anyone β runs the exactness gate with the NEON branches live, and replays the glm_tiny teacher-forcing oracle against a fixture generated on the same runner (same-machine torch reference, no cross-ISA float excuses).The test found a real contract on day one
The first draft generated full-range int8 activations and produced 30 false failures against the shipped
dot_i4i8:x = β128. The abs/sign VNNI trick cannot representβ(β128), andqrow_i8clamps to[β127,127]β so β128 never reaches the kernels in production. The test now encodes that contract explicitly, with a comment: it is the kind of invariant that only exists in people's heads until a test writes it down.Deliberately deferred
deepseek-v4-tiny-checkon ARM β itsARCH/PORTABLE_ARCHplumbing needs checking for aarch64 first. qwen36's tiny gate joins when #712 lands (its author's review is what surfaced this class β credit @kreuzzelg).π€ Generated with Claude Code