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
fix(cpsat): feed CP-SAT a feasible no-eager warm-start hint (post-J d=4096)
At d=4096/d_head=32 the layer scheduler silently fell back to the heuristic
(85 layers) at every optimize>0. The warm-start hint was infeasible for three
separable reasons; a soft AddHint of an infeasible incumbent gives CP-SAT
nothing to seed from, so it cold-searches an ~80K-var model and times out.
- Node.__deepcopy__ returns self: the warm-start's copy.deepcopy(residual_map)
cloned the pos node, breaking the `n is pos_encoding` reservation check, so
the hint freed pos early and the model rejected it by len(pos)=17 columns.
- _TrackingResidualStreamMap clears stale cancels on re-allocate/reassign: a
rolled-back speculative allocation (scheduler.py:479/483) recorded
cancel<birth, hard-infeasible in the layer-granular model (the 3 nodes that
kept the otherwise-feasible no-eager hint from being a complete incumbent).
- Free-add residual interval start shifted by is_free[A] (residual over-count).
- Warm-start runs with eager_free=False so the hint is the model-representable
no-eager schedule; the heuristic fallback stays eager (no regression < 85).
Result: compile_to_onnx(optimize=2) reaches 81-82 layers (vs heuristic 85), no
fallback, I1-I4 sound. Reverted a broken sublayer_residual prototype.
Tests: rollback-cancel + Node.__deepcopy__ (test_residual_map.py), eager_free
gate (test_scheduler.py). Full compile/forward + graph suite green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments