Skip to content

Sync: corpus/clubb_solve switches its scalar loop the way CLUBB does - #17

Merged
chenyueqi merged 1 commit into
mainfrom
sync/held-bounds
Sep 9, 2026
Merged

chenyueqi merged 1 commit into
mainfrom
sync/held-bounds

Conversation

@chenyueqi

Copy link
Copy Markdown
Member

Carried by tools/export sync; the commit names its origin in a Carried-From trailer.

corpus/clubb_solve's xp2_solve now takes CLUBB's shape around its scalar loop: an error return after the first solve, a static PDF selector (ipdf_type, compared with a module constant), the per-scalar assembly with its own returns under any other PDF and the held-bound loop under ADG1. On the engine before the accompanying fix, the port of this tree failed to trace (a lax.cond whose arms disagreed, int64 against int32) -- the same failure the whole CLUBB step showed on the one recorded case with passive scalars while every case without them passed. Both summaries re-recorded from the isolated environment CI uses.

🤖 Generated with Claude Code

…b_solve switches its scalar loop the way CLUBB does

The anchor's held loop bounds (_dolo_sclr, _dohi_sclr) start as
jnp.int32(0) at the top of the kernel and are carried by every cond
around their loop, but a store of one in a branch the trace resolves --
CLUBB's variance solve sets `_dohi_sclr = sclr_dim` under the PDF
switch's else, after an error return -- went through no cast: the
literal-strengthening rules exempt a name that bounds a range, and the
tree marks a local set from statics a trace-time value. Under the return
flag's cond the arms disagreed, int64 against int32, and the whole step
would not trace on gabls2, the one case with passive scalars, while every
case without them compiled and passed the gate; the 103-job re-gate did
not include the scalar recordings, and the closed-loop run found it.

lower_assign now wraps every store to a `_do(lo|hi|st)_*` name in
jnp.int32. tests/test_jax_transform.py holds the rule with the extents
and statics set the way CLUBB's kernel had them. corpus/clubb_solve's
xp2_solve takes CLUBB's shape: an error return after the first solve, a
static PDF selector (ipdf_type, a module constant to compare with), the
per-scalar assembly with its own returns under any other PDF and the
held-bound loop under ADG1 -- on the engine before this change its port
fails with the same TypeError; both summaries re-recorded from the
isolated environment CI uses.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: lewisychen <yueqichen.0x0@gmail.com>

Carried-From: 19607c9e3cee34b662ad1b6010b7d8d7ce5f1779
@chenyueqi
chenyueqi merged commit feb065a into main Sep 9, 2026
13 checks passed
@chenyueqi
chenyueqi deleted the sync/held-bounds branch September 9, 2026 15:54
@chenyueqi chenyueqi added corpus The shipped corpus trees, their summaries and the baseline regression Fixes something that once worked; the shape is pinned so it cannot come back sync Carried from the engine by tools/export sync; each commit names its origin labels Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

corpus The shipped corpus trees, their summaries and the baseline regression Fixes something that once worked; the shape is pinned so it cannot come back sync Carried from the engine by tools/export sync; each commit names its origin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant