perf-loop: Tracy-split the G2 fixed decode cost (host vs CCL) — TP=1 vs TP=2 #93

Closed
opened 2026-09-26 04:44:24 +02:00 by tenstorrent · 8 comments
Member

Parent / blocked-by: #90 (perf-loop c1: G2 decode is not bandwidth-bound).

Grill call: GO (lane 1 — re-ranks everything)

Hypothesis. At B=1 4k TP=2, derived fixed cost F≈20.7 ms (~41% of the step) dominates weight read (~16.5 ms). If F is mostly host → attack resident/host path; if CCL → fabric/fusion. Wrong call wastes weeks.

Depends on. Mesh window; Tracy that names ops (perf-loop c3: unnamed tables are useless).

Measure first. Tracy profile at TP=1 and TP=2, same shape, subtract. One mesh slot.

Out of scope. Weight-read/bf4 coalesce (parked until this lands).

Refs: #90 body; LEDGER / STATUS TP-scaling; grill 2026-09-26 Tenstorrent.

Parent / blocked-by: #90 (perf-loop c1: G2 decode is not bandwidth-bound). ## Grill call: **GO** (lane 1 — re-ranks everything) **Hypothesis.** At B=1 4k TP=2, derived fixed cost F≈20.7 ms (~41% of the step) dominates weight read (~16.5 ms). If F is mostly host → attack resident/host path; if CCL → fabric/fusion. Wrong call wastes weeks. **Depends on.** Mesh window; Tracy that **names** ops (perf-loop c3: unnamed tables are useless). **Measure first.** Tracy profile at TP=1 and TP=2, same shape, subtract. One mesh slot. **Out of scope.** Weight-read/bf4 coalesce (parked until this lands). Refs: #90 body; LEDGER / STATUS TP-scaling; grill 2026-09-26 Tenstorrent.
Owner

perf-loop c39–41 (commit f698f93, TP=2, 32k sweep, 1k out, G2 bfp4, image k2 6105bb72fb54):

  • Bundle E (apf + PROJ_LOFI + PREFILL_LOGITS_FAST + GDN_SLOT_DEVICE_COPY + AGMM nt11x8) beats the apf control band everywhere. B=8 makespan −4.3 / −5.9 / −6.7% at 4k/16k/32k; B=4 −2.7 / −4.0 / −5.3%. B=8 TTFT max is 11.4 / 35.4 / 71.8 s (apf 13.8 / 40.6 / 80.9). TG is flat (B=8 44.6 / 49.0 / 54.7 ms), so the gain is prefill only. Records: perf-loop-c40-bundleE-20260927T0120Z.jsonl.
  • Multi-reader DRAM-sharded decode matmuls (QB2 #57914 policy), measured at the op level on card 1 with M=32 and bf4: w1 −28%, qkvzab −28%, w2 −17%, out −12% against our 1D matmul, PCC identical. The mesh needs upstream #55922, so an image rebuild is in progress on branch dram-sharded-mr. There is no serving number yet. Record: perf-loop-c41p-multireader-20260927T0142Z.jsonl.
  • c42 is queued: the GSM8K + retrieval gate on bundle E, a second-boot confirm, and leave-one-out ×3.
perf-loop c39–41 (commit f698f93, TP=2, 32k sweep, 1k out, G2 bfp4, image k2 6105bb72fb54): - **Bundle E** (apf + PROJ_LOFI + PREFILL_LOGITS_FAST + GDN_SLOT_DEVICE_COPY + AGMM nt11x8) beats the apf control band everywhere. B=8 makespan −4.3 / −5.9 / −6.7% at 4k/16k/32k; B=4 −2.7 / −4.0 / −5.3%. B=8 TTFT max is 11.4 / 35.4 / 71.8 s (apf 13.8 / 40.6 / 80.9). TG is flat (B=8 44.6 / 49.0 / 54.7 ms), so the gain is prefill only. Records: perf-loop-c40-bundleE-20260927T0120Z.jsonl. - **Multi-reader DRAM-sharded decode matmuls** (QB2 #57914 policy), measured at the op level on card 1 with M=32 and bf4: w1 −28%, qkvzab −28%, w2 −17%, out −12% against our 1D matmul, PCC identical. The mesh needs upstream #55922, so an image rebuild is in progress on branch dram-sharded-mr. There is no serving number yet. Record: perf-loop-c41p-multireader-20260927T0142Z.jsonl. - c42 is queued: the GSM8K + retrieval gate on bundle E, a second-boot confirm, and leave-one-out ×3.
Owner

Correction: the records are perf-loop-c40-bundleE-20260926T2320Z.jsonl and perf-loop-c41p-multireader-20260926T2341Z.jsonl, named in UTC.

Correction: the records are perf-loop-c40-bundleE-20260926T2320Z.jsonl and perf-loop-c41p-multireader-20260926T2341Z.jsonl, named in UTC.
Owner

perf-loop c44–47. TP=2, B=8, 32k sweep, 1k out, G2.

  • Bundle F on E (ONESHOT_AR seam + AR_ASYNC + RESID_L1 + 8 KB payload) is confirmed in two boots: 56.84–57.22 / 84.02–84.22 / 126.01–126.03 s, TG 43.14 / 47.48 / 53.22 ms/token (E: 44.60 / 48.95 / 54.70).
    • GSM8K is 58/60 with the same token total as E, and retrieval is 1.0 in the early and late halves.
    • Greedy equivalence is pending.
    • LOO: AR_ASYNC +0.8 ms, RESID_L1 +1.1 ms, payload inert. The seam-only 2×2 corner is running.
    • Record: perf-loop-c45-bundleF-gate-confirm-loo-20260927T0210Z.jsonl.
  • Bundle G (image k2-mr-pk: SDPA GQA K/V multicast #56119 + fused GDN prefill #53790/#57440) against the same-image control:
    • 16k: −4.4% wall, −9.9% TTFT max. 32k: −7.4% wall, −12.7% TTFT max. PP at 32k goes from 3.65k to 4.19k tok/s, TG flat.
    • This is ungated: the fused GDN kernel has never been validated. The gate, confirm and LOO are queued (c50).
    • Record: perf-loop-c47-bundleG-20260927T0310Z.jsonl.
  • The multi-reader decode matmul arm engages on hardware (128/128 layers converted). It was refused twice on an over-exact banner string; the retry is c49.
perf-loop c44–47. TP=2, B=8, 32k sweep, 1k out, G2. - **Bundle F on E** (ONESHOT_AR seam + AR_ASYNC + RESID_L1 + 8 KB payload) is confirmed in two boots: 56.84–57.22 / 84.02–84.22 / 126.01–126.03 s, TG 43.14 / 47.48 / 53.22 ms/token (E: 44.60 / 48.95 / 54.70). - GSM8K is 58/60 with the same token total as E, and retrieval is 1.0 in the early and late halves. - Greedy equivalence is pending. - LOO: AR_ASYNC +0.8 ms, RESID_L1 +1.1 ms, payload inert. The seam-only 2×2 corner is running. - Record: perf-loop-c45-bundleF-gate-confirm-loo-20260927T0210Z.jsonl. - **Bundle G** (image k2-mr-pk: SDPA GQA K/V multicast #56119 + fused GDN prefill #53790/#57440) against the same-image control: - 16k: −4.4% wall, −9.9% TTFT max. 32k: −7.4% wall, −12.7% TTFT max. PP at 32k goes from 3.65k to 4.19k tok/s, TG flat. - This is **ungated**: the fused GDN kernel has never been validated. The gate, confirm and LOO are queued (c50). - Record: perf-loop-c47-bundleG-20260927T0310Z.jsonl. - The multi-reader decode matmul arm engages on hardware (128/128 layers converted). It was refused twice on an over-exact banner string; the retry is c49.
Owner

ESCALATION: owner decision needed on shipping the full stack prod-g2-EFMG (LEDGER R-2026-09-27-stack-EFMG, confirmed in 2 boots).

Scope: TP=2, G2, 32k sweep, 1k out. The stack is E + F + multi-reader decode matmuls + SDPA GQA multicast + fused GDN prefill, on image vllm-tt:k2-mr-pk.

B=8 makespan vs the loop control:

ctx control EFMG Δ TG ms/token TTFT max
4k 67.6 s 50.8–51.5 s −24.3% 50.8 → 37.8 14.3 → 10.7–10.9 s
16k 98.0 s 75.5–75.8 s −22.8% 55.5 → 42.2 40.9 → 31.7–31.8 s
32k 144.1 s 111.3–111.4 s −22.8% 61.3 → 47.9 81.1 → 62.3–62.4 s
  • B=4: 41.5 / 54.4 / 71.7 s, TG 35.5 / 37.6 / 40.5 ms/token.

The trade-off:

  • E, F and fused GDN are bit-exact.
  • Multi-reader and SDPA-mcast (q chunk 128 → 256) are not bit-exact: 6 wrong-token and 2 tie flips per 8 greedy streams.
  • Every first divergence is a near-tie, with a gap of ≤ 0.75 against the TP=2 G2 threshold of 1.94 in D-2026-09-25, and the swapped tokens are synonyms.
  • GSM8K is 59/60 (control 58/60). Retrieval is 1.0 in the early and late halves at 16k and 32k.

Recommendation: ship EFMG. It passes your identity rule, and it is the largest win of the loop.

Bit-exact alternative: apf + E + F + fused GDN, measured next (c55); a q=128 bit-exact SDPA multicast is being built.

Either option needs a production redeploy onto the k2-mr(-pk) image, which is your call.

**ESCALATION: owner decision needed** on shipping the full stack `prod-g2-EFMG` (LEDGER `R-2026-09-27-stack-EFMG`, confirmed in 2 boots). Scope: TP=2, G2, 32k sweep, 1k out. The stack is E + F + multi-reader decode matmuls + SDPA GQA multicast + fused GDN prefill, on image `vllm-tt:k2-mr-pk`. **B=8 makespan vs the loop control:** | ctx | control | EFMG | Δ | TG ms/token | TTFT max | |---|---|---|---|---|---| | 4k | 67.6 s | 50.8–51.5 s | −24.3% | 50.8 → 37.8 | 14.3 → 10.7–10.9 s | | 16k | 98.0 s | 75.5–75.8 s | −22.8% | 55.5 → 42.2 | 40.9 → 31.7–31.8 s | | 32k | 144.1 s | 111.3–111.4 s | −22.8% | 61.3 → 47.9 | 81.1 → 62.3–62.4 s | - B=4: 41.5 / 54.4 / 71.7 s, TG 35.5 / 37.6 / 40.5 ms/token. **The trade-off:** - E, F and fused GDN are **bit-exact**. - Multi-reader and SDPA-mcast (q chunk 128 → 256) are **not bit-exact**: 6 wrong-token and 2 tie flips per 8 greedy streams. - Every first divergence is a near-tie, with a gap of ≤ 0.75 against the TP=2 G2 threshold of 1.94 in D-2026-09-25, and the swapped tokens are synonyms. - GSM8K is 59/60 (control 58/60). Retrieval is 1.0 in the early and late halves at 16k and 32k. **Recommendation:** ship EFMG. It passes your identity rule, and it is the largest win of the loop. **Bit-exact alternative:** apf + E + F + fused GDN, measured next (c55); a q=128 bit-exact SDPA multicast is being built. Either option needs a production redeploy onto the k2-mr(-pk) image, which is your call.
Owner

Update (c55–c56, commit 0dc8b74): the bit-exact stack prod-g2-EF-gdnfused (apf + E + F + fused GDN prefill, image k2-mr-pk) now has two boots at B=8: 56.81 / 81.62 / 120.97 s, i.e. −15.9 / −16.7 / −16.1% vs the loop control. TG is 43.1 / 47.5 / 53.2 ms. Greedy is 8/8 bit-identical to the reference. LEDGER: R-2026-09-27-stack-bitexact.

EFMG (not bit-exact; near-ties ≤0.75) stays at −24.3 / −22.8 / −22.8%.

Recommendation unchanged: ship the bit-exact stack now, since it needs no numerics sign-off, and take EFMG if you accept near-tie drift. Both need a redeploy onto the new image, which is your call.

Next (c57): SDPA GQA multicast at q=128 (bit-exact on ttsim, 12/12) is getting its greedy check and a sweep on the cards. If it holds, the bit-exact stack gets part of G's prefill gain. B=1 numbers are rerunning (the c56 B=1 boots were refused on a harness expectation, now fixed).

Update (c55–c56, commit 0dc8b74): the **bit-exact** stack `prod-g2-EF-gdnfused` (apf + E + F + fused GDN prefill, image k2-mr-pk) now has two boots at B=8: **56.81 / 81.62 / 120.97 s, i.e. −15.9 / −16.7 / −16.1%** vs the loop control. TG is 43.1 / 47.5 / 53.2 ms. Greedy is 8/8 bit-identical to the reference. LEDGER: R-2026-09-27-stack-bitexact. EFMG (not bit-exact; near-ties ≤0.75) stays at −24.3 / −22.8 / −22.8%. Recommendation unchanged: ship the bit-exact stack now, since it needs no numerics sign-off, and take EFMG if you accept near-tie drift. Both need a redeploy onto the new image, which is your call. Next (c57): SDPA GQA multicast at q=128 (bit-exact on ttsim, 12/12) is getting its greedy check and a sweep on the cards. If it holds, the bit-exact stack gets part of G's prefill gain. B=1 numbers are rerunning (the c56 B=1 boots were refused on a harness expectation, now fixed).
Owner

Merged to master (PR #102, c93b248).

Merge gate on hardware: with every lever off, the tree serves greedy output 8/8 bit-identical to the previous master's production sources.

The new bit-exact best is prod-g2-EF-gdnfused-sdpa (image k2-mr-pk2), LEDGER R-2026-09-27-stack-bitexact-sdpa:

  • B=8 makespan: −16.2 / −17.1 / −17.6% at 4k / 16k / 32k (2 boots). It adds SDPA GQA multicast at q=128, which is bit-exact and cuts about 2.2 s of TTFT at 32k.
  • B=1: TG 37.9 ms/token, PP about 3.9–4.1k tok/s.

EFMG (−23%, near-ties ≤0.75) is unchanged.

Both need a redeploy onto the new image plus the arm's env. That decision is yours.

Merged to master (PR #102, c93b248). Merge gate on hardware: with every lever off, the tree serves greedy output 8/8 bit-identical to the previous master's production sources. The new bit-exact best is **prod-g2-EF-gdnfused-sdpa** (image k2-mr-pk2), LEDGER R-2026-09-27-stack-bitexact-sdpa: - B=8 makespan: **−16.2 / −17.1 / −17.6%** at 4k / 16k / 32k (2 boots). It adds SDPA GQA multicast at q=128, which is bit-exact and cuts about 2.2 s of TTFT at 32k. - B=1: TG 37.9 ms/token, PP about 3.9–4.1k tok/s. EFMG (−23%, near-ties ≤0.75) is unchanged. Both need a redeploy onto the new image plus the arm's env. That decision is yours.
Member

Closed as superseded: the fixed-cost question was answered with new instruments (QWEN36_MTP_OPTRACE named tables, R-2026-10-24-optrace) and shipped levers (S10 SO_QKH, S11/S12 DEVFEED, R-2026-10-22-ssp); the TP=1 half was dropped by the 2026-09-29 standing order. Live decode-floor work is on the #223 board and #403. Verified 2026-11-18.

Closed as superseded: the fixed-cost question was answered with new instruments (QWEN36_MTP_OPTRACE named tables, R-2026-10-24-optrace) and shipped levers (S10 SO_QKH, S11/S12 DEVFEED, R-2026-10-22-ssp); the TP=1 half was dropped by the 2026-09-29 standing order. Live decode-floor work is on the #223 board and #403. Verified 2026-11-18.
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.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
bitpartner/tt-stack#93
No description provided.