Repository navigation
test(turbo): exercise the steel kernel and classify #1712 failures - #2318
Merged
inureyes merged 2 commits intoOct 15, 2026
Merged
Conversation
The steel-envelope parity test reached attention_turbo4_delegated_steel only through update_and_turbo4_delegated_attention, which has returned from the default-on dequant-first SDPA route since f77e98b, so the steel launcher had no test. Both steel tests now call it directly and still hold the wrapper's output to the same bound. On failure the tests panic with a report from the new test-only cache/delegated_parity_diag.rs: route gates, a comparison of both caches' state, each output against the graph reference with its max-abs location, dropped-contribution signatures, and an in-process re-run of every route. Thresholds are unchanged. The #1712 value 4.6824e-1 matches the cold-V-dropped signature (4.6820e-1) reproduced on CUDA. Validated on CUDA: the new diag tests pass, and clippy -D warnings is clean with the macOS gate lifted. Refs #1712
inureyes
deleted the
fix/issue-1712-delegated-steel-envelope-diagnostics
branch
October 15, 2026 17:55
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.
Summary
Classify the #1712 failure as far as the evidence allows, make the next recurrence self-classifying, and fix a coverage gap found on the way: the "steel envelope" test has not exercised the steel kernel since May.
Findings
The test never reached the steel kernel.
update_and_turbo4_delegated_attentiontries the dequant-first SDPA route first, and that route has been default-on since f77e98b (2026-05-08, two days after the test landed in 09d9cc6). Under the default env the wrapper returns beforeattention_turbo4_delegated_steel, and nothing else calls it. So the test, and the launcher CONTRIBUTING.md names for post-pin-bump re-validation, compared dequant-first SDPA against the cold-only composition. The4.6824e-1came from that pairing, not fromturbo4_delegated_steel_sdpa.The wrong value is "cold V contribution dropped". I rebuilt step 0 (cold_offset=8, hot_offset=1, same seeds) on CUDA and measured candidate wrong outputs against the graph reference. Attention with the cold V rows zeroed sits at RMS 4.6820e-1, 4e-5 from the reported 4.6824e-1 (the two correct paths differ by about 1.4e-4). The next closest candidates are far off: K read at full buffer capacity 4.03e-1, all-zero output 5.12e-1, hot V dropped 5.15e-2, missing inverse rotation 7.85e-1. So on one side the cold contribution was all zeros: either the bulk rotated-dequant output (dequant-SDPA route), the cold weighted-sum output (cold-only route), or a zero
v_rescale. A never-written fresh Metal buffer reads as zeros, which explains why the value repeated to five digits while the failure itself was rare. The value alone cannot tell which side or which of these.It has not recurred. Nightly verify since 2026-09-08: 48 runs. 44 ran the test and all 44 passed (0accedd through 537ebe1, four Mac minis). One run failed before the test step (38430123889) and one was cancelled. Six of the passes ran on MLX 243bdf09 (PR #2304 branch and main after the merge). Every nightly passes
--test-threads=1, while both failures came from multi-threaded workspace gates. That fits the shared-device hazard of #163/#1008 but does not prove it. In this window the delegated kernel source changed only by #2029 (dispatch throughselect_kernel_port, kernel bodies untouched), the #2305 move, and the #1796 header update. A code read of the three launchers found no unwritten output region, out-of-bounds index, or missing barrier.Changes
cache/delegated_parity_diag.rs. On failure it reports the route gates, a comparison of the two caches' K, packed V, rescale and hot V, each observed output against the graph reference (with the max-abs location), the dropped-contribution signatures, and an in-process re-run of every route on both caches. Thresholds are unchanged.attention_turbo4_delegated_steeldirectly, and still check the wrapper's output, so the pairing that failed keeps its coverage.Test plan
cache::delegated_parity_diag_tests(2 tests) pass and run the full report path. The step-0 candidate table above comes from a throwaway test on the same binary.-D warnings,--lib --tests). Gate restored before commit.Refs #1712