Skip to content

train 1125082803: #4258 #4809 (CI only) - #5013

Closed
ashhart wants to merge 13 commits into
mainfrom
lead/train-1125082803
Closed

ashhart wants to merge 13 commits into
mainfrom
lead/train-1125082803

Conversation

@ashhart

@ashhart ashhart commented Nov 25, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #4258 #4809 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

gilby and others added 13 commits November 25, 2026 08:28
Add fused DFlash2 Q4 Metal decode kernels (glm_dflash_kv_append,
glm_dflash_qkv_prep, and glm_dflash_conv_norm) with stacked KV/QKV/
gate+up projections in metal_dflash_opt.zig, pack active batch mask rows
before final norm and head projection in metal_dflash_same.zig, route
draft_head ahead of target head in metal_dflash_backend.zig, and exclude
prefill-only rounds from Shared.step decode timing in metal_dflash_source.zig.

Refs #3152
…e next request

Engine.release frees every unpaged slot's sequence, so a server's slots 1 to 3
rebuild per request: the next request allocates a window, zeroes it and fills it
from the prompt. Slot 0 already keeps its sequence across requests; with
TF_GLM_KEEP_SEQS=1 every slot does, as the default-off switch its name implies.

The setting is read through platform/environment.zig on every rank, since release
runs on each of them. A released sequence keeps its arena and its State reset by
the next request's begin; nothing else is held, so an idle slot is the same bytes
it held after its last release.

glm-keep-seqs-check compares kept sequences against fresh ones byte for byte and
step for step: greedy tokens, bf16 logits rows and the MTP head's drafts at each
step. It covers a prompt shorter than the one the slot last held (6,000 tokens,
then 600 and 3,000), a kept state with every byte poisoned to 0xFF, slot 0 with
the switch off, and it plants a control that must differ from the fresh run,
failing as planted when the comparison cannot see it.
The check joins zig/tests/cuda/main.zig's commands as glm-keep-seqs-check CKPT
ID_PATH RANK WORLD, beside glm-solo-check and glm-pair-check, so
compile-cuda-tests builds it and the GPU runner can dispatch it.
keepsSequence takes the engine now, so the comment says the slot keeps its
sequence rather than naming a call shape the code no longer has.
Engine.init takes usize for both; the runner hands the check c_int, as the
other GLM checks cast theirs. compile-cuda-tests failed on the uncast form.
The switch was read where the server builds its engine, which left any other
caller of Engine.init without it: the GPU check set the variable and still saw
the setting off. It is a field of ranks.Settings now, read once from the
environment and passed in the engine's options, so the server and the checks
agree and the ranks' agreement covers it too.
The fingerprint is compared across ranks to stop a run whose settings differ, and
it lists its fields one by one, so the new setting joins it and its version is
24. The divergence test gains the field, so a rank that keeps or frees a
released sequence unlike its peers stops the run.
…ep_seqs

Fingerprint.Field and mismatch() list the fingerprint's fields by hand, so the
new setting joins both. Without them the divergence test named a member the enum
did not have.
…y field

The mismatch report's switch covers every Fingerprint.Field value, so a new
member needs its line or the runner does not compile.
zig/src/families/glm/cuda_env_test.zig asserts that every glm row is named in one of
its lists and that the count matches, so a new flag row has to be listed or the test
fails on the count.
The check compared a kept sequence against a fresh one; it never resumed. This adds the
resume: a prompt state kept at 2048, a second request that resumes from it on the same kept
slot, compared against a fresh run on tokens, bf16 logits rows and MTP drafts, with a control
that poisons every prompt-cache byte and must make the comparison fail.
@ashhart

ashhart commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Landed: #4258 #4809 as main ef4d642. This PR only carried their CI.

@ashhart ashhart closed this Nov 25, 2026
@ashhart
ashhart deleted the lead/train-1125082803 branch November 25, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants