Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
b28e0ef
spec(BACKEND-TENSTORRENT-QWEN35): the Qwen3.5 GDN family on Tenstorre…
lu-zero Aug 23, 2026
24cfd2f
feat(BACKEND-TENSTORRENT-QWEN35): W1 — TT kernels for the three W0-re…
lu-zero Aug 23, 2026
6e5189d
feat(BACKEND-TENSTORRENT-QWEN35): W2a+W2b — bf16 cache arms, arch all…
lu-zero Aug 24, 2026
25ff335
docs(BACKEND-TENSTORRENT-QWEN35): W2b evidence — pool tenancy + gemma…
lu-zero Aug 24, 2026
3657ac9
feat(BACKEND-TENSTORRENT-QWEN35): W2c — GDN stage probes localize 2b …
lu-zero Aug 24, 2026
b9bb8e4
feat(BACKEND-TENSTORRENT-QWEN35): W2c — qkvz/BA replay captures + the…
lu-zero Aug 24, 2026
1f822c1
feat(BACKEND-TENSTORRENT-QWEN35): W2c — trusted =0-leg localization +…
lu-zero Aug 25, 2026
9f0a363
fix(BACKEND-TENSTORRENT-QWEN35): EnsureDevice2D interior slice views …
lu-zero Aug 25, 2026
b4fa1d9
feat(BACKEND-TENSTORRENT-QWEN35): W2c — DebugDeviceReadbackF32 seam; …
lu-zero Aug 25, 2026
2a39a44
feat(BACKEND-TENSTORRENT-QWEN35): W2c — VT_DUMP_TRUST dual-read dump …
lu-zero Aug 25, 2026
0bb1e06
fix(BACKEND-TENSTORRENT-QWEN35): allowlist VT_DUMP_TRUST (missed in t…
lu-zero Aug 25, 2026
6820a52
fix(BACKEND-TENSTORRENT-QWEN35): W2c resolved — pc_q anomaly was laye…
lu-zero Aug 25, 2026
c1ea650
fix(BACKEND-TENSTORRENT-QWEN35): EnsureDevice2D read stale host bytes…
lu-zero Aug 25, 2026
cb68a80
fix(BACKEND-TENSTORRENT-QWEN35): re-derive TT golden pair post reside…
lu-zero Aug 26, 2026
58f0c9d
fix(BACKEND-TENSTORRENT-QWEN35): repair review findings — non-TT link…
lu-zero Aug 26, 2026
9b39fba
test(BACKEND-TENSTORRENT-QWEN35): pin the governance-checker deltas w…
lu-zero Aug 26, 2026
6dcf75e
fix(BACKEND-TENSTORRENT-QWEN35): forward-declare vt::Tensor and vt::Q…
lu-zero Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .agents/backend-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ this repository. State remains `ACTIVE`; no lifecycle transition is claimed.
| `BACKEND-TENSTORRENT-RESIDUAL-GOLDEN` | Child of `BACKEND-TENSTORRENT` — the owed op-level numerics evidence at the residual-RMS device boundary (`kDeviceResidualMinRows == 32`): device path does `ttnn::add`+`ttnn::rms_norm` in bf16; host/CPU path accumulates in f32. Bot-flagged on #289; never measured at the boundary. | vllm.cpp CPU oracle `RmsNormKernel` mirrors vLLM `fused_add_rms_norm` (add in model dtype, variance in f32); `src/vt/cpu/cpu_ops.cpp:371-398` | `src/vt/tenstorrent/tenstorrent_ops.cpp:1067-1117` (host/device split, `kDeviceResidualMinRows=32`) | [test_tenstorrent_backend.cpp](../tests/vt/test_tenstorrent_backend.cpp) `kRmsNorm residual: device vs CPU f32 oracle across the rows=32 boundary`: 22/22 cases on real Blackhole P150. **Measured 2026-08-11:** host path `rows<32` bit-identical to CPU (`max_abs=0`); device bf16 path `rows>=32` diverges by constant **0.0459 abs** (1.9–2.6× rel on near-zero outputs) — bf16 rounding signature, not accumulation. Decision pending the e2e golden tie-break | [tenstorrent-residual-golden.md](specs/tenstorrent-residual-golden.md) | `SPIKE` | `CLAIM-BACKEND-TENSTORRENT-RESIDUAL-GOLDEN` |
| `BACKEND-TENSTORRENT-MISTRAL` | Child of `BACKEND-TENSTORRENT` — allowlist `MistralForCausalLM` (Mistral-7B-v0.3: GQA 32/8, head_dim 128, plain rope theta 1e6, untied lm_head, full attention) on the TT platform + device-aware SACRED gate. Mistral reuses the Qwen3-dense forward verbatim (qk-norm skipped); every op already registered. No new kernel. | vLLM `mistral.py::MistralForCausalLM(LlamaForCausalLM)` (already ported to the shared dense machinery); gate pattern mirrored from `test_qwen3_paged_engine.cpp:221-296` | `src/vllm/platforms/tenstorrent.cpp:52-54` (allowlist) + `tests/parity/test_mistral_paged_engine.cpp` (device-aware wiring + Backend Proof) | **Gate PASSED on Blackhole P150 (2026-08-12):** [test_mistral_paged_engine.cpp](../tests/parity/test_mistral_paged_engine.cpp) 16/16 prompts PASS (12/16 strict-exact, 4/16 near-tie, 0 forward-divergent), max gap **0.062 nats**, BACKEND PROOF 0 declines (kMatmul selections=256 = untied lm_head on device, kPagedAttention=8192). Goldens `our_ids_tenstorrent.npy` + `neartie_gap_mnats_tenstorrent.npy` (transformers alternative-oracle; POL-ORACLE deviation recorded, same as Qwen3-0.6B TT precedent). Exit SIGSEGV 139 is the known MeshDevice teardown crash, not a gate failure | [tenstorrent-mistral.md](specs/tenstorrent-mistral.md) | `ACTIVE` | `CLAIM-BACKEND-TENSTORRENT-MISTRAL` |
| `BACKEND-TENSTORRENT-GDN` | Child of `BACKEND-TENSTORRENT` — the GDN linear-attention op chain as native TT kernels, the hard prerequisite for the Qwen3.5/3.8 family (#1715): `kGdnPrefill`, `kGdnDecode`, `kL2Norm`, `kRmsNormGated`, `kCausalConv1dFwd`/`kCausalConv1dUpdate`, `kGdnStateGather`/`kGdnStateScatter`. The P150 is discrete, so an op miss refuses by name — the ops must land before any `Qwen3_5*` arch registration. Correctness oracle is our own CPU f32 arm (residual-golden precedent); no vLLM mirror exists for TT | Substrate: pinned tt-metal `ttnn::transformer::chunk_gated_delta_rule` (FLA chunked GDN forward, on-core recurrent state, `initial_state`/`final_state`) behind a varlen+state-permute adapter for `kGdnPrefill`; decode = rank-1 update composed from ttnn matmul+eltwise with a device shadow keyed by host pointer (`PagedKvShadow` pattern); contracts at `src/vt/ops.cpp:1823-2500`, CPU reference `src/vt/cpu/cpu_ops.cpp:1537-1740` | `src/vt/tenstorrent/tenstorrent_ops.cpp` (kernels + `RegisterOp` block `:3165-3199`) + `tests/vt/test_tenstorrent_backend.cpp` (op-level cases vs CPU f32 oracle, T-sweep, indexed-`state_idx` form, prefill↔decode state round-trip) | Spec committed 2026-08-22; implementation waves W1 (prefill set) then W2 (decode+state-I/O set) owed; lands production-unreached until the wiring row registers `Qwen3_5*` (named in `## Owed` per Nothing-lands-dead) | [tenstorrent-gdn.md](specs/tenstorrent-gdn.md) | `ACTIVE` | `CLAIM-BACKEND-TENSTORRENT-GDN` |
| `BACKEND-TENSTORRENT-QWEN35` | Child of `BACKEND-TENSTORRENT` — the wiring row: `Qwen3_5ForConditionalGeneration` (dense text GDN hybrid) on the TT allow-list, the op delta the family forward refuses by name (`kGdnPostConv`, `kSigmoidGateBf16`, `kAttnQkNormRopeGate`, `kAttnQkNormRope` — pinned empirically by a W0 refusal sweep), and the first e2e gate. Makes the GDN row's ops production-reached (#1715 stays open until the family runs; GDN row lifecycle moves in the same change this lands) | Substrate: the GDN row's 8 kernels + the 27-op TT registry; e2e mirrors the ratified Mistral TT golden treatment (`VT_DUMP_IDS` bootstrap → `scripts/qwen3-neartie-gap-transformers.py` teacher-forced near-tie gaps → committed device-golden pair, POL-ORACLE deviation); op-level oracle is the CPU f32 arm. Capacity: `Qwen/Qwen3.5-0.8B` bf16 ≈1.6 GB fits (proven envelope Mistral-7B ≈14.5 GB); 27B bf16 ≈53.8 GB and GGUF k-quant arms (no TT kernels) refused by name, owed | `src/vllm/platforms/tenstorrent.cpp` (allow-list, lands last) + `src/vt/tenstorrent/tenstorrent_ops.cpp` (op delta) + `tests/parity/test_qwen35_paged_engine.cpp` (TT arm) | Spec committed 2026-08-23; W0 sweep, W1 op delta, W2 e2e, W3 GDN-reviewer leftovers (d2h counter completeness, `conv_transposed` fast-path check) owed | [tenstorrent-qwen35.md](specs/tenstorrent-qwen35.md) | `ACTIVE` | `CLAIM-BACKEND-TENSTORRENT-QWEN35` |
| `BACKEND-TENSTORRENT-TRACE-RUNNER` | Child of `BACKEND-TENSTORRENT` — wire the landed graph-capture foundation (#354 / `59568772`) into a capturable forward region. Handoff §8/§9 "not done". **Decision (2026-08-13): NO-GO for pure T=1 decode capture — MEASURED, not assumed.** | CUDA is the ONLY backend with `SupportsGraphCapture()==true` (`cuda_backend.cu:184-240`); Metal/Vulkan `false`. Shared decode-graph framework `Qwen3DenseDecodeGraph` (qwen3.cpp:489, used by Qwen3/Mistral/Llama/InternLM2) gated on `support_static_graph_mode()` which TT does NOT override (base `false`) | `src/vt/tenstorrent/tenstorrent_backend.cpp:70-76` (capture surface, landed) + `tenstorrent_ops.cpp` `Trace*` (landed); NOT wired into a dense forward | **Measured on Blackhole P150 (2026-08-13):** Q1 no host-free region at T=1; Q2 all-device-at-T=1 costs 12.5→10.7 tok/s; Q2b capture attempt with both overrides flipped → ttnn **`TT_FATAL: Reads are not supported during trace capture`** (backtrace through `to_vector<float>`), `0 replays`. The T=1 forward does device→host readbacks that ttnn trace prohibits; flipping the two thresholds is insufficient. Requires a host-free `ForwardLayers` redesign, not a threshold tweak. Next: prefill capture (separate row) must first audit its `to_vector` readbacks | [tenstorrent-trace-runner.md](specs/tenstorrent-trace-runner.md) | `SPIKE` (decision record complete) | `CLAIM-BACKEND-TENSTORRENT-TRACE-RUNNER` |
| `BACKEND-TENSTORRENT-HOST-FREE-FORWARD` | Child of `BACKEND-TENSTORRENT` — make the per-decode-layer forward region host-free (zero `to_vector` readbacks) so mesh-trace capture can run. Decomposes into R1 RmsNorm+RoPE all-device, R2 QkvSplit+ReshapeAndCache device, R3 PA decode device-resident metadata, R4 capture wire+measure. Prerequisite revealed by the trace-runner spike (capture aborts on `to_vector`). | CUDA decode-graph capture contract (`cuda_backend.cu:184-197`): captured region is async, no host sync, no malloc, fixed ptrs. TT must match: no `to_vector` between Begin/EndCapture | `src/vt/tenstorrent/tenstorrent_ops.cpp` (RmsNorm:1067, PreferDeviceRope:1344, QkvSplit:1460, ReshapeAndCache:1527, PagedAttention:2009) | **R1-R3b MEASURED on P150** (env-gated `VT_TT_HOST_FREE_DECODE`, inert by default; 23/23 TT tests incl. a dedicated default-path inertness guard, M1-mutation-proved): R1 threshold flip landed; R2 device->device copy (`CopyDeviceDeviceIfCapture`, ttnn::copy+empty) landed; R3 program-cache warm (`enable_program_cache` + eager-warm) landed; R3b device zero-fill (`MemsetDeviceIfCapture`) landed. Capture enters the forward and reaches layer ops (CastBf16/RmsNorm fire). Remaining item-5 blocker = per-op enqueue_write; answer = persistent device tensors + before-replay populate (tt-metal vLLM plugin design). Full blocker map + architecture in [tenstorrent-host-free-r1.md](specs/tenstorrent-host-free-r1.md). **R5 (2026-08-21, #1604): host-free decode is the DEFAULT** — `HostFreeDecodeEnabled()` centralizes the polarity (exact `0` = pre-flip opt-out), both device golden pairs re-dumped and re-adjudicated under the new default (Qwen3 max 375 mnats, Mistral max 250 mnats, 0 outside top-K), both paged-engine gates 16/16 green (125/125 + 128/128 assertions), default leg 10.94-11.06 tok/s vs 5.34 opt-out (2.1x, Qwen3-0.6B b1). Capture declined by default: multi-request captured hangs (#1625); TT async scheduling stays off, no `SupportsAsyncSampledTokenReadback` override (#1627) | [tenstorrent-host-free-forward.md](specs/tenstorrent-host-free-forward.md) | `ACTIVE` (R1-R3b + R5 default flip gated on `row/BACKEND-TENSTORRENT-HOST-FREE-1604`; capture declined per #1625, TT async readback owed per #1627) | `CLAIM-BACKEND-TENSTORRENT-HOST-FREE-FORWARD` |
## Native competitor and performance gates
Expand Down
5 changes: 5 additions & 0 deletions .agents/claims/CLAIM-BACKEND-TENSTORRENT-QWEN35.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CLAIM-BACKEND-TENSTORRENT-QWEN35

| Claim | Row IDs | Agent | Worktree / remote dir | Branch | Owned scope | State | Last update |
|---|---|---|---|---|---|---|---|
| `CLAIM-BACKEND-TENSTORRENT-QWEN35` | `BACKEND-TENSTORRENT-QWEN35` (`ACTIVE`, new) | Maki (zai-glm-5.3), helper role per `scripts/agent-role.py`, working from the committed spec `.agents/specs/tenstorrent-qwen35.md` | isolated worktree `/home/lu_zero/Sources/vllmcpp-tt-qwen35`; real Blackhole P150 (`thalia`, local board, `flock` mutex per GPU rule — not an `rc` fleet device) | `row/BACKEND-TENSTORRENT-QWEN35`, base `origin/main` `175733000`, issue [#1715](https://github.com/mudler/vllm.cpp/issues/1715) (tracks the wiring row per the GDN spec's `## Owed`) | Owns ONLY: the `Qwen3_5ForConditionalGeneration` TT allow-list entry (lands last), the W0 refusal sweep that pins the op-delta scope, the W1 op delta (`kGdnPostConv`, `kSigmoidGateBf16`, `kAttnQkNormRopeGate`, `kAttnQkNormRope`, plus whatever the sweep adds), the W2 e2e TT golden-pair gate for `tests/parity/test_qwen35_paged_engine.cpp` + the `docs/USAGE.md` weights entry (`Qwen/Qwen3.5-0.8B` @ `2fc0636471`, download authorized 2026-08-23), the W3 GDN-row reviewer leftovers (d2h counter completeness for `EnsureGdnCacheDevice` slow path + `CommitConvTransposed` fallback; the `conv_transposed` fast-path check), the spec, the backend-matrix row, and the two checker re-pins. EXCLUDES: MoE arches, GGUF k-quant arms (refused by name, owed), the VL tower, 27B-on-TT (no fitting arm), `src/vt/cpu/` (the oracle stays untouched), `src/vt/cuda/`, #1625/#1627 | `ACTIVE` | 2026-08-24 — W2b: pool-tenancy defect fixed (mutation-pinned), gemma `+1` defect fixed (mutation-pinned, op-level case added); ambient collapse healed — fixed engine matches the oracle on p0 and sits near-tie on 247/256 steps. Open: 2b (six out-of-band steps, leg-independent, intrinsic; layer bisect needs a GDN dump hook). Goldens in worktree describe the fixed engine. Nothing committed yet |
Loading
Loading