X280-5: reclaim the dispatch column — X280 command processor + single-proxy fan-out #309

Open
opened 2026-10-23 10:01:08 +02:00 by Grok · 0 comments
Owner

X280-5 — Reclaim the dispatch column: an X280 command processor and single-proxy fan-out

Type: throughput lever (prefill compute + host dispatch) — highest ceiling, highest risk
Effort (after X280-0): 12–20 weeks · Stage: E
Depends on: X280-0, X280-2 (the graph-level half must land first)
Upstream context: tt-metal issue #31942 "Run dispatch on x280 cores on blackhole" — open since 2025-11, idea stage, blocked on the X280 having no NoC atomics over its AXI attachment.

1. TL;DR

We lose 10 Tensix cores per card to dispatch: the die gives 120 usable Tensix, the grid is 110 (docs/BLACKHOLE-PERF.md §3). That is 8.3% of the machine unavailable to every prefill matmul, and prefill matmuls are the single largest prefill class (156 ms of a 293 ms device-busy chunk at 32k, bench/runs/reprofile-dfr-prefill-20261015.jsonl).

Two separable claims, in increasing risk:

  • S1 (graph-level dispatch on X280): the X280 runs the command queue — trace selection, argument patching, bucket selection, semaphores — and the existing Tensix dispatch cores only do the final 110-core fan-out. No cores reclaimed. This is a prerequisite for X280-2 and X280-3 anyway; it is mostly a refactor of where the decisions live.
  • S2 (fan-out proxy): the X280 emits one command block per program to a single Tensix "proxy" core, which performs the NoC atomic fan-out on its behalf. This is the workaround for #31942's blocker. It reclaims 9 of the 10 dispatch cores (110 → 119 usable, i.e. +8.2%).

Pre-registered target (S2): ≥ +4% PP tok/s at 32k after re-tuning, or a recorded negative. We do not get to claim +8.2% — the grid geometry, AGMM's 88-core layout and the fabric muxes on row 9 mean the realisable gain must be measured.

2. Why (measured baseline)

  • docs/BLACKHOLE-PERF.md §3: 140 − 2 harvested columns = 120; the last logical column (10 cores) is dispatch; compute grid [10,9] = 110; fused AGMM uses 88 on grid9 because row 9 holds fabric muxes.
  • Prefill device busy at 32k is 293.1 ms/chunk, of which matmul roles are 156 ms (swiglu 74.8, qkvzab 27.9, w2 25.0, gdn out colpar 13.3, attn qkv 8.8, attn out colpar 4.6). AGMM roles run at 46–64% of LoFi peak, w2 at 77%.
  • w2 already runs on all 110 cores (R-2026-10-07-w2t) — that is the proof that more cores do convert, and that the current 110 is the ceiling.
  • Target gap: STATUS.md PP target is 8,000 tok/s; today 5,443–6,578. +8.2% of cores is not +8.2% of PP, but at 32k the matmuls are the plurality of the chunk.
  • Eager-op cost today: ~95 µs per host-dispatched op (docs/analysis/prefill-hostgap-20261015.md item 6) — the reason S1 is worth doing even without core reclamation.

3. What exists today

  • HalProgrammableCoreType::DISPATCH is a first-class core type; dispatch kernels run on the 10 cores with several roles (prefetch, command issue, mux, completion).
  • Fast dispatch cannot target an L2CPU (d2h_socket.cpp:227-229); a captured trace is host-enqueued and replayed by those cores.
  • No NoC atomics from X280 (noc_semaphore_inc is a Tensix/Ethernet-side primitive over the NoC; the X280 attaches via AXI with the System Port, per #31942).
  • TLB windows: 224 × 2 MiB + 32 × 128 GiB (L2CPUTile/TLBWindows.md) — the X280 can write to any L1 or DRAM address; it just cannot do a read-modify-write atomically over the NoC.

4. Design

4.1 S1 — graph-level dispatch (do this first, it pays regardless)

Decision Today S1
which trace to run host (Python) X280, from a plan the host wrote once
runtime args host writes 9+ tensors per step X280 writes into a pre-allocated arg block in DRAM/L1
bucket / row count host X280
semaphores between phases host enqueues X280 sets flags; Tensix polls
final 110-core fan-out Tensix dispatch cores unchanged

This is exactly the mechanism X280-2 needs, so it is not extra work — it is the same code with a different call site.

4.2 S2 — the proxy (the actual core reclamation)

X280 (1 hart)                          Tensix "proxy" (1 core)               110 workers
  builds a command block       ──►      reads it from L1/LIM
  (program id, core range,              does the NoC atomic fan-out
   arg pointers, barriers)              (noc_semaphore_inc / go messages)
                                        as the dispatch kernel does today

The proxy is one Tensix core running a small, auditable kernel whose only job is to translate a descriptor into the exact sequence of NoC writes/atomics today's dispatch kernel issues. Everything above the proxy moves to the X280; the atomic primitive stays on Tensix.

Why this is credible: it changes where the decision is made, not what the hardware does. The worker cores see the same go-messages, the same arguments, the same ordering. A must-fail ordering test (a program whose dependencies are violated must produce a wrong result) is the acceptance gate.

4.3 What we do not get

  • The dispatch column is 10 cores wide in the grid; removing 9 cores from the grid changes merge_ranges() geometry, every hardcoded grid (tp_common.py:158-159 (8,10), gdn_scan_mcast_geometry(... grid_x=11, grid_y=10)), the AGMM 88-core layout and the fabric muxes. The re-tuning is larger than the proxy.
  • Do not conflate "9 more cores" with "9% faster". AGMM at 99 cores is a different blocking with a different padded peak.

5. Numeric targets and kill criteria

ID Metric Target
T5.1 S1: eager-op host cost per dispatched op ≤ 20 µs (from ~95)
T5.2 S1: prefill fixed gap contributes to T3.1 (≤ 25 ms/req)
T5.3 S2: usable compute cores 119 (from 110)
T5.4 S2: PP tok/s at 32k after re-tuning +4% minimum, measured
T5.5 S2: PP tok/s at 4k no regression
T5.6 ordering correctness bit-identical outputs to CONTROL for the same program sequence
K5.1 if the proxy cannot reproduce dispatch ordering with a must-fail test after two designs stop at S1, record the negative, keep S1's host win
K5.2 if re-tuning the grid (AGMM, GDN scan, hardcoded (8,10)) does not clear +2% PP stop; the extra cores do not convert
K5.3 if S1 alone is < 1% PP and 0 in decode deprioritise to a maintenance item

6. Quality gates

Gate What must pass
G0 QWEN36_X280_DISPATCH=1; flag off = today; banner; ttx lint
G1 host tests for descriptor encoding; must-fail: a deliberately reordered descriptor set must be detected
G2 ttsim: worker-visible go-message stream and argument values identical to today's dispatch for a 64-layer pass, all cells
G3 on-card: dispatch-only microbenchmark (launch latency, fan-out cost per program), then a 64-layer verify pass
G4 served boot with the re-tuned grid; in-boot self-test
G5 full ttx A/B: PP at 4k/16k/32k, TG all cells, plus AICLK (more active cores = more power; the 300 W cap binds at 32k already — docs/BLACKHOLE-PERF.md §7)
G6 tier 1 (bit-exact) — dispatch is a reordering of the same work
G7 ship + docs; the upstream #31942 ticket gets our proxy design as a comment

7. Work breakdown

Phase Work Exit
P0 Read the current dispatch kernel end-to-end; enumerate every NoC primitive it issues design note
P1 S1: X280 command queue, host writes the plan once T5.1
P2 Proxy kernel + descriptor protocol + ordering must-fail K5.1
P3 Grid re-tuning: merge_ranges, hardcoded grids, AGMM 88→99, GDN scan geometry G2/G3
P4 Power/clock check at 99+ cores G5 AICLK
P5 Served A/B, ship or close G7

8. Risks

  1. Ordering semantics are the whole risk. Dispatch encodes dependencies that keep 110 cores from racing. A proxy that gets them right 99.9% of the time produces silent wrong numbers — the worst failure mode on this machine, and this repo has been bitten before (the k_chunk_size=32 and LoFi+fp32-dest traps).
  2. Power. 32k prefill already runs at ~1210 MHz against a 300 W cap. Activating 9 more cores per card may lower the clock enough to cancel the gain. Measure AICLK in the same run or the number is meaningless.
  3. Grid holes. Blackhole virtual coordinates are not a dense rectangle (docs/BLACKHOLE-PERF.md §6); 11×10 → 12×10 is not "one more column" in coordinate space.
  4. Upstream drift. If #31942 lands, our proxy is dead code; keep it behind a flag and re-check on every pin bump.
  5. Effort. This is the only item in the milestone with a plausible "12 weeks and no win" outcome. Start it only after X280-2 has shipped a measured win.

9. Anti-goals

  • Not reimplementing CCL on the X280; the fabric stays on Ethernet/Tensix.
  • Not moving the workers' firmware or LLKs.
  • Not claiming core count as speed.

10. Open questions

  • Q1: which of the 5 dispatch roles are per-core vs per-program? Only the per-program ones need the proxy rewrite.
  • Q2: does the X280 need to be in the trace at all, or can the proxy be pre-loaded with a descriptor ring so the X280 only refills it? (Cheaper: no per-program X280 involvement.)
  • Q3: is there a way to reclaim the column without touching the proxy — e.g. running dispatch on an Ethernet tile (we have 4 unwired tiles with RISC + L1 per card, docs/BLACKHOLE-PERF.md §7)? That would be a much smaller change and should be evaluated before P2.

11. References

  • docs/BLACKHOLE-PERF.md §3, §6, §7 — grid arithmetic, coordinate holes, the four unwired Ethernet tiles.
  • bench/runs/reprofile-dfr-prefill-20261015.jsonl — matmul share of the chunk.
  • LEDGER R-2026-10-07-w2t — w2 on all 110 cores, 77% of LoFi peak: the proof that cores convert.
  • tt-metal issue #31942, PR #52017 — the upstream blocker and the only in-tree L2CPU data path.
  • docs/REFERENCES.md:118-125 — the HAL tripwire.
# X280-5 — Reclaim the dispatch column: an X280 command processor and single-proxy fan-out **Type:** throughput lever (prefill compute + host dispatch) — **highest ceiling, highest risk** **Effort (after X280-0):** 12–20 weeks · **Stage:** E **Depends on:** X280-0, **X280-2** (the graph-level half must land first) **Upstream context:** tt-metal issue #31942 "Run dispatch on x280 cores on blackhole" — open since 2025-11, idea stage, **blocked on the X280 having no NoC atomics over its AXI attachment**. ## 1. TL;DR We lose **10 Tensix cores per card** to dispatch: the die gives 120 usable Tensix, the grid is 110 (`docs/BLACKHOLE-PERF.md §3`). That is **8.3% of the machine** unavailable to every prefill matmul, and prefill matmuls are the single largest prefill class (**156 ms of a 293 ms device-busy chunk at 32k**, `bench/runs/reprofile-dfr-prefill-20261015.jsonl`). Two separable claims, in increasing risk: - **S1 (graph-level dispatch on X280):** the X280 runs the *command queue* — trace selection, argument patching, bucket selection, semaphores — and the existing Tensix dispatch cores only do the final 110-core fan-out. **No cores reclaimed.** This is a prerequisite for X280-2 and X280-3 anyway; it is mostly a refactor of where the decisions live. - **S2 (fan-out proxy):** the X280 emits one command block per program to a **single Tensix "proxy" core**, which performs the NoC atomic fan-out on its behalf. This is the workaround for #31942's blocker. It reclaims **9 of the 10** dispatch cores (110 → 119 usable, i.e. **+8.2%**). **Pre-registered target (S2):** ≥ **+4% PP tok/s** at 32k after re-tuning, or a recorded negative. **We do not get to claim +8.2%** — the grid geometry, AGMM's 88-core layout and the fabric muxes on row 9 mean the realisable gain must be measured. ## 2. Why (measured baseline) - `docs/BLACKHOLE-PERF.md §3`: 140 − 2 harvested columns = 120; the last logical column (10 cores) is dispatch; compute grid `[10,9]` = **110**; fused AGMM uses **88** on grid9 because row 9 holds fabric muxes. - Prefill device busy at 32k is 293.1 ms/chunk, of which matmul roles are **156 ms** (`swiglu` 74.8, `qkvzab` 27.9, `w2` 25.0, `gdn out colpar` 13.3, `attn qkv` 8.8, `attn out colpar` 4.6). AGMM roles run at **46–64% of LoFi peak**, `w2` at 77%. - `w2` already runs **on all 110 cores** (`R-2026-10-07-w2t`) — that is the proof that more cores *do* convert, and that the current 110 is the ceiling. - Target gap: `STATUS.md` PP target is 8,000 tok/s; today 5,443–6,578. **+8.2% of cores is not +8.2% of PP**, but at 32k the matmuls are the plurality of the chunk. - Eager-op cost today: ~95 µs per host-dispatched op (`docs/analysis/prefill-hostgap-20261015.md` item 6) — the reason S1 is worth doing even without core reclamation. ## 3. What exists today - `HalProgrammableCoreType::DISPATCH` is a first-class core type; dispatch kernels run on the 10 cores with several roles (prefetch, command issue, mux, completion). - Fast dispatch cannot target an L2CPU (`d2h_socket.cpp:227-229`); a captured trace is host-enqueued and replayed by those cores. - No NoC atomics from X280 (`noc_semaphore_inc` is a Tensix/Ethernet-side primitive over the NoC; the X280 attaches via AXI with the System Port, per #31942). - TLB windows: 224 × 2 MiB + 32 × 128 GiB (`L2CPUTile/TLBWindows.md`) — the X280 can *write* to any L1 or DRAM address; it just cannot do a read-modify-write atomically over the NoC. ## 4. Design ### 4.1 S1 — graph-level dispatch (do this first, it pays regardless) | Decision | Today | S1 | |---|---|---| | which trace to run | host (Python) | X280, from a plan the host wrote once | | runtime args | host writes 9+ tensors per step | X280 writes into a **pre-allocated arg block** in DRAM/L1 | | bucket / row count | host | X280 | | semaphores between phases | host enqueues | X280 sets flags; Tensix polls | | final 110-core fan-out | Tensix dispatch cores | **unchanged** | This is exactly the mechanism X280-2 needs, so it is not extra work — it is the same code with a different call site. ### 4.2 S2 — the proxy (the actual core reclamation) ``` X280 (1 hart) Tensix "proxy" (1 core) 110 workers builds a command block ──► reads it from L1/LIM (program id, core range, does the NoC atomic fan-out arg pointers, barriers) (noc_semaphore_inc / go messages) as the dispatch kernel does today ``` The proxy is **one** Tensix core running a small, auditable kernel whose only job is to translate a descriptor into the exact sequence of NoC writes/atomics today's dispatch kernel issues. Everything above the proxy moves to the X280; the atomic primitive stays on Tensix. Why this is credible: it changes *where the decision is made*, not *what the hardware does*. The worker cores see the same go-messages, the same arguments, the same ordering. A must-fail ordering test (a program whose dependencies are violated must produce a wrong result) is the acceptance gate. ### 4.3 What we do **not** get - The dispatch *column* is 10 cores wide in the grid; removing 9 cores from the grid changes `merge_ranges()` geometry, every hardcoded grid (`tp_common.py:158-159` `(8,10)`, `gdn_scan_mcast_geometry(... grid_x=11, grid_y=10)`), the AGMM 88-core layout and the fabric muxes. **The re-tuning is larger than the proxy.** - Do not conflate "9 more cores" with "9% faster". AGMM at 99 cores is a different blocking with a different padded peak. ## 5. Numeric targets and kill criteria | ID | Metric | Target | |---|---|---| | **T5.1** | S1: eager-op host cost per dispatched op | ≤ 20 µs (from ~95) | | **T5.2** | S1: prefill fixed gap | contributes to T3.1 (≤ 25 ms/req) | | **T5.3** | S2: usable compute cores | **119** (from 110) | | **T5.4** | S2: PP tok/s at 32k after re-tuning | **+4%** minimum, measured | | **T5.5** | S2: PP tok/s at 4k | no regression | | **T5.6** | ordering correctness | bit-identical outputs to CONTROL for the same program sequence | | **K5.1** | if the proxy cannot reproduce dispatch ordering with a must-fail test after two designs | **stop at S1**, record the negative, keep S1's host win | | **K5.2** | if re-tuning the grid (AGMM, GDN scan, hardcoded `(8,10)`) does not clear +2% PP | stop; the extra cores do not convert | | **K5.3** | if S1 alone is < 1% PP and 0 in decode | deprioritise to a maintenance item | ## 6. Quality gates | Gate | What must pass | |---|---| | **G0** | `QWEN36_X280_DISPATCH=1`; flag off = today; banner; `ttx lint` | | **G1** | host tests for descriptor encoding; **must-fail: a deliberately reordered descriptor set must be detected** | | **G2** | ttsim: worker-visible go-message stream and argument values identical to today's dispatch for a 64-layer pass, all cells | | **G3** | on-card: dispatch-only microbenchmark (launch latency, fan-out cost per program), then a 64-layer verify pass | | **G4** | served boot with the re-tuned grid; in-boot self-test | | **G5** | full `ttx` A/B: PP at 4k/16k/32k, TG all cells, **plus AICLK** (more active cores = more power; the 300 W cap binds at 32k already — `docs/BLACKHOLE-PERF.md §7`) | | **G6** | tier 1 (bit-exact) — dispatch is a reordering of the same work | | **G7** | ship + docs; **the upstream #31942 ticket gets our proxy design as a comment** | ## 7. Work breakdown | Phase | Work | Exit | |---|---|---| | P0 | Read the current dispatch kernel end-to-end; enumerate every NoC primitive it issues | design note | | P1 | S1: X280 command queue, host writes the plan once | T5.1 | | P2 | Proxy kernel + descriptor protocol + ordering must-fail | K5.1 | | P3 | Grid re-tuning: `merge_ranges`, hardcoded grids, AGMM 88→99, GDN scan geometry | G2/G3 | | P4 | Power/clock check at 99+ cores | G5 AICLK | | P5 | Served A/B, ship or close | G7 | ## 8. Risks 1. **Ordering semantics are the whole risk.** Dispatch encodes dependencies that keep 110 cores from racing. A proxy that gets them right 99.9% of the time produces silent wrong numbers — the worst failure mode on this machine, and this repo has been bitten before (the `k_chunk_size=32` and LoFi+fp32-dest traps). 2. **Power.** 32k prefill already runs at ~1210 MHz against a 300 W cap. Activating 9 more cores per card may *lower* the clock enough to cancel the gain. Measure AICLK in the same run or the number is meaningless. 3. **Grid holes.** Blackhole virtual coordinates are not a dense rectangle (`docs/BLACKHOLE-PERF.md §6`); 11×10 → 12×10 is not "one more column" in coordinate space. 4. **Upstream drift.** If #31942 lands, our proxy is dead code; keep it behind a flag and re-check on every pin bump. 5. **Effort.** This is the only item in the milestone with a plausible "12 weeks and no win" outcome. Start it only after X280-2 has shipped a measured win. ## 9. Anti-goals - Not reimplementing CCL on the X280; the fabric stays on Ethernet/Tensix. - Not moving the *workers'* firmware or LLKs. - Not claiming core count as speed. ## 10. Open questions - Q1: which of the 5 dispatch roles are per-core vs per-program? Only the per-program ones need the proxy rewrite. - Q2: does the X280 need to be in the trace at all, or can the proxy be *pre-loaded* with a descriptor ring so the X280 only refills it? (Cheaper: no per-program X280 involvement.) - Q3: is there a way to reclaim the column **without** touching the proxy — e.g. running dispatch on an **Ethernet tile** (we have 4 unwired tiles with RISC + L1 per card, `docs/BLACKHOLE-PERF.md §7`)? That would be a much smaller change and should be evaluated **before** P2. ## 11. References - `docs/BLACKHOLE-PERF.md §3, §6, §7` — grid arithmetic, coordinate holes, the four unwired Ethernet tiles. - `bench/runs/reprofile-dfr-prefill-20261015.jsonl` — matmul share of the chunk. - `LEDGER R-2026-10-07-w2t` — `w2` on all 110 cores, 77% of LoFi peak: the proof that cores convert. - tt-metal issue #31942, PR #52017 — the upstream blocker and the only in-tree L2CPU data path. - `docs/REFERENCES.md:118-125` — the HAL tripwire.
Sign in to join this conversation.
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.

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