Commit a611712
Fix NaN in _chunk_scaled_dot_kkt_fwd_eager across all 3 gated deltanet kernels
Zero out g_diff outside the strict lower triangle before calling exp(),
preventing inf * 0 = NaN when upper-triangle g differences overflow.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 24b5bce commit a611712
3 files changed
Lines changed: 6 additions & 3 deletions
File tree
- problems/helion
- gated_deltanet_chunk_fwd_h_py
- gated_deltanet_chunk_fwd_o_py
- gated_deltanet_recompute_w_u_py
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments