Commit 494f53e
Run the fp8 test, and cover the reader whose guard was load-bearing
Two things on top of tomatotomata's checks, which are unchanged and were
right: the mutants I planted in unblock_scale — returning q untouched,
transposing the block dims, dropping the [:M, :N] crop, removing the shape
guard — were all caught, and expected_dequant being an independent index-array
implementation rather than a second call to the code under test is what gives
it that.
It never ran. run.sh invoked it as bare `python3`, and torch is not a system
package on the machines that test this: CLAUDE.md says it is never a repo
dependency and every other torch checker goes through uv. So the whole thing
reported "torch not installed" and skipped everywhere, CI included — where the
Linux job is the one that installs uv, which is to say the one place it does
get to run. Through run_uv now, with the guard on uv rather than python3,
since without uv run_uv exits 127 and the catch-all would report FAIL where a
SKIP is meant. 56 passed / 0 failed / 2 skipped becomes 57 / 0 / 2.
And the missing-companion check exercised ST only. Deleting ShardReader's own
`raise` in convert.py, so it returns the tensor unscaled instead, kept the
suite green — a silent wrong answer in the reader #26's description called out
as "a second reader and was easy to miss". Both readers now, and that mutant
is killed.
The same mutation against ST survives, and should: without its guard, raw()
still raises KeyError naming weight_scale_inv, so the contract the test asserts
— refuses, and says which tensor — holds either way. That guard buys a better
message, not a different decision, and asserting its exact prose would test the
wording rather than the behaviour.
Also wrote down the case nothing here can catch, which is the reason the tile
size is read from config rather than inferred: 300 rows against 3 scale rows
admits both 128 and 100, both pass every shape check, and the wrong one applies
each scale to the wrong rows.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 6d61fb2 commit 494f53e
2 files changed
Lines changed: 41 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1342 | 1342 | | |
1343 | 1343 | | |
1344 | 1344 | | |
1345 | | - | |
1346 | | - | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1347 | 1355 | | |
1348 | | - | |
| 1356 | + | |
| 1357 | + | |
1349 | 1358 | | |
1350 | 1359 | | |
1351 | 1360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
| |||
81 | 91 | | |
82 | 92 | | |
83 | 93 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
92 | 113 | | |
93 | 114 | | |
94 | 115 | | |
| |||
0 commit comments