Commit d7b6c33
committed
feat(v7-f56b): symbolic-dim warning in verify_build_spec
Closes the implementation gap left by cppmega-mlx-jjt5 (V7-F56), which
landed an xfail-strict pytest pinning the honest finding that
H=128, nh=3, head_dim=50 passes silently through verify_build_spec.
cppmega_v4/buildspec/diagnostics.py:
- New _check_symbolic_dims walks dim_env and, when all three of
(H, nh, head_dim) are pinned, emits a WARNING-severity diagnostic
iff nh*head_dim != H. Warning (not error) because attention bricks
ship an internal W_Q : R^H → R^{nh*head_dim} projection, so the
decoupled-Q convention is legitimate in this codebase.
cppmega_v4/runner/stages.py:
- stage_parse now passes the wire-form dim_env into ModelBuildSpec
so the new check has the data it needs. Previously dim_env was
dropped at parse time (default empty mapping), masking the F56
honest finding entirely.
tests/v4/test_symbolic_dim_validation.py:
- xfail marker removed; the dedicated F56b assertion now asserts
status='ok' with warnings>=1 for the incompatible combo.
- Added test_v7_f56b_compatible_combo_produces_no_warning so the
validator is regression-pinned against false positives.
Verified non-regression: 24/24 pass across
test_symbolic_dim_validation, test_dim_scaling_sweep,
test_moe_realistic_scale, test_tokenizer_preset_matrix.
UI badge for surfacing the warning lands in a follow-up commit.
Ref: cppmega-mlx-j3qa.21 parent 616eebc commit d7b6c33
3 files changed
Lines changed: 77 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
272 | 314 | | |
273 | 315 | | |
274 | 316 | | |
| |||
310 | 352 | | |
311 | 353 | | |
312 | 354 | | |
313 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
314 | 360 | | |
315 | 361 | | |
316 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
167 | 172 | | |
168 | 173 | | |
| 174 | + | |
169 | 175 | | |
170 | 176 | | |
171 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
60 | 54 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
| |||
0 commit comments