Repository navigation
contract: every chip checks each chip's qwen27 control edit matches its source once, so an M4 run sees a stale M5 edit - #3343
Open
cshintov wants to merge 2 commits into
Conversation
…ts source once, so an M4 run sees a stale M5 edit
This branch has not been deployed
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.
What this changes
Suite.collectinmetal_q27_attn_rows.zigfirst builds the attention source for both tensor-unit settings and requires each control's edit to occur exactly once. On a mismatch it prints which control, which setting and the count, and returnserror.ControlEdit.Why: #2106's last commit changed
q27_attn_prefix's line toMASKED && q27_nonfinite(, and the M5 decode control's edit went stale (fixed in207ebc7fd). Before M5 the decode control isn't registered, so a pre-M5 run never built that edit, and our M4 contract passed. With this check, a pre-M5 run fails on a stale M5 edit too.Design
Choice: check the edit's source text once, up front, for both settings, on every chip. It reads source only, so it costs milliseconds and needs no device with tensor units.
Alternatives considered:
Checks
4ddc28cfc, an M4 Pro (no tensor units).tf-kernel-contract --only qwen27:SUMMARY 30 kernels: 30 pass gates 1-4, 0 fail, 0 known findings; 3 controls: 3 red as planted, 0 missed; 0 limit problems, exit 0.fromput back toconst bool masked = q27_nonfinite((the text before207ebc7fd), the same run on the M4 exits 1:control edit for decode rows (tensor units true) matches 0 times, not once: const bool masked = q27_nonfinite(, thenerror: ControlEdit.zig fmt --check: clean.tools/pr_check.py: 0 errors, lean 341 against 341 (0 new).