WIP: pp-glue2 — GDN prefill tail fused (gtl) + cross-layer add fold (xa) on dnf+dna, tier-1 PP +3.9–4.2% at 32k #269

Closed
Grok wants to merge 35 commits from pp/glue2 into master
Owner

Builds on #265 (pp/glue: dnf + dna); this branch contains it.

Levers (default off, bitwise, in-boot self-tests on both chips, MUSTFAIL refused in ttsim, JIT-check 13/13):

  • QWEN36_PREFILL_GDN_TAIL (gtl): the GDN prefill tail's per-head rms_norm + nlp_concat_heads run as one generic_op, and silu(z)·out as one fp32-DEST pass.
  • QWEN36_PREFILL_DNORM_XADD (xa): the cross-layer x = h + ff_out is folded into the next layer's attention-norm PRE pass (dna's run_add).

Card (ab20261019T202015Z, 2 reps, vs CONTROL S2). Each cell is PP tok/s and TG tok/s/user, S2 → gtl → gtl-xa:

cell PP TG
B1/4k 6502 → 6655 → 6682 73.38 → 73.16 → 73.55
B1/32k 6458 → 6685 → 6709 65.42 → 65.37 → 65.57
B4/4k 6197 → 6270 → 6355 76.91 → 77.61 → 76.21
B4/32k 6479 → 6709 → 6747 62.18 → 62.28 → 62.66
B8/4k 5845 → 5995 → 6065 63.15 → 63.75 → 64.95
B8/32k 6496 → 6713 → 6769 52.12 → 52.05 → 52.51

Per-op attribution. One workbench boot with five views (on / noxa / dnfdna / dnf / s2). The logits sha is identical across all views. Device busy per 32k chunk, in ms:

lever busy saved (ms/chunk)
dnf −8.2
dna −2.1
gtl −3.8
xa −0.6

Before merge: tools/ttx/tests/test_prod_matches_nix.py::test_mounts fails. The nix serving module must list the new overlay files: dnorm_fuse.py and gdn_tail.py plus their kernels.

Records: bench/runs/prefill-glue2-card-verdict-20261019.jsonl; LEDGER R-2026-10-19-glue2.

🤖 Generated with Claude Code

Builds on #265 (pp/glue: dnf + dna); this branch contains it. **Levers** (default off, bitwise, in-boot self-tests on both chips, MUSTFAIL refused in ttsim, JIT-check 13/13): - `QWEN36_PREFILL_GDN_TAIL` (gtl): the GDN prefill tail's per-head rms_norm + nlp_concat_heads run as one generic_op, and silu(z)·out as one fp32-DEST pass. - `QWEN36_PREFILL_DNORM_XADD` (xa): the cross-layer `x = h + ff_out` is folded into the next layer's attention-norm PRE pass (dna's `run_add`). **Card** (ab20261019T202015Z, 2 reps, vs CONTROL S2). Each cell is PP tok/s and TG tok/s/user, S2 → gtl → gtl-xa: | cell | PP | TG | |---|---|---| | B1/4k | 6502 → 6655 → 6682 | 73.38 → 73.16 → 73.55 | | B1/32k | 6458 → 6685 → 6709 | 65.42 → 65.37 → 65.57 | | B4/4k | 6197 → 6270 → 6355 | 76.91 → 77.61 → 76.21 | | B4/32k | 6479 → 6709 → 6747 | 62.18 → 62.28 → 62.66 | | B8/4k | 5845 → 5995 → 6065 | 63.15 → 63.75 → 64.95 | | B8/32k | 6496 → 6713 → 6769 | 52.12 → 52.05 → 52.51 | **Per-op attribution.** One workbench boot with five views (on / noxa / dnfdna / dnf / s2). The logits sha is identical across all views. Device busy per 32k chunk, in ms: | lever | busy saved (ms/chunk) | |---|---| | dnf | −8.2 | | dna | −2.1 | | gtl | −3.8 | | xa | −0.6 | **Before merge:** `tools/ttx/tests/test_prod_matches_nix.py::test_mounts` fails. The nix serving module must list the new overlay files: `dnorm_fuse.py` and `gdn_tail.py` plus their kernels. Records: `bench/runs/prefill-glue2-card-verdict-20261019.jsonl`; LEDGER `R-2026-10-19-glue2`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Grok added 31 commits 2026-10-19 23:25:03 +02:00
Believed before: dual-NoC MR "hung the mesh in c99", so it stayed parked. That was rev 1; rev 3
(pk3q, shipped inside pk3r) passed small-shape hw1card and ran in-model at c103/c104/c108 without a
hang, but it was inert to negative and nothing measured it at the served shapes (w2 r3/in0 34,
lm_head 4 x 3936), under trace replay on one card, per call, or counted how many readers move to
NOC1.

mr_gate.py builds the eight served per-chip roles (describe strings asserted against the served
banner), and runs rungs eager (PCC vs host), seq and trace replay (bitwise vs eager), then timing:
realtime-profiler device us and GB/s per role. supervise.py is a stdlib parent with per-rung
deadlines. A C++ wait can hold the GIL, so an in-process timer cannot bound a hang; on overrun the
parent kills the probe's process group. gate1card.sh runs off/on/mustfail plus a per-role on_noc1
census on card 1 only. After a hang it first tries a fresh open, which soft-resets the RISCs. Only
if that fails does it reset card 1 with tt-smi -r, never the mesh. It writes an EXIT-trap record on
every path.

ttsim (correctness only): PASS. on and mustfail are bitwise equal to off at every served role,
seq is bitwise equal to eager, and PCC vs host is >= 0.99995. Banner: readers=24 on_noc1=8 for the
first program on ttsim's 13x10 grid. Record:
bench/runs/mr-dual-noc-gate-ttsim-20261002T211439Z.jsonl

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Believed before: per-op prefill time needs a Tracy image, and AGMM roles can only be told apart by
duration clusters. In c127 the traced profile filed about 90% of a chunk under one kernel name,
because the realtime profiler's kernel lookup keys on a 16-bit runtime id that collides under trace.

Evidence that changed it: on the served pk3r image, ttnn._ttnn.get_device_operation_id() is the
counter that mesh workloads take their runtime ids from, and every ttnn op is a
decorators.FastOperation. So reading that counter before and after each call gives the exact
program ids each op launched.
- QWEN36_OPMARK=1: opmark.py wraps FastOperation.__call__ plus per-layer gdn/attn/mlp scopes, and
  records rows only inside a profiler window. Unset: install() returns before touching anything.
  Device programs are unchanged either way, and so is the tensor-cache key.
- opmark_join.py joins realtime records to rows by low-16 id plus issue order.
- `ttx wb profile --eager` hides the chunk/bucket traces for one call, so every program is named;
  `--no-opmark` is the off control.
- `prefill-op-share.py --named` prints per op and per role: count, us, cores/grid, FLOPs, TF/s,
  % LoFi peak (bfp8 also % HiFi2), % prefill wall, AICLK-rescaled.
- bench/probes/prefill_opmark/run.sh is the B8/32k run. The must-fail sets SDPA to HiFi2: SDPA must
  grow >= 20% with AGMM within 3%. The logits sha must match across traced, eager, and eager with no
  recording. verdict.py writes the record on every exit path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
#151: wb-...-opmark boot refused at pre-flight — the arm's expected patches 0033/0034/0035 banners
never showed; ttx lint had already warned the staged overlay carried only 13 files and those banners
live only in image-patch, not the staged store overlay. No named per-op table was produced
(named_table: null). Root cause: this worktree never ran `nix run .#ttnn-incr -- ship
bench/overlays/pk3r+0033+0034+0035.json` before queuing the probe (upstream-154 did the equivalent
ship for +0040 only, at step 172, in its own tree).

#153: mr_dual_noc/gate1card.sh PASS on card 1 — off/on/mustfail bitwise equal, TT_MR_IN1_DUAL_NOC
moved odd-indexed in1 readers to NOC1 for all 8 roles, ~6-9% device_us speedup on/off, mustfail ~35-50%
slower with no hang.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Believed before: c160 step 167 failed because QWEN36_OPMARK never engaged in the
workbench (verdict checks.banners = {opmark_engaged: false, opmark_not_engaged:
false}), blamed first on an unshipped overlay.

The evidence: the preflight record ttx-wb-...-opmark-20261002T220627Z.jsonl is
kind REFUSED with banners.missing = [QWEN36_MTP_BATCH scheduler engaged,
QWEN36_MTP_BATCH runner engaged, num_lookahead_tokens=6, QWEN36_MTP_ASYNC
scheduler engaged, QWEN36_MTP_ASYNC runner engaged]; "QWEN36_OPMARK engaged"
was expected and NOT missing, so install() ran in the wb process
(initialize_vllm_model) and its banner is in the wb log. Those five are printed
only by vllm_tt_plugin platform.py (scheduler config) and model_runner.py, which
a workbench (no vLLM engine) never runs; this is the first wb arm over an MTP
arm, so ttxlib/wb.py ENGINE_ONLY had never needed them. `ttx wb prefill` exits
1 on a REFUSED record, run.sh `exit 1`ed at the preflight, and its banner grep
sat after the last step, so <out>.banners.txt was never written: both
verdict flags false meant "no file", not "banner absent".

Fix: ENGINE_ONLY gains the plugin-only banners (MTP scheduler/runner,
num_lookahead_tokens=, MM_CHUNK_GUARD); model-side MTP banners stay required.
run.sh's grep moves to banners.sh, run from finish() on every exit path before
wb stop; verdict.py reports file_present and a wb_banners check that names
what ttx refused. Device/served code untouched (off stays byte-identical).
Test: test_prefill_opmark_banners.py on a wb-shaped log sample built from the
served kda2 B8 log; the old code reproduces the exact five-banner refusal.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
c165's prefill-opmark probe (queue-c165.log step 11) crashed on `wb set`'s
recapture: ValueError: row 0: position 0 is past its page table (0
positions), in mtp_batch_host.py plan(), raised from warmup_model_decode ->
_mtp_decode_step -> mtp.maybe_step -> host.plan.

Root cause: release_traces() releases the main model's trace ids
(_chunked_trace_id/_bucket_trace_id/_vfy_trace_id, trace_ids_decode,
trace_id_prefill) but never touched model._mtp_batch, which keeps its own
per-bucket trace ids (v_trace/r_trace/cc_trace/cd_trace/c2_trace/c_trace) and
its own `captured`/`compiled` flags. Believed: a `wb set` recapture starts
every component clean, like a fresh boot. Evidence it didn't: `captured`
stayed True across the knob-set recapture, so (a) MTPBatch.capture()'s
`if self.captured: return` silently skipped recapturing the MTP traces for
the new knob at all, and (b) the following warmup_model_decode, now routed
through the real maybe_step()/host.plan() path instead of the "not captured"
fallback a fresh boot takes, hit host.plan() with the warmup's synthetic
all-zero page table/start_pos and got correctly rejected.

Fix is workbench-only: release_traces() now also releases the MTP sidecar's
bucket trace ids and resets `captured`/`compiled`, so a recapture behaves
like a fresh boot on the MTP path too. plan()'s check is untouched -- it is
right to reject position 0 against an empty page table; the bug was handing
it stale state, not decode warmup touching the real check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Believed: the named per-op table would show concat/slice/copy at ~50% of 32k prefill.
Evidence: the opmark NAMES are misaligned in both modes (eager AGMM rows imply 190-430% of
LoFi peak; traced rows carry 512-bucket shapes and decode kernels), and the must-fail rung
(SDPA HiFi2) never ran because ttx refused `wb set` on an expected eager-only banner
("QWEN36_MTP_WARM_TAIL skipped"). eager vs traced logits sha differ. The eager per-kernel
device view (kernel sources, physically consistent) puts data movement at 22.8% of chip0
device busy (tilize 7.2%, untilize 5.3%, slice 7.5%, reshape 1.3%, concat 0.5%), not 50%.
Step 18 rc=1 is a probe verdict (INCOMPLETE), not a card failure. Workbench: no served speed number.
224352Z is the earlier, superseded run of the same probe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Believed (c169): the eager profile is the guaranteed naming and the low-16-bit join only errs in traced mode.
Evidence it was not: eager rows put AGMMs at 190-430% of LoFi peak and traced rows carried 512-bucket/decode shapes.
Cause: wb_core joined window rows + EVERY capture row, and opmark_join.join() picks among low-16 candidates by a
lookahead that ties on every densely annotated region; its -c tie-break picks the OLDEST (boot captures), and
continuity then keeps it there. A pinned test reproduces it (test_low16_join_crosses_captures).

Fix:
- opmark.py (QWEN36_OPMARK=1 only; off is untouched): wrap ttnn.begin/end_trace_capture to keep each capture's
  device-op id range per trace id, and execute_trace to drop a zero-width "<trace-replay>" row in the window.
- opmark_join.align(): the exact stream the chip ran (window ids in issue order, each replay expanded into its
  capture range); records matched in order, far hits need confirmation, misses never move the pointer.
  named_table counts call instances (a replayed row ran 16x per prefill, not once per distinct id_lo).
- wb_backend: eager profiles are bracketed by WB_EAGER_WINDOW markers and the MTP warm-tail skip counter is restored
  after; ttxlib/wb.py accepts "QWEN36_MTP_WARM_TAIL skipped (" ONLY inside those windows (the eager chunk path
  reports no segments, so "window covered 0/2048" is by design); outside, or any other absent banner, still refuses.
- probe: eager is NOT the served program set (c169: 56139 vs 42320 chip-0 programs, logits 7f67 vs 2f26), so the
  TRACED profile is now the named table; new tracedoff rung (opmark changes nothing); the HiFi2 must-fail runs on
  the traced profile (SDPA >= +20%, AGMM +-3%), eager mf rides along as info; coverage requires join == align.

Host tests: test_opmark_join (align, trace hooks), test_prefill_opmark_banners (eager window, must-fail verdict
PASS / blind refuted / AGMM leak refuted / missing mf INCOMPLETE / low16 join FAIL:coverage / logits FAIL:identity).
Full ttx suite: the same 2 failures + 1 error as serving-throughput HEAD (prod_matches_nix mounts, seed_symlink).
No card time; no speed number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 32k opmark (CONTROL dfr) charges the 128 decoder norms per chunk 18.4 ms: the image's
rms_norm_pre/post_all_gather each read h ([M,2560] bf16) from DRAM on 64 cores whose readers
barrier on every tile, so post runs at ~190 GB/s and h crosses DRAM twice. We believed the
stock 2D core grid would fix this (OP-DATASHEETS P6); in ttsim the 2D post corrupts M=2048
(#56908 row stride) and the 2D pre trips a packer-format UB, so that path is dead.

This lever replaces pre/post with two generic_ops on the same M/32 cores: PRE reads its tile
row on both NoCs (one barrier per 8-tile chunk) straight into an L1 height-sharded copy and
computes stats with the image's LLK sequence; the stats all-gather is unchanged; POST
normalises from the local shard (no DRAM read of h). Default off, flag-off byte-identical
(module-level env check), banners literal, self-test at boot on both chips with a gamma-shift
wrong-input branch; MUSTFAIL serves the shift and must be REFUSED.

Gates: ttsim 1-chip bitwise (stats, shard, output) at M 32..3072 x bf8/bf16 x L1/DRAM; ttsim
1x2 mesh with the real all-gather through the rmsnorm.py hook; JIT syntax check of all 10
RISC programs against vllm-tt:k2-mr-pk3r (scripts/jit-check-kernel.sh gains --src-dir,
--define, --descriptors and trisc0..2 for generic_op kernels). Arm: S2-dnf.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The first S2-dnf card boot passed the self-test on both chips (16 cells, bitwise vs the image
ops) but then died in warmup. A GDN op's static CBs clashed with an L1 buffer: "static circular
buffer region ends at 898048", buffer at 852928. The cause was ordering. y (the attention
norm's L1 output) was allocated while the 160 KB/core hs shard was alive, so it landed below
hs. Once hs was freed, y sat about 166 KB lower than the image path ever puts it.

y is now allocated before PRE. The 1x2 mesh probe gained an l1_placement check: from the same
allocator state, the fused y must not sit lower than the image path's y.
- On the old code the check fails: 1334528 vs 1500416.
- On the fixed code it passes: 1502464 vs 1500416.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Before this, every layer ran h = ttnn.add(x, attn_out) and then the ff norm read h back. At
32k the adds measure 55-60 us per call, which is 31.5 MB of traffic at DRAM roofline. With
dnf the PRE pass reads h once anyway. This change makes PRE read x and attn_out (both NoCs),
add them into the L1 shard, and write h to DRAM for the second residual add. That saves one
10.5 MB read of h and one op per layer. Estimate: about 20 us per layer, 1.3 ms per chunk
(not measured).

Bitwise first: in ttsim, add_tiles (fp32 or 16-bit DEST) matches ttnn.add exactly for
bf16+bf16 and bf16+bf8. The folded h and y match ttnn.add plus the image norm at M
32..2048, for b bf16/bf8, out bf8/bf16, L1/DRAM.

Lever contract:
- the flag needs QWEN36_PREFILL_DNORM_FUSE and is off by default; flag-off layer.py is the
  old code path;
- self-tested at boot for every M and both attn_out dtypes;
- the MUSTFAIL (gamma tile +1) is REFUSED in the 1x2 mesh probe;
- the layer hook is exercised verbatim in the mesh probe;
- 5 more RISC programs pass the card-image JIT check.

Arm: S2-dnf-dna.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pp-glue: dnf/dna card verdict — tier-1 win, PP +1.6..2.2% at 32k (R-2026-10-19-dnf)
Some checks failed
tt-stack-ci / Build simulators and check the host module (pull_request) Failing after 2m0s
tt-stack-ci / Report upstream drift (pull_request) Successful in 1m22s
cards-fresh cards: PR does not merge cleanly onto base
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 3m14s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped
6e6237eda1
Before the screen, the fused norm was expected to save about 10 ms/chunk at 32k
(an opmark estimate: 144 -> 66 us/norm) and the add fold about 1.3 ms more. ttx ab,
2 reps, S2 vs dnf vs dnf-dna: PP rises in all 6 cells; at 32k it is +1.6..2.1% for
dnf and +1.9..2.2% for dnf-dna. TG/user stays within noise. B=1 served text is
identical to S2. The measured saving is ~5.4 ms/chunk, about half the estimate.
The dna increment is not resolved at n=2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The named per-op prefill table tooling never reached master; reprofile-dfr merged it onto a 10-15 tree
without conflict, and it merges here without conflict too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dnf+dna saved ~5.4 ms/chunk at 32k, against ~10 expected from the dfr opmark. Explaining that gap needs the norm/add rows
of the S2 tree with and without the levers. Two boots would add boot-to-boot drift, so a workbench-only knob, read per
call, switches the levers off for a re-capture on the same process. It only disables; flag-off and served arms are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The dfr 32k opmark has every GDN layer spending ~234 us/chunk on four glue ops after the scan: rms_norm on the
head-major fp32 o (72.6), nlp_concat_heads (54.8), silu(z) (61.5) and the fp32 x bf16 multiply (46.0), 11.2 ms per
2048-token chunk over 48 layers. The relayout is pure addressing and silu's result is bf16-exact, so both pairs fuse
with no numerics change:
- norm_concat: the image layernorm.cpp RMSNORM+gamma LLK sequence per (head, token-tile) row; the writer stores the
  tiles at nlp_concat_heads' token-major places.
- gate: one fp32-DEST pass, z unpacked to DEST, silu_tile<false> (the unary op's own bf16-rounding SFPU path),
  mul_binary_tile, then binary_ng's typecast_tile<fp32,bf16> post-activation (the packer alone rounds ties
  differently: 3 diffs in 196k before it was added).

ttsim: 1 chip ALL_OK (norm fp32 bitwise T=128..2048, gate bf16 bitwise incl. |z|<=200 and |a|<=1e38 extremes, z at a
column offset); 1x2 mesh in-boot self-test exact, MUSTFAIL refused. JIT-check 13/13 against vllm-tt:k2-mr-pk3r.
Flag off: byte-identical (gdn/tp.py takes today's branch). No card number yet.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dna folded the in-layer h = x + attn_out into ffn_norm's PRE pass; the closing x_next = h + ff_out (bf16 + bf16, 3.7 ms
per 2048-token chunk at 32k in the dfr opmark) still ran as its own ttnn.add, and the next layer's attention norm then
re-read x_next. xa runs dnorm_fuse.run_add (the same program dna serves) with the NEXT layer's attention norm and
weight, and hands (x_next, attn_input) to that layer, which uses it only when its x IS that tensor (else frees it and
runs the norm as today). The model's TP prefill loops pass fold_next; the last layer keeps today's add.

ttsim: the add gate (bench/probes/sim_prefill_dnorm_add.py) is ALL_OK at M=2048/256 including xa's cell (b bf16,
out bf8, L1), plus env guards (XADD needs ADD; wb bypass "xadd" turns only xa off). Kernels unchanged from dna, so
the dna JIT-check stands. The plumbing has no ttsim rung; the card's B=1 text equality is its check. No card number.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The queued workbench boot had not reached the cards, so it now boots S2-dnf-dna-gtl-xa and steps the DNORM and
GDN_TAIL wb bypasses through on / noxa / dnfdna / dnf / s2: one boot answers both 'why did dnf+dna save 5.4 ms, not
10' and what gtl and xa remove, op by op, with no extra card time. tracedoff and the SDPA mf rung stay on the 'on'
view only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The banners file now carries the GDN_TAIL / DNORM lines, so the screen starts only if the workbench boot showed both
new levers engaged; a refusing lever then costs one boot, not six.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
At set_paged_kv_caches the reference nlp_concat_heads (L1 output, T=2048) clashed with L1 buffers already placed
('static circular buffer region ends at 898048', buffer at 846976): the check refused the boot before any view ran,
and the chained ab stopped on its banner gate as designed. Output placement changes no byte (ttsim ran L1 and DRAM),
so the self-test now writes DRAM; 1x2 ttsim self-test re-run ALL_OK. Relaunched opmark + ab as one queue.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pp-glue2: card verdict — gtl + xa on dnf+dna, tier-1 WIN, PP +3.9..4.2% at 32k vs S2 (R-2026-10-19-glue2)
Some checks failed
tt-stack-ci / Build simulators and check the host module (pull_request) Failing after 2m6s
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Has been cancelled
tt-stack-ci / Serialized card gate (pull_request) Has been cancelled
tt-stack-ci / Report upstream drift (pull_request) Has been cancelled
6209d72522
The 10-19 dnf+dna screen read only -5.4 ms/chunk against an estimated -10, and gtl/xa were estimated at -4.6..-5.4 and
~-2. One workbench boot with the levers switched by wb bypass knobs (five views, identical logits sha: all four levers
bitwise on card) shows dnf+dna save 10.3 ms busy per chunk as estimated; the wall moves 8.3 and the 10-19 served
number sat in boot-to-boot drift. gtl saves 3.8 busy (its fused programs cost 8.2 of the 11.4 they replace) and xa 0.6.
Served ab (2 reps): gtl-xa PP +2.6..+4.2% in 6/6 cells vs S2, TG -0.9..+2.8%, acceptance unchanged. gtl+xa fall short
of the >=8 ms target (-4.4 busy / -4.0 wall).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pp-glue2: nix serving unit mounts dnorm_fuse, gdn_tail, their kernels and opmark.py
Some checks failed
tt-stack-ci / Report upstream drift (pull_request) Has been cancelled
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Has been cancelled
tt-stack-ci / Serialized card gate (pull_request) Has been cancelled
tt-stack-ci / Build simulators and check the host module (pull_request) Has been cancelled
abc11d249e
test_prod_matches_nix::test_mounts failed: prod.toml's overlay tree carries the 13 new files, the unit did not mount
them, so the nix-deployed server would import modules the image lacks. All 8 prod-vs-nix tests pass now.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pp-glue: nix serving unit mounts dnorm_fuse.py and its kernels
Some checks failed
tt-stack-ci / Build simulators and check the host module (pull_request) Failing after 2m55s
tt-stack-ci / Report upstream drift (pull_request) Successful in 3m32s
cards-fresh cards: PR does not merge cleanly onto base
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 9m7s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped
886c32358b
test_prod_matches_nix::test_mounts failed: prod.toml's overlay carries the dnf/dna files, the unit did not mount them.
All 8 prod-vs-nix tests pass now.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merge branch 'pp/glue' into pp/glue2
Some checks failed
tt-stack-ci / Build simulators and check the host module (pull_request) Has been cancelled
tt-stack-ci / Report upstream drift (pull_request) Has been cancelled
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Has been cancelled
tt-stack-ci / Serialized card gate (pull_request) Has been cancelled
21744bc398
# Conflicts:
#	modules/tenstorrent-serving.nix
ttx: unique slot owner per driver; down/queue refuse foreign containers
Some checks failed
tt-stack-ci / Build simulators and check the host module (pull_request) Failing after 2m11s
tt-stack-ci / Report upstream drift (pull_request) Successful in 2m25s
cards-fresh cards: PR does not merge cleanly onto base
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 6m49s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped
13c338c848
Before: every local ttx driver claimed as ttx-<user>@<host>:ab. slot.sh treats the
same owner as re-entrant, so on 2026-10-19 two `ttx ab --wait` queues both took the
mesh after the CI gate and booted 6 s apart (one died with "Sysmem mapped at unexpected
NOC address"). A `ttx queue stop` also downed another track's server: the killed step's
cleanup downs every ttx-* container that appeared during the step, and bare skip/stop
act on `latest`, the newest queue of any agent.

Now:
- default_owner(): `#q<TTX_QUEUE_ID>` in a queue step, `.p<pid>` for ab/run (drivers);
  `ttx up` / `ttx slot` keep the queue-scoped owner so a later down/release matches.
  $TTX_OWNER (CI, card queue) stays verbatim: CI re-enters its pre-acquired claim.
- acquire re-reads the claim after the wait and refuses to boot if it is not ours.
  The box-side take was already atomic (flock); the owner was the hole.
- `ttx down` refuses (exit 3) a container whose ttx.claim/ttx.owner is not ours; --force.
- queue cleanup downs as this queue (TTX_QUEUE_ID), so foreign containers are refused;
  `queue skip|stop --force` lifts that for one cleanup.
- `queue skip|stop` without --id refuse when more than one queue is alive.
No arm changes. Running queues keep their own worktree's code; old-format claims stay
downable from a bare shell and are never downed by a new queue's cleanup.

Tests: tools/ttx/tests/test_claim_unique.py (two concurrent waiters on the real slot.sh:
one wins; shared owner shows the re-entrancy; foreign refusal; --id guard). Suite 662 OK.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit cf64824499)
pp-glue3: QWEN36_PREFILL_GDN_QKV_RM (qrm) — GDN prefill qkv slice + to_layout(ROW_MAJOR) in one program
Some checks failed
tt-stack-ci / Build simulators and check the host module (pull_request) Has been cancelled
tt-stack-ci / Report upstream drift (pull_request) Has been cancelled
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Has been cancelled
tt-stack-ci / Serialized card gate (pull_request) Has been cancelled
01e30fd546
The glue2 32k opmark has every GDN layer slicing qkv [T, 5120] out of qkvzab [T, 8248] (L1 TILE) and the kda conv
then untilizing it to a DRAM row-major copy (to_layout, 101 us/call, 4.9 ms/chunk); the kda conv reads only that
copy, so the TILE qkv is a pure intermediate. qrm writes the row-major copy straight from qkvzab: the image's untilize
helper over 8-tile blocks, each row stored at its token row. bf16 in and out, a data move: bitwise.
Expected: -4.9 ms to_layout and -~2 ms of the 4.3 ms slice, plus the new program's cost (unknown until the card).

ttsim: 1 chip PASS (T=128/256/2048 bitwise vs slice + to_layout, sane vs torch, must-fail differs, env guards),
1x2 mesh ALL_OK (in-boot ensure_selftest exact, MUSTFAIL REFUSED). jit-check 5/5 vs vllm-tt:k2-mr-pk3r (the
served image has no get_tile_size in the dataflow API: tile size is a constant). Flag off: byte-identical.
Arm <glue stack>-qrm, ab queue chained behind free-agmm2. nix unit mounts the new files (test_mounts passes).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Grok force-pushed pp/glue2 from 01e30fd546
Some checks failed
tt-stack-ci / Build simulators and check the host module (pull_request) Has been cancelled
tt-stack-ci / Report upstream drift (pull_request) Has been cancelled
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Has been cancelled
tt-stack-ci / Serialized card gate (pull_request) Has been cancelled
to 13c338c848
Some checks failed
tt-stack-ci / Build simulators and check the host module (pull_request) Failing after 2m11s
tt-stack-ci / Report upstream drift (pull_request) Successful in 2m25s
cards-fresh cards: PR does not merge cleanly onto base
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 6m49s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped
2026-10-19 23:46:53 +02:00
Compare
Author
Owner

test_mounts fixed: the nix unit mounts dnorm_fuse, gdn_tail, their kernels and opmark.py (merged pp/glue's fix too); 8/8 prod-vs-nix tests pass. Also carries the ttx unique-claim commit from #268 (cherry-pick of cf648244; 711 ttx tests pass). The qrm and gtl-DM follow-ups live on pp/glue3.

test_mounts fixed: the nix unit mounts dnorm_fuse, gdn_tail, their kernels and opmark.py (merged pp/glue's fix too); 8/8 prod-vs-nix tests pass. Also carries the ttx unique-claim commit from #268 (cherry-pick of cf648244; 711 ttx tests pass). The qrm and gtl-DM follow-ups live on pp/glue3.
Author
Owner

Superseded by #272 (S3 shipped to master, CONTROL = …-gpgob-dfr-s3, R-2026-10-20-s3). Closing unmerged.

Superseded by #272 (S3 shipped to master, CONTROL = …-gpgob-dfr-s3, R-2026-10-20-s3). Closing unmerged.
Grok closed this pull request 2026-10-20 05:58:28 +02:00
Author
Owner

agent-gateway closeout (closed): cleared agent:* labels.
Hermes kanban card (if any) is left for Hermes to archive/complete.

agent-gateway closeout (closed): cleared `agent:*` labels. Hermes kanban card (if any) is left for Hermes to archive/complete.
Some checks failed
tt-stack-ci / Build simulators and check the host module (pull_request) Failing after 2m11s
tt-stack-ci / Report upstream drift (pull_request) Successful in 2m25s
cards-fresh cards: PR does not merge cleanly onto base
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 6m49s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitpartner/tt-stack!269
No description provided.