You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three landings in one commit, all enabled by switching the test runner
to the nanochat venv (Python 3.13 + tilelang already installed there):
1. mlx-lm PR #1066 — Kahan-compensated kv_mem accumulation + 4-way
time-loop unroll. Vendored into both:
- cppmega_v4/nn/_external/_mlx_lm_gated_delta_vendored.py (Path E)
- cppmega_v4/_tilelang/linear_attention_path_b.py (our hand-MSL)
Without this, long-T runs accumulate bf16 rounding into kv_mem and
the delta-corrected state drifts. Cost: 3 FLOPs/iter on the inner
reduction; the unroll amortizes the loop overhead.
2. Removed `from __future__ import annotations` from
linear_attention_path_c.py and kda_path_c.py. tilelang's
@T.prim_func builder calls get_type_hints which evaluates
T.Tensor((BATCH, SEQ, ...)) annotations against globals — under
PEP 563 the closure-local BATCH/SEQ/... become unresolvable
strings and the kernel build fails with NameError. mamba3_path_c.py
avoids future-annotations for exactly this reason; we now match.
3. Dispatch tests updated: Path C is real-or-fallback (real when
tilelang importable, fallback otherwise); auto-mode preference
accepts path_c when available. Renamed
test_gdn_paths_c_d_currently_deferred → test_gdn_path_d_still_
deferred_without_triton (Path C no longer in that bucket).
Real Path C prim_func parity test (was skipped) now PASSES against
Path A on the nanochat venv. v4 suite: 178 passed / 2 skipped (was
175 passed / 3 failed).
0 commit comments