Commit 989c4f8
committed
refactor: RULE #1 - kill 4 P0 silent fallbacks (surface hidden Path C bugs)
Replace 4 automated/silent fallbacks with immediate raises (RULE #1: no automated fallbacks,
fail loud). Each kill surfaced a real, previously-hidden bug:
- GDN dispatch (linear_attention_paths.py:108) + KDA dispatch (kda_paths.py:96):
_dispatch_failure_or_fallback silently ran Path A when the selected Path C/D/E kernel crashed
-> now raises. SURFACED: GDN/KDA Path C broken (SystemError: ffi.Function returned NULL at the
tvm-ffi boundary).
- Mamba3 dispatch (mamba3.py:502): `except RuntimeError: pass` silently dropped a crashed Path C
to Path B/ref (falsely commented fail-closed) -> now raises. SURFACED: Mamba3 Path C
DLPackConversionError (tensor not contiguous).
- Engine dispatch (_engine_dispatch.py:63): `except Exception: pass` swallowed FP8-intrinsic
registration failure -> now only genuine import-absent is skipped; the assert propagates.
4 tests were green ONLY because the fallback handed them Path A output (never exercised Path C)
-> they now fail correctly; the fallback was NOT restored. The surfaced bugs (GDN/KDA Path C
ffi-NULL, Mamba3 Path C contiguity) are the next fixes. Staged: _cuda_eager writeback swallows,
compiled.py eager-replaces-fused, gated matmul2d, MSL-shim fallbacks.1 parent c0fdae3 commit 989c4f8
4 files changed
Lines changed: 52 additions & 14 deletions
File tree
- cppmega_mlx/nn
- _tilelang
- cppmega_v4/_tilelang
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
506 | 517 | | |
507 | 518 | | |
508 | 519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
118 | 128 | | |
119 | 129 | | |
120 | 130 | | |
| |||
0 commit comments