Repository navigation
igla race: repair ternary_mac and ternary_gemm (compile, pass under t27c and t27b, resealed) - #10375
Merged
Merged
Conversation
…e bench (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ature order (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eight::plus/minus/zero (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…(refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…in as i8 (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…dispatcher ternary_gemm (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…efs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…_cols test (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…p struct wrappers and dispatcher (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ights, drop negative u32 index test (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…unds-checked accessors (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ses mirror the GPU oracle (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… entry (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ternary_mac; seal to be re-verified on the lab) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ary_logic 1 -> 0, ternary_tree 2 -> 0) (refs #10371) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
This was referenced Oct 18, 2026
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 #10371
Repairs the two RACE reference specs so both compile and pass under t27c and t27b. Everything ran on the Railway lab (t27c from master, t27b under qemu-aarch64); nothing was built or tested on the Mac. The change is
.t27plus tool-written data (seals, ratchet baseline).ternary_mac.t27
ternary_mul_wide/ternary_mac_wide: exact i32 product. The negation is done after widening, so -128 * -1 = +128 with no trap.ternary_mulkeeps the documented i8 wrap (128 -> -128) and stays self-contained, becausetools/verify_igla_race.pylifts it out of the generated C and Rust by signature.acc >= 0named a variable that did not exist) is gone; tests state true arithmetic.ternary_gemm.t27
ternary_mac_wide(acc, a, w)in the order of the signature (they passed(a, w, acc)).[4]i32,[16]i32,[64]i32). The old[]i8could not hold 255, and a slice of run-time values returned from a function dangles.ternary_dot_nxn,ternary_gemm_8x8_elem,ternary_gemm_8x8).get_elem_{2x2,4x4,8x8}are bounds-checked per axis ((0, 4)used to read the next row).[5,3,7,2]against codes[2,1,1,2]gives[-2,2,-5,5]; the 8x8 all-ones case gives 8 and the all -128 / all -1 case 1024, mirroring the GPU oracle (ternary_gemm_gpu.t27, igla-coder: ternary x int8 GPU GEMM kernel spec, bit-exact in three modes (Closes #10361) #10362).ternary_gemm_8x8_cols, theternary_gemmdispatcher and its.len()invariants), the struct wrappers over the dangling slices, out-of-range-input tests that assumed a silent zero, and tests whose expectation was wrong on a meaningless input.Measured on the lab (head 38ab8dc)
t27c seal --verify: all hashes MATCH; neither seal carries ablockedentry any more.tools/verify_igla_race.py --require: OK.tools/check_assertionless_spec_tests.py: ratchet re-blessed in the same commit, ternary_gemm 144 -> 142.Not done (follow-up)
Both files still carry about 142-144 empty
{ /* verify baseline */ }wave-loop tests that cannot fail; the ratchet pins them. Out of scope here.🤖 Generated with Claude Code