# dual-radeon-vllm English | [中文](README.zh.md) **[Project website · interactive charts and articles](https://cadamcat.github.io/dual-radeon-vllm/)** **Tensor-parallel vLLM on two consumer Radeon cards (RX 7900 XT, gfx1100, ROCm 7.14), verified end to end — including the RCCL failure caused by missing PCIe AtomicOps.** `gemma-4-31B` (w4a16) decodes at **43 tok/s** on 2× RX 7900 XT with both cards drawing 265 W *at the same time*, and a 26B MoE reaches **108 tok/s** at short context. The machine is a VFIO virtual machine with **no P2P and cross-die PCIe 3.0**, and those figures were measured with **no PCIe atomics** either: the topology on which the baseline was measured. Since then the same ladder has been run on twelve other machine configurations, rented and granted, against that pair.
43 tok/s
gemma-4-31B w4a16, TP=2
108 tok/s
gemma-4-26B-A4B MoE, TP=2
1.70×
TP=2 speed-up on BF16, 85% efficiency
265 W × 2
31B, both cards together = real tensor parallel
**Start here:** [Diagnose and fix RCCL](#am-i-hit-by-the-rccl-bug) · [Findings](#findings) · [Measured performance](#the-pair-measured) · [Limits and workarounds](#what-does-not-work) · [Every campaign](benchmarks/CAMPAIGNS.md) ## Measured on | machine | cards | whose | context ladder | since | |---|---|---|---|---| | **RX 7900 XT** (gfx1100, ROCm 7.14) — the subject of everything here | 2, and 1 | ours | 500 – 32 000, and to **128 000** from 2026-09-03 | 2026-07-25 | | A100 SXM4 80G | 1 | Colab | 500 – 32 000 | 2026-08-29 | | L4 24G · T4 16G | 1 | Colab | 500 – 32 000, the L4 to 128 000 | 2026-08-30 | | A100 SXM4 40G | 1 | Colab | one measurement: what the derived bandwidth figures are worth | 2026-09-02 | | H100 80G | 1, 2 and 4 | rented on Modal | 500 – 128 000 | 2026-09-03 | | H200 143G · B300 275G | 1 | rented on Modal | 500 – 128 000 | 2026-09-03 | | RTX PRO 6000 96G | 1 and 2 | rented on Modal | 500 – 128 000 | 2026-09-03 | | MI300X 192G (gfx942) | 1 | rented on AMD Developer Cloud | 500 – 32 000, the int4 30B to 64 000 | 2026-09-17 | Fourteen machine configurations, eight checkpoints, 6 048 request-level measurements in 61 results files, 2 440 chart-grade cells in the two cross-machine projections, 880 all-reduce cells on eight pairs and quads, and 13 write-ups in two languages. [`verify_doc_figures.py`](benchmarks/analyze/verify_doc_figures.py) recomputes each of those counts, and every figure below, from the committed files. ## What is in here Three things, each usable on its own: | Part | What it is | |---|---| | 🔧 **A fix** | The RCCL bug that makes `--tensor-parallel-size 2` fail on consumer Radeon, root-caused to PCIe AtomicOps, with a 57-line reproducer. **On bare metal the fix is one RCCL rebuild** (recipe and deployment script in here); **in a VM it is usually one line of VM configuration** ([here](docs/vfio-atomics.md)). [Start here](#am-i-hit-by-the-rccl-bug) | | 📊 **The data** | Seven model architectures on **fourteen machine configurations** — two consumer Radeons together and apart, an A100 80G and 40G, an L4 24G, a Tesla T4 16G, since 2026-09-03 a rented H100 (one, two and four of them), H200, B300 and RTX PRO 6000 (one and two), and since 2026-09-17 an MI300X, the other AMD architecture — with the raw per-request records, the runners that produced them, and analysis scripts that need no GPU. The Radeon ladders ran to 32 000 tokens until 2026-09-03; the rented cards run to **128 000**, and [`benchmarks/cuda-modal/`](benchmarks/cuda-modal/README.md) is the document for that sweep. Since 2026-09-02 each cell also carries the card's clocks, power and temperature, and the A100 40G appears for one measurement only: what the derived bandwidth figures are worth. The cross-machine projections (`prefill.jsonl`, `decode.jsonl`) are rebuilt from those records and checked against them on every run. [Charts and findings](#the-pair-measured) · [`benchmarks/`](benchmarks/) | | 🔬 **A regression in the kernel Ubuntu shipped for months — now fixed** | Host→device copies collapse to **2 MiB/s** from a writable file mapping whose pages are resident — the path every PyTorch process takes to load a safetensors checkpoint. Traced to a half-applied backport in `7.0.0-28-generic`, **proven by applying the missing commit**, and **fixed in `7.0.0-30.30~24.04.1`**: the same reproducer binary on the same machine goes **16 019.3 ms → 15.3 ms** across the upgrade ([data](benchmarks/hmm-kernel-three-states.json)) — and the fix arrived through the normal stable route, not through this report. Filed as [ROCm#6523](https://github.com/ROCm/legacy-rocm-build/issues/6523), where AMD confirmed the copy-on-write trigger and a third party reproduced it on bare metal, and with Ubuntu as [LP#2161985](https://bugs.launchpad.net/ubuntu/+source/linux-hwe-7.0/+bug/2161985); workaround at [vllm#49991](https://github.com/vllm-project/vllm/pull/49991). The writable-mapping penalty itself survives on current kernels: the loader flag is worth **1.5× to 2.0× while the checkpoint fits in RAM and 7.5× when it does not** ([data](benchmarks/loader-flag-kernel-30.json)); the **3.9× to 5.6× published here and upstream on 2026-07-28 came from a run with no control over page cache and does not reproduce.** The full chain — the half-pair of commits, the rebuild, the resident-set mechanism — is [open-questions.md §8](docs/open-questions.md) | ## Who this is for You have **two AMD consumer GPUs** and want `--tensor-parallel-size 2` to actually work. You are probably here because of one of these: - 🔴 **It crashes immediately**: `NCCL error: unhandled cuda error`, or `HIP failure 'the operation cannot be performed in the present state'`. → **[Jump to the 60-second triage](#am-i-hit-by-the-rccl-bug)**. The probe separates a hostcall refusal from other RCCL failures. - 🟡 **It runs, but you do not know what to expect** → [The pair, measured](#the-pair-measured) - 🟢 **You are deciding whether to buy/build this** → [What does *not* work](#what-does-not-work) first, please **Not a vLLM fork.** The RCCL fix lives below vLLM — in the VM configuration if you are in a guest, otherwise in one RCCL rebuild — so there is no upstream to keep rebasing against. [`patches/`](patches/) does carry downstream vLLM changes, with the campaigns that exercised them; the RCCL fix does not require those vLLM patches. **Status.** A reproducible engineering record, not a supported product: - The RCCL rebuild removes the hostcall requirement. A separate [runtime opt-in](benchmarks/clr-hostcall-load-check-2026-09-05/README.md) has also been tested; it leaves the declaration in place and permits a null buffer. A kernel that actually executes a hostcall can fault under that opt-in. - Binaries are tied to **both** an architecture and a ROCm version; each campaign records the stack it used. - Verified on **gfx1100 only**. Prebuilt binaries cover more architectures because they cost nothing extra to compile — they are **not verified**. - Welcome: `hipgate3` output from any machine, benchmark numbers, corrections. Out of scope: general ROCm/vLLM support. [**docs/open-questions.md**](docs/open-questions.md) lists what we deliberately have *not* proven — including the rebuild-and-count test still missing after the source change that dropped `NDEBUG` was identified. --- ## Findings Each finding links to the experiment that supports it. - **Memory-controller activity orders the measured second-card gains** — `mem_busy` orders the answer in five settings, second Radeon to second H100 ([`cuda-modal/`](benchmarks/cuda-modal/README.md)). - **The collective spans 62× across seven pairs and quads, and inference uses none of it**: batch-1 decode lands on the latency end, which spans 3.2× ([`allreduce-2026-09-03/`](benchmarks/allreduce-2026-09-03/)). - **vLLM chose three attention backends across four rented cards** with no flag anywhere, so every cross-machine ratio carries a backend term — read out of each serve log, not assumed ([`cuda-modal/`](benchmarks/cuda-modal/README.md#four-cards-three-attention-backends-nobody-asked-for-any-of-them)). - **A bounded window keeps Muse-Glimmer flatter than the hybrid SSM on the measured H100 stack**: Muse-Glimmer loses 4.8 % on an H100, the hybrid-SSM 27B 21.8 %, as far as the dense 31B's 22.0 % ([`cuda-modal/`](benchmarks/cuda-modal/README.md#context-past-32-000-and-what-makes-a-curve-flat)). - **The pair itself now reaches 128 000** — four of six models run the sixteen-rung ladder to 128 000 on two 20 GB cards, the gemma arms ending at about half their 500-token rate (the 12B −52.5 %) and the bounded-window Muse-Glimmer at −17.3 %, with the telemetry saying which of those is compute and which is memory ([`campaign-2026-09-03/`](benchmarks/campaign-2026-09-03/README.md)). - **The gfx11 GQA gate excludes a kernel that is 1.84–7.28× faster** in the tested `gqa_ratio` 1–2 range. Those are kernel timings on gfx1100, not end-to-end speed-ups ([raw timing and accuracy records](benchmarks/vllm-50603/)). For [vllm#54210](https://github.com/vllm-project/vllm/pull/54210), [gsm8k on the pair](benchmarks/vllm-54210-gsm8k/) supplies the application check: over **1 319 questions**, widening the gate moves strict accuracy by **−2 questions** and flexible accuracy by **+2 questions**, with dispatch recorded on both ranks. This covers gemma-3 at ratio 2; it does not measure latency. - **The same checkpoint spans 3.00× in depth cost across software stacks.** Qwen3.8-27B on this pair costs **0.350 → 0.233 → 0.117 µs per context token** over the shared **500–32 000** ladder: vLLM 0.23.1, then 0.27.1, then `--attention-backend TRITON_ATTN`. The version comparison also changes ROCm and the weight kernel; within 0.27 only the backend flag changes, and that Triton path carries #45450. At **128 000**, Triton gives **1.48× decode** and **0.44× prefill** relative to ROCM_ATTN. The earlier [version re-run](benchmarks/campaign-2026-09-06/) separates retention from absolute cost; the [backend A/B and drift control](benchmarks/campaign-2026-09-07/) show that the cost itself depends on the implementation. - **Eleven lines in the paged-decode kernel are worth 2.75× and 3.15× at 32 K** on the two sliding-window models, because the stock loop reads the whole sequence and masks the window away ([why](docs/sliding-window-block-skip.md)). - **Speculative decoding's 3.4× collapse at 32 K is a path choice**: two query tokens a step drop the Triton attention launcher from the segmented 3D path to the serial 2D one, and readmitting 3D (vllm#45450) takes the pair from 8.81 to 32.57 tok/s at 32 K, validated on both vendors ([why](docs/speculative-decoding-on-rdna.md)). - **The greedy non-determinism is the W4A16 kernel's split-K epilogue**: with vllm#54706's fixed-order reduction built into this container's own vLLM commit, 32 of 32 greedy generations come back identical where the same build without it varies in two of four cells, backend held ([the A/B](benchmarks/gfx1100-w4a16-54706/README.md)). - **The second Radeon buys 1.70× on BF16 and 1.18× on w4a16**, on the August stack; the RCCL fix and the measured configurations follow below ([the pair, measured](#the-pair-measured)). --- ## The RCCL bug The failure this section diagnoses: `--tensor-parallel-size 2` dies in the first collective. The messages it leaves, how to tell in sixty seconds, who it hits, and the one-line and the ninety-minute fix. ### The messages
Did you get here from a search engine? These are the exact messages this repository explains ``` RuntimeError: NCCL error: unhandled cuda error HIP failure 'the operation cannot be performed in the present state' at .../rccl/src/enqueue.cc:2061 hipModuleLaunchKernel: Returned hipErrorIllegalState NCCL WARN cuMem support requires VMM RDMA support rocvirtual.cpp:4208 Pcie atomics not enabled, hostcall not supported rocvirtual.cpp:4636 AQL dispatch failed! amdgpu 0000:0b:00.0: amdgpu: PCIE atomic ops is not supported ``` If any of those look familiar, and you are running **two or more AMD GPUs** under **vLLM, PyTorch DDP/FSDP, or anything else that calls RCCL**, on a consumer chipset or inside a **VFIO/QEMU passthrough VM**, then this repository has the root cause, a 57-line reproducer and a working fix. It applies to **RX 7900 XTX / XT / GRE, RX 7800 XT, RX 7600, RX 6800 / 6900 XT, RX 9070 / 9060 and virtualised Instinct**, because the trigger is the PCIe path to the card rather than the card itself. Verified end to end on gfx1100; the table under *Who is hit* says what is and is not tested for the rest. Search engines split these names differently, so for the record: RX 7900 XT is also written 7900XT and RX7900XT, and the XTX 7900XTX and RX7900XTX. One line in that list is the odd one out. `cuMem support requires VMM RDMA support` is RCCL declining its own cuMem path because VMM RDMA is unavailable — benign, and not the cause of anything here. It is listed because it appears in the same logs and because people search for it. `NCCL_CUMEM_ENABLE=1` changes nothing on this machine; it is one of the 11 combinations in `diagnose/sweep.sh`.
### Am I hit by the RCCL bug? **If your GPUs are passed through to a VM, check one thing first.** Passing a card's audio function alongside the GPU stops QEMU from advertising PCIe AtomicOp completer support, and that alone produces every symptom below. On Proxmox it is the difference between `hostpci0: 0000:0b:00` and `hostpci0: 0000:0b:00.0`, and on this machine it took stock RCCL from failing to working with nothing else changed. **[Read this before rebuilding anything](docs/vfio-atomics.md)** — it is a one-line change and it costs nothing to rule out. If you are on bare metal, or the fix above does not apply, carry on: two commands, and the second is decisive and needs no RCCL, no PyTorch, no vLLM. ```bash ./diagnose/check-platform.sh # dmesg + PCIe bridge chain + hostcall count ``` ```bash hipcc --offload-arch=gfx1100 -O2 diagnose/hipgate3.cpp -o diagnose/hipgate3 && ./diagnose/hipgate3 ``` **You are affected if the plain kernel passes and the hostcall kernel is refused, or if its device marker never prints:** ``` --- device 0 (gfx1100) --- plain ok launch:no error | sync:no error | lastError:no error hostcall REFUSED launch:the operation cannot be performed in the present state | ... ``` The probe reads `hipGetLastError()` and the device `printf` as well as the return codes, because on some machines launch and sync both report success while the dispatch was refused and the `printf` silently never arrives. It also runs per device: a machine can have one affected GPU behind the chipset and one healthy one on CPU-direct lanes. The chain from a missing PCIe AtomicOp to `hipErrorIllegalState` is five steps, each with the command that shows it, in **[docs/root-cause.md](docs/root-cause.md)** — with the 13 hypotheses that were tested and the 12 that were eliminated. **→ Fix it: [docs/deploy-vllm.md](docs/deploy-vllm.md)** · **→ Not sure yet: [docs/diagnosis.md](docs/diagnosis.md)** > ### RCCL rebuild: use the tested **2.27.7** recipe > > | RCCL source | `NDEBUG` patch | Status | > |---|---|---| > | **2.27.7** — `ROCm/rccl`, `release/rocm-rel-7.1.1.1` | hostcall → **0** | ✅ **Verified working** | > | 2.30.4 — `ROCm/rocm-systems`, `projects/rccl` | hostcall still **3** | ❌ **Verified failing** | > > This table is the **`NDEBUG` rebuild without PCIe atomics**, not a verdict > on every way of running these versions. On the tested 2.30.4 rebuild, the > device linker declares the hostcall buffer even though the linked > image contains *zero* `__ockl_*` symbols. `NDEBUG` cannot fix that. > [Details](docs/open-questions.md). Note RCCL **moved**: `ROCm/rccl` is now > `develop_deprecated`; development continues in the `rocm-systems` monorepo. > > With atomics present, **stock 2.30.4 passes 12/12 collective cases** > ([capability matrix](benchmarks/rccl-ndebug-ab-2026-09-04/)). Without atomics, > a **patched HIP runtime with `HIP_HOSTCALL_ALLOW_MISSING=1`** also runs stock > 2.30.4: **12/12 collectives**, and a TP=2 Qwen3-8B serve request > ([runtime experiment](benchmarks/clr-hostcall-load-check-2026-09-05/)). > The flag requires that runtime patch; an actual hostcall under the opt-in > faults on the device. It is a tested alternative, not a general bypass. ### Who is hit The bug is triggered by the **platform**, not by the GPU, so it hits any AMD GPU that cannot get PCIe AtomicOps to its root complex: cards behind a consumer chipset switch, and QEMU/VFIO passthrough guests, including virtualised Instinct. **In a guest, check the VM configuration first** — passing a card's audio function alongside the GPU is enough to remove AtomicOps on its own ([the one-line fix](docs/vfio-atomics.md)). The rebuild above is for hardware that genuinely cannot deliver AtomicOps: chipset-fed slots on bare metal, root ports without completer support, QEMU older than 8.1.0. We build it for seven targets: | Target | Cards | Status | |---|---|---| | **gfx1100** | RX 7900 XTX / XT | ✅ **verified end to end**: every number in this repository | | gfx1030 | RX 6800 / 6800 XT / 6900 XT | 🟡 dispatch gate verified, collectives not. On a mixed gfx1030+gfx1100 pair the stock library fails on the gfx1030 rank with "the operation cannot be performed in the present state" and ours reaches Init COMPLETE on that same rank. No collective ran: the pair faults in `libamdhip64` under every env tried, and we cannot separate that from architecture mixing without a second gfx1030 | | gfx1101 | RX 7800 XT / 7700 XT | ⚪ same | | gfx1102 | RX 7600 / 7600 XT | ⚪ same | | gfx1200 | RX 9060 | ⚪ same | | gfx1201 | RX 9070 / 9070 XT | ⚪ same | | gfx908 | MI100 | ⚪ same | ⚪ means the device image passes the static check that matters (`hidden_hostcall_buffer` = 0) but has never been run on real silicon. 🟡 means the dispatch gate was verified against a stock control but no collective completed. We have only ever owned 7900 XTs and borrowed a 6800 XT for two days, so if you try one of the others, a one-line report either way is genuinely useful. The failure is **not** limited to virtual machines: @adderek independently reproduced it, and the fix, on bare metal with IOMMU entirely disabled (2× RX 7900 XTX on a B550 board) in [ROCm#6520](https://github.com/ROCm/legacy-rocm-build/issues/6520). Their machine is also a useful shape to know about — one GPU affected because it sits behind the chipset, one healthy because it is CPU-direct. On mainstream boards the second full-length slot is often wired to the chipset rather than the CPU, so a two-GPU build can land in exactly this shape with no VM involved. > **The built library is not in this repository.** A 97 MB binary does not belong in > git. Two ways to get one: > > - **[Releases](../../releases)** — `librccl-nohostcall-2.27.7-gfx1100.so` (19 MB, > what every number here was measured on) or the 97 MB multi-arch build, both with > SHA256 sums. > - **Build it yourself** with [`build/build-rccl-nohostcall.sh`](build/build-rccl-nohostcall.sh): > about 85 minutes for one target on a slow host, and > [`build/verify-nohostcall.sh`](build/verify-nohostcall.sh) checks the result > independently of who compiled it. ### Verified configuration The original Radeon baseline used the configuration below. Later campaigns name their own versions and settings; the newer Qwen3.8 arms use ROCm 10.0 and vLLM 0.27. | | | |---|---| | **GPUs** | 2× Radeon RX 7900 XT (gfx1100, RDNA3), 20 GB each = 40 GB | | **Interconnect** | Cross-die, PCIe 3.0, **no P2P**, `NCCL_P2P_DISABLE=1` | | **Host** | Threadripper 1950X (Zen 1), X399 | | **Virtualisation** | Proxmox VE + QEMU, **VFIO passthrough**. No PCIe atomics in the July baseline; later campaigns record the platform state — [see below](#hardware-notes) | | **Stack** | ROCm 7.14 · vLLM 0.23 · PyTorch 2.11 · **RCCL 2.27.7 rebuilt** | > These are measurements of this topology. A bare-metal P2P configuration > has not been benchmarked here. The investigation from the PCIe path to the failing kernel is told in [RCCL, atomics and hostcall](https://cadamcat.github.io/dual-radeon-vllm/articles/rccl-atomics-hostcall.html). --- ## The pair, measured **The 2026-07-25 baseline, the pair alone.** Five models × eleven context lengths, 292 measurements, zero errors, on stock vLLM. Full write-up in **[docs/benchmarks.md](docs/benchmarks.md)**; raw data and the runner in [`benchmarks/`](benchmarks/). Every run uses a random prefix to defeat prefix caching; decode is measured first-token-to-last, so TTFT is excluded. **A second campaign on 2026-08-24** measured the same ladder on a patched container: 372 measurements, nine configurations, six of them the July ones rerun as controls. Four reproduce within 0.25 %, one is too noisy to say, and one does not ([benchmarks.md §6](docs/benchmarks.md#6-the-same-machine-patched-a-second-campaign-on-2026-08-24)). For the measurement method and the checks behind the timings, read [Measuring decode](https://cadamcat.github.io/dual-radeon-vllm/articles/measuring-decode.html). ![decode throughput vs context length, the best of the ledger's candidates](docs/assets/decode-vs-context-best.svg) One line per model, selected among the ledger's TP=2 candidates without speculation — the campaigns of 2026-07-25, 2026-08-24 and 2026-08-29 and the 2026-08-28 probes — with what that took written under the chart: solid needs nothing but a released vLLM, dashed needs a patch that is not merged. The rule takes the deepest context a series reaches, then its throughput there, and keeps an unpatched series within 2 % of a patched one. It is drawn from [`benchmarks/ledger.jsonl`](benchmarks/ledger.jsonl), which carries the date, vLLM, ROCm and patch list of every point. September campaigns are outside this figure's candidate set; the [newer backend A/B](benchmarks/campaign-2026-09-07/) and [interactive long-context figures](https://cadamcat.github.io/dual-radeon-vllm/#figlong) carry the later measurements. **The chart and the table below answer different questions, and Qwen3.8-27B is where that shows.** The table is one campaign, run on one afternoon on one stack; the chart selects across the ledger's candidates to 2026-08-29. That model reads 10.7 tok/s at 32 K in the table and 36.1 on the chart, and the difference is vLLM 0.27 with [#45916](https://github.com/vllm-project/vllm/pull/45916) applied ([the A/B](docs/hybrid-decode-on-rdna.md)). ### vLLM, tensor parallel — decode tok/s (2026-08-24, patched container) The six configurations in the chart, measured the same way. The four July models were rerun as controls and come back within 0.25 %, except gemma-4-31B at −0.85 %, which is recorded as unexplained. The stock 2026-07-25 campaign — chart and table — lives in [benchmarks.md](docs/benchmarks.md). | Model | Precision | 500 tok | 8 K | 32 K | | |---|---|---:|---:|---:|---| | **gemma-4-26B-A4B** | int4, 128-expert **MoE** | **107.7** | 92.6 | **72.9** | 🟢 fastest of the nine — *26-min first engine start; warm cost not measured here* | | Qwen3-8B | BF16 dense | 79.5 | 73.4 | 61.4 | 🟢 TP=1 → TP=2 is **1.70×** | | gemma-4-12B-it | w4a16 QAT dense | 59.9 | 52.0 | 41.4 | 🟢 TP=1 → TP=2 only **1.18×** — see below | | **Muse-Glimmer-30B** | int4, **sliding window 2048** | 43.7 | 37.8 | **37.4** | 🟢 flat from its window onward. 0.122 µs slope, second only to BF16 | | **gemma-4-31B-it** | w4a16 QAT dense | 42.8 | 36.6 | 29.3 | 🟢 the workhorse. 265 W × 2 synchronised | | **Qwen3.8-27B** | AWQ int4 (asymmetric), **hybrid SSM** | 12.3 | 11.7 | **10.7** | 🟢 **2.51×** the July Qwen3.6 at 32 K, slope 12.4× flatter. Slowest in this campaign; on vLLM 0.27 with #45916 it is not — see the chart above | gemma-3-27b (44.8 / 34.6 / 22.1) is measured but not plotted: between 500 and 4 000 it runs within two tok/s of both Muse-Glimmer and gemma-4-31B and the three lines read as one. > **The Qwen3.8-27B row is checkpoint-bound, not architecture-bound** > *(2026-08-27)*. That checkpoint is asymmetric int4, which misses vLLM's native > gfx1100 W4A16 kernel **on the 0.23 image** and sends every quantised linear > to Triton. The same model with a symmetric checkpoint is > **3.24× faster at 1 K** under matched > conditions, a flat ~60 ms per decode step > ([benchmarks/w4a16-symmetry](benchmarks/w4a16-symmetry/)). The *slope* > conclusions are specific to that stack too: the > [version and backend experiments](benchmarks/campaign-2026-09-07/) change > the depth cost on the same asymmetric checkpoint. gemma-3-27b is symmetric; > the two 27B models differ by 3.64× in this campaign. ### llama.cpp, for comparison The committed comparison is Qwen3.6-27B Q4_K_M, two cards, layer split, llama-bench build `47c786924`, with 128 generated tokens per repetition. It compares the ROCm and Vulkan backends on that checkpoint, not the newer Qwen3.8 vLLM arms. Rates are decode tok/s at each recorded context depth. | Context | ROCm | Vulkan | |---:|---:|---:| | 512 | 24.89 | 28.61 | | 4096 | 24.56 | 28.27 | | 8192 | 24.17 | 27.79 | | 16384 | 21.35 | 27.04 | | 24576 | 22.48 | 26.43 | | 32768 | 21.84 | 26.04 | Raw records: [ROCm](benchmarks/llamacpp-depth-sweep-rocm.json) and [Vulkan](benchmarks/llamacpp-depth-sweep-vulkan.json). The separate [gemma-4 layer/tensor experiment](benchmarks/llamacpp-layer-vs-tensor.json) records its process-to-process spread and the layer-split restore failure. ### The charts worth the scroll **What the second GPU actually buys.** Dashed is one card, solid is two. The blue pair (BF16) separates; the green pair (4-bit) barely does. Same machine, same interconnect, same RCCL, and a threefold difference in what the second card is worth. This is the 2026-08-24 rerun; the July original — within 0.25 % of it, and the closest thing here to a repeatability check on the whole apparatus — is in [benchmarks.md](docs/benchmarks.md): ![single card vs dual card, patched](docs/assets/tp1-vs-tp2-2026-08-24.svg) **What one context token costs at decode time.** The slope is the number that matters: it is milliseconds added per token of context, so a flat line is a model whose decode does not care how long the conversation is. Every line here uses the same candidate set, to 2026-08-29, and the same rule as the static throughput chart above. ![cost of one context token at decode time, the best of the ledger's candidates](docs/assets/decode-ms-per-token-best.svg) **The same checkpoint on three software stacks.** Every line above is one model on the stack that measured it best among the ledger's candidates to 2026-08-29. This chart holds the model still and changes the stack: Qwen3.8-27B, the same weights on the same two cards, on the published 0.23.1 arm, on 0.27.1 with the backend it picks for itself, and on 0.27.1 with `--attention-backend TRITON_ATTN`. Fitted over the 500–32 000 rungs all three ladders share, the steepest slope is **3.00×** the flattest; the numbers are the ones in [Findings](#findings). The right-hand panel is why the flattest line is not simply the best one: Triton against the backend 0.27 picks gains at decode and loses at prefill, and both ratios move away from 1.0 monotonically with depth. Within 0.27 only the backend flag changes; the version step also changes ROCm and the weight kernel, so the first step is a stack difference rather than a backend one. Rows: [campaign-2026-09-03](benchmarks/campaign-2026-09-03/) for the 0.23.1 arm and [campaign-2026-09-07](benchmarks/campaign-2026-09-07/) for the pair of 0.27 arms and the drift control that prices their session boundary. ![one checkpoint on three software stacks, and the backend trade](docs/assets/depth-cost-three-stacks.svg) **The hybrid-SSM collapse on the measured stock path, and its repair.** Qwen3.8-27B is a hybrid SSM: 48 linear-attention layers that promise O(1) per token, and 16 full-attention layers that do not. On the tested vLLM 0.27 stock path the full layers dominate and the cost climbs a straight line to **261.9 ms per token at 32 K**. The same model on the same machine with [#45916](https://github.com/vllm-project/vllm/pull/45916) applied is **27.7 ms with a shallower slope** — 9.5× at 32 K, and the slope falls from 7.41 to 0.26 ms per thousand tokens of context. That PR is not merged. ![the hybrid-SSM collapse and what closes it](docs/assets/hybrid-ssm-collapse.svg) Both arms are two passes on one stack with the arm order reversed, and the routing is recorded from inside the TP workers rather than inferred; the 8 K point came out in two modes and the chart says so. Method and raw rows: [hybrid-decode-on-rdna.md §6.6](docs/hybrid-decode-on-rdna.md). The per-campaign versions of the first two charts, with every model pinned to one stack, are in [benchmarks.md](docs/benchmarks.md). [Retention versus depth cost](https://cadamcat.github.io/dual-radeon-vllm/articles/depth-cost-is-the-stacks.html) explains the later version and backend comparisons; the [cross-machine retention check](docs/depth-cost-cross-machine.md) tests how those rankings depend on repeats and the definition of cost. **What eleven lines buy on a windowed model.** The sliding-window block skip changes nothing below each model's own window (1.00×, there is nothing to skip), then the gain grows monotonically: 2.75× on gemma-3 and 3.15× on Muse-Glimmer at 32 K. The stock loop is why `gemma-3-27b` decodes at 8.05 tok/s at 32 K where the larger `gemma-4-31B`, routed to a backend that bounds its loop, does 30.21; end to end on 2026-08-24 the patched gemma-3 reaches 22.05 and Muse-Glimmer runs flat at 37.4 from its window onward. The shape is the mechanism check — [the patch and its correctness argument](docs/sliding-window-block-skip.md): ![sliding-window block skip](docs/assets/sliding-window-block-skip.svg) **Prefill, for completeness.** Every model peaks early and then falls away, and the ordering does not survive the fall: the 8B leads at 500 by 2.1× over the MoE and the MoE has passed it by 32 K. **Where the peak sits is not a result this ladder establishes.** In the 2026-08-24 campaign it is 2 K for four of the six, 4 K for the MoE and 6 K for the hybrid-SSM; the same MoE configuration measured in July peaks at 6 K instead, and the fitted `S* = √(a/c)` was withdrawn on 2026-08-30 because `a` does not reproduce — it comes out at 9.8 and 99.8 ms for one configuration a month apart, and below zero for another. What the ladder does determine is the shape: `b` and `c` reproduce to 1.5 %. [docs/benchmarks.md](docs/benchmarks.md#4-prefill-peaks-and-where-the-peak-sits) has both the fits and the withdrawal. ![prefill throughput vs context length, patched](docs/assets/prefill-vs-context-2026-08-24.svg) **The speculative-decoding collapse, taken to CUDA.** One rented A100 replaces both Radeons and the story survives the port: on the routing gemma-4 gets by default (TRITON_ATTN whenever FA4 is unavailable), turning MTP **on** costs −28.2% at 30 K and −61.1% at 50 K of context — turning it off is 2.57× faster there, which is [vllm#52049](https://github.com/vllm-project/vllm/issues/52049) reproduced. Route the same model to FlashInfer and speculation is a gain again. Same kernel guard, same collapse, different vendor — measured the same day, one GPU, [the annex has the logs](benchmarks/cuda-a100/README.md): ![gemma-4 MTP backend matrix on A100](docs/assets/gemma4-mtp-backend-matrix-a100.svg) **The collapse is a path choice.** Speculative decoding makes every decode step carry two query tokens, and the Triton attention launcher treats anything above one as prefill: decode silently leaves the segmented **3D flash-decoding path** — the one that splits the KV scan across the whole GPU — for the serial **2D path**, 8 workgroups per rank instead of 128. Dashed below is that 2D detour, solid is the 3D path readmitted by [vllm#45450](https://github.com/vllm-project/vllm/pull/45450), which we validated on both vendors the day we found it (bit-exact output on the A100, one-ULP-bounded at the kernel on the Radeons): **8.81 → 32.57 tok/s at 32 K** on this machine, and no depth at which 3D loses. The case file: [45450-validation](benchmarks/cuda-a100/45450-validation/README.md) and [speculative-decoding-on-rdna.md §5–§6](docs/speculative-decoding-on-rdna.md): ![speculative decode on the 2D vs the 3D path](docs/assets/spec-decode-45450-ladder.svg) The attention route and its effect on the cost of speculation are explained in [Speculative decoding](https://cadamcat.github.io/dual-radeon-vllm/articles/speculative-decoding-net-loss.html). ### Want the raw numbers? ```bash cd benchmarks/analyze python3 summarize.py # every configuration, exactly as measured python3 decode_slope.py # cost of one context token, per model python3 analyze.py # TP2/TP1 speed-up, bandwidth utilisation python3 verify_doc_figures.py # recompute what this README and docs/ quote ``` No GPU, no dependencies beyond the standard library. They read [`benchmarks/results.jsonl`](benchmarks/results.jsonl): 309 records — 146 prefill and 146 decode measurements, each with its prompt length, TTFT, decode rate, per-card power and VRAM, plus 17 of engine metadata, run status and notes. That file is the 2026-07-25 campaign; the 2026-08-24 one is [`results-2026-08-24.jsonl`](benchmarks/results-2026-08-24.jsonl), and the separate findings have their own files. What ties them together is [`analyze/verify_doc_figures.py`](benchmarks/analyze/verify_doc_figures.py), which recomputes the headline figures quoted in this README and in `docs/` from whichever file each came from, and exits non-zero if one disagrees. Its inputs are all committed — it fails otherwise — so a fresh clone is enough to run it. The projections, the campaign index and the site are generated from those files and never edited by hand; rebuilding them in a fresh clone leaves nothing for git to report: ```bash (cd benchmarks/analyze && python3 build_ledger.py && python3 build_prefill.py && python3 build_decode.py) python3 benchmarks/analyze/build_campaigns.py python3 site/build.py --check # compares docs/ with its sources, writes nothing git status --short # prints nothing ``` ### How to read this - **Architecture beats parameter count on the August stack.** Its fastest model is the 26B MoE, ahead of the 8B dense by **1.355×** and of the *larger* 31B dense by **2.513×**, both measured in the 2026-08-24 campaign. - **Eager and graph-captured runs are different configurations.** The early `--enforce-eager` runs were recorded as **3.8–7.2×** slower, with asymmetric power and context-independence; their raw output was not retained. The compiled campaign has committed rows. Two wrong conclusions in this repository came from exactly that, including "MoE is mediocre, ~15 tok/s", which was really 107.8. - **What the second card buys depends on the model.** In July, BF16 scales 1.70×; w4a16 only 1.19×, because the quantised model was never bandwidth-bound in the first place. For quantised models the second card mostly buys *capacity*: the 12B's KV pool goes 151 808 → 354 707 tokens, concurrency 4.60× → 10.75×. - **Attention parallelises across two cards at about 90 %**, because it needs no communication: the quadratic coefficient of `T(S) = a + b·S + c·S²` improves 1.83–2.08× from TP=1 to TP=2, reproduced in two campaigns and by a second method. The linear term improves 1.23–1.31×. - **The stack changes the hybrid-SSM result.** The stock July Qwen3.6 arm costs 4.84 µs of decode time per context token, **41× the dense 8B** — a result about that checkpoint and path, which the matched Qwen3.8 A/B and the three-stack chart above take apart. - **The llama.cpp comparison is the Qwen3.6 baseline.** It beats the July stock vLLM arm by 2.1× at 512 tokens (24.89 vs 12.1) and 5.1× at 32 K (21.84 vs 4.2), same two cards and ROCm backend. It does not compare against the newer Qwen3.8 checkpoint on vLLM 0.27. - Bandwidth utilisation at decode: 88 % (8B BF16, single card) down to 38 % (12B w4a16, TP=2). Prefill saturates at ~37 % of FP16 peak. --- ## Beyond the pair The same ladder and the same harness on twelve other machine configurations: the Colab cards of August first, then the rented sweep of September, with the pair on every chart as the line the others are read against. ### One model, five machines **One model, five machine configurations from the August campaigns.** `gemma-4-12B-it` runs on all five — eleven rungs, two rounds a cell, every point chart-grade on every line. The rented sweep is [below](#the-rented-sweep): ![batch-1 decode for one model across five machines](docs/assets/decode-five-machines-gemma4-12b.svg) | | @500 | @32 K | retains | |---|--:|--:|--:| | one A100 80G | 115.0 | 71.3 | 61.9 % | | **2× RX 7900 XT** | **59.9** | **41.4** | **69.2 %** | | one RX 7900 XT | 50.6 | 36.7 | 72.6 % | | one L4 24G | 28.2 | 25.1 | 88.8 % | | one Tesla T4 16G | 20.3 | 9.0 | 44.3 % | Three readings, and the third is the one worth having. **The A100's lead narrows with depth**, 1.92× over the pair at 500 and 1.72× at 32 K — batch-1 decode is bandwidth-bound, and the pair's two 800 GB/s cards against one 2.0 TB/s card is a smaller nominal gap than the price gap suggests. **The second card buys almost nothing here**: 1.18× at 500 falling to 1.13× at 32 K. That is not a defect, it is the model — the 12B fits comfortably on one card, so the second one adds bandwidth the decode step was not waiting on. The single-card against dual-card chart in [The pair, measured](#the-pair-measured) is the same question on a model that *does* need it, where the two arms separate; and on **prefill** the answer is different again — the second card buys 1.2–1.5× on the linear term and 1.9–2.2× on the quadratic, because attention parallelises better than the GEMMs ([benchmarks/README.md](benchmarks/README.md)). **Retention is not ranked the way throughput is.** The T4 is last on both, but it is last on retention by a different mechanism: it is the only card here whose decode more than halves across the ladder, 0.36× of the L4 at 32 K against 0.72× at 500. The L4 is flattest. The throughput order stays the same at both endpoints; the gaps and retention do not. One tok/s number cannot show those differences. The T4 line is dashed because that card cannot serve this model at all without [vllm#39018](https://github.com/vllm-project/vllm/pull/39018) — the engine dies at kernel load asking 98 304 bytes of shared memory against Turing's 65 536. **That patch changes prefill's tile size and nothing else**, so the decode numbers above are not affected by it. Prefill on that card is a different story and does not compare; [its README](benchmarks/cuda-t4/campaign-2026-08-30/README.md) says why, and also why one rung measured on a second VM moves the fitted linear coefficient by 30 %. ### Two Radeons against one A100 **Rewritten 2026-08-31.** This section used to quote four single-run probes on a speculative arm and read a U-shaped gap out of them — 1.48× at 1 K, narrowing to 1.14× at 16 K, widening to 1.87× at the deep end, where it compared the pair at 32 K against the A100 at 30 K — and closed by calling the campaign-grade version future work. That campaign now exists, and **the U-shape does not survive it.** Stock arms, no speculation, eleven rungs, two rounds a cell, every cell chart-grade on both sides: | context | 2× RX 7900 XT | one A100 80G | A100 advantage | |--:|--:|--:|--:| | 500 | 43.16 | 58.51 | **1.36×** | | 2 K | 41.04 | 57.15 | 1.39× | | 8 K | 36.86 | 51.63 | 1.40× | | 16 K | 33.63 | 47.50 | 1.41× | | 32 K | 29.54 | 42.41 | **1.44×** | The gap is **flat at about 1.4×**: narrowest at the shallowest rung, widest at the deepest, and 1.36 to 1.44 across a sixty-four-fold range of context. There is no interior minimum, so there is no U, and the mechanism story the old text told about one — a TP=2 all-reduce floor at the short end, the KV scan at the long one — was explaining a shape the data does not have. What survives is the size of the gap, and it is still smaller than the price difference: batch-1 decode is bandwidth-bound, and two 800 GB/s cards against one 2.0 TB/s card is a 1.27× difference in nominal ceiling against a measured 1.4×. The Radeons reach 63 % of their 800 GB/s on this model. *(Corrected 2026-08-29, and kept through the 2026-08-31 rewrite because it records a figure that was published wrong: this cited 38 %, which is the 12B's utilisation, not this comparison's 31B. Recomputed from `results.jsonl` and the per-GPU bytes/token in [benchmarks.md §3](docs/benchmarks.md), the 31B at TP=2 reaches 62.8 %. All three utilisation figures are pinned by `verify_doc_figures.py`.)* *(And on 2026-09-02 the derivation behind it was measured for the first time — on another machine, because gfx1100's counters read zero under VFIO. On an A100 a decode step reads 81.6 % of the checkpoint on the 12B and 85.6 % on the 31B, not all of it, so a figure of this kind overstates by 17–23 % there. The two factors differ by 4.7 %, so no correction is applied to this number: read it as an upper bound. [The measurement](benchmarks/cuda-a100/campaign-2026-09-02/README.md).)* **The two stacks cannot be matched.** Each arm is stock on the stack its platform actually runs — vLLM 0.23 on the pair, 0.28.0 on the A100 — because gemma-4 does not start on the ROCm 0.27 image: vLLM 0.27's Gemma4 converter reads a global `head_dim` off a transformers config that stores it per layer, and the accessor raises before anything loads ([the traceback](benchmarks/campaign-2026-08-29/logs/G31-tp2-on-027.log); the Quark frame in it only forwards the call). Upstream vLLM fixed that read in [#49797](https://github.com/vllm-project/vllm/pull/49797), which 0.28.0 carries and 0.27.1 does not, so a newer ROCm image should load the model; that has not been measured here. Every other pairing in the data is worse, not better: the 2026-08-29 Radeon arm carries three patches the A100 arm does not. **Speculation inverts the comparison.** MTP at k=3 is worth **+7.9 %** to the pair at 32 K and **−20.1 %** to the A100, so on speculative arms the two machines are level — 0.99× at 2 K, 1.08× at 32 K — and at the shallow end the pair is ahead. Those arms are patch-mismatched (three on the pair against one on the A100) and are read as what each machine does with speculation on rather than as a like-for-like pair. What none of this covers is the territory the A100 wins outright: prefill and batched throughput are compute-bound, where its tensor cores run against RDNA3 WMMA that realises only ~37 % of nominal peak here. The prefill decomposition in [benchmarks.md §4](docs/benchmarks.md#4-prefill-peaks-and-where-the-peak-sits) puts the A100 at 3.3× on the linear term and 6.7× on the quadratic against *one* Radeon for the dense 12B. [One A100 against the pair](https://cadamcat.github.io/dual-radeon-vllm/articles/a100-vs-two-radeons.html) walks through the comparison, including where the software paths differ. ### The rented sweep The same six checkpoints on the rented cards. The document for the sweep is [`benchmarks/cuda-modal/README.md`](benchmarks/cuda-modal/README.md); the four tables it turns on, in one line each: | Finding | Evidence and boundary | |---|---| | **Two controls first** | A Modal A100 and a Modal L4 reproduce Colab's August rows inside 0.07 % and 0.9 %, on those control arms. The other card ratios still include their selected kernels and backends. | | **`mem_busy` predicts, ordinally** | The most memory-bound model gains most from bandwidth and loses most without it, in five settings; a prediction committed before the H200 run got the order right and the magnitude wrong. | | **The newest card is not the fastest card** | A B300 loses to an H100 on the 26B MoE and wins by 66 % on the 8B, at 1.8× the price. | | **NVLink is for the fourth card** | Adding cards three and four costs ×1.22 with NVLink and ×2.71 without; two without cost 20 % over two with. | The interactive site's [Figures 3 and 4](https://cadamcat.github.io/dual-radeon-vllm/#figlong) draw the pair's 2026-09-03 ladder against every rented machine, to 128 000. [Memory-controller activity across machines](https://cadamcat.github.io/dual-radeon-vllm/articles/mem-busy-orders-five-settings.html) explains what the ordering predicts and where it falls short. --- ## What does *not* work These are limits of the measured images and paths; each linked campaign names its version. A result on one of those images is not a claim about every later release. | Item | Status | |---|---| | **FP8 weights/KV** | 🔴 Not available. FP8 is MI300+; RDNA3 has no FP8 path | | **AITER kernels** | 🔴 Gated to `is MI3XX` in vLLM. gfx1100 silently falls back to Triton | | **Tuned fused-MoE configs** | 🔴 vLLM ships none for *any* AMD GPU. MoE runs a generic default | | **Hybrid SSM (Qwen3.5/3.6/3.8)** | 🟡 The stock July Qwen3.6 and August Qwen3.8 rows differ in checkpoint as well as patch, so their retention comparison is not a patch A/B. The [matched 0.27 A/B](benchmarks/hybrid-splitkv-027/) isolates #45916; the [later backend campaign](benchmarks/campaign-2026-09-07/) reaches the long ladder with the same Qwen3.8 checkpoint. Choose the recorded stack and backend, rather than rejecting the architecture. | | **Speculative decoding (MTP)** | 🟡 The unpatched Triton path collapses at long context when speculation selects serial attention. [vllm#45450 validation](benchmarks/cuda-a100/45450-validation/README.md) restores the segmented path on both vendors; the full ladders still show model-dependent gains. Use the [backend and speculation comparison](docs/speculative-decoding-on-rdna.md) for the arm you intend to run. | | **Sliding-window decode on `ROCM_ATTN`** | 🟡 **Measured block-skip patch, 11 lines.** The Triton paged-decode kernel iterates the whole sequence and masks the window away afterwards, so a 1 024-token window at 32 K reads 2 048 blocks where 64 are needed. Skipping them is an identity, not an approximation, worth 2.75× and 3.15× at 32 K on the two windowed models ([the chart](#the-charts-worth-the-scroll)); upstream's own kernel suite passes with no case changing outcome. **The same eleven lines were already proposed as [vllm#49588](https://github.com/vllm-project/vllm/pull/49588) on 2026-07-23 and have sat as a draft since**, so this is a second body of evidence rather than a second PR ([details](docs/sliding-window-block-skip.md)) | | **MoE `torch.compile`** | 🟡 vLLM hardcodes `TORCHINDUCTOR_COMPILE_THREADS=1` in `env_override.py`, unconditionally and on every `import vllm`, so **setting that variable in the environment does not help — it is overwritten**. Inductor's own default would be one thread per core. A 128-expert graph took `init_engine_s` **1569 s** here and `gemma-4-12B` at **TP=2** took **1538 s**; both ran at one core out of eight (corrected 2026-08-29, see [Corrections](#corrections)). Patch the line; `--enforce-eager` avoids the compile at 3.8–7.2× and invents artefacts, see [the article](https://cadamcat.github.io/dual-radeon-vllm/articles/moe-written-off-by-eager.html) | | **Multi-tenant serving** | 🟡 Untested. Everything here is single-stream or light concurrency | | **P2P between cards** | 🔴 Not on this topology. Everything measured is *without* it | | RCCL 2.30.4 | 🟡 Stock works with atomics; the `NDEBUG` rebuild alone does not remove its requirement. The patched-runtime opt-in is a separate tested route, with the hostcall fault boundary stated above. | Background on the SSM and MoE findings, with source-level evidence: **[docs/architecture-notes.md](docs/architecture-notes.md)** --- ## Hardware notes **What decides whether a GPU has atomics?** A PCIe atomic operation must be *completed* by the root complex and *routed* by every switch in between, and `amdgpu` checks exactly that through `pci_enable_atomic_ops_to_root()`: 32- and 64-bit completer support on the root port, AtomicOp routing on each switch port below it. **On bare metal it is the chipset.** Root ports on consumer boards normally do advertise completer support — this project's own X399 host reports `Routing- 32bit+ 64bit+` on all eight, and that passes, since a root port's `Routing` bit refers to peer-to-peer between root ports and is not part of the check. That `Routing-` is consistent with this machine having no GPU P2P at all, which is a separate capability from atomics to system memory; the kernel function says as much in a comment ("no peer-to-peer"). Confirmed on the hardware: before these cards were handed to `vfio-pci`, `amdgpu` bound them on the host across five boots and never reported atomics missing, while in the guest it reports it for both GPUs every time. What breaks these machines is a chipset downstream port that reports `Routing-`: it cuts off every slot behind it, while a CPU-attached slot on the same board is fine. @adderek's B550 in [ROCm#6520](https://github.com/ROCm/legacy-rocm-build/issues/6520) has one GPU of each kind and only the chipset-attached one is affected. **Why does a VM lack them?** QEMU's emulated `pcie-root-port` reports `32bit- 64bit-` **when the device is passed as multifunction**, which is the Proxmox default. Passed as a single function it advertises completer support automatically, and the guest gets atomics — QEMU has done this since 8.1.0. [vfio-atomics.md](docs/vfio-atomics.md) has the A/B. **This machine changed sides on 2026-08-23 at 14:17 UTC.** Everything measured before that, including the 2026-07-25 campaign, ran multifunction and without AtomicOps; the 2026-08-24 campaign, the loader work and the sliding-window measurements ran single-function and with them. Later hostcall campaigns deliberately toggled that capability again and record each state in their rows. **Do I need atomics for inference?** No. They are a precondition for *hostcall*, which is a debug facility (device `printf`/`assert`), and AMD's own ROCm 7.1.1 build shipped with zero hostcall. The runtime cost of removing it was **measured on 2026-09-04**: free at the batch-1 decode shape and end to end, 2.7–4.6 % of all-reduce latency from 16 KB to 512 KB, nothing from 2 MB up — see [the ±NDEBUG A/B](benchmarks/rccl-ndebug-ab-2026-09-04/README.md). **Two identical cards?** Strongly preferred. Mixed cards are limited by the smaller/slower one, and layer-splitting makes the older card the thermal hotspot. **Thermals — do not skip this.** Two cards in adjacent slots: the upper one inhales the lower one's exhaust. We measured **junction 99–100 °C** on the upper card at sustained load. One 120 mm fan aimed at the gap between the cards dropped it to **90 °C** and *inverted* which card runs hotter — while its own fan spun **slower**. Cheapest fix in the entire build. **Slow host CPU?** It shows up at startup, not at decode: `torch.compile` is CPU-bound and vLLM pins it to one thread. **Weight loading is far slower than your disk, and the kernel decides how much.** The disk sustains 1.5 GB/s; vLLM loads checkpoints at 30–76 MiB/s. The mapping is the cause: safetensors' PyTorch path maps the checkpoint **writable**, and a ROCm host→device copy from such a mapping breaks copy-on-write on every resident page — catastrophic on kernel `7.0.0-28` (2.0 MiB/s), a 4–8× tax everywhere else. Upgrading the kernel removes the catastrophe. For the rest: [vllm#49991](https://github.com/vllm-project/vllm/pull/49991)'s clone flag is worth 1.5–2.0× while the checkpoint fits in RAM and 7.5× when it does not; `safe_open(..., backend="pread")` holds the least memory; and `--safetensors-load-strategy eager` peaks at about twice the shard, which is how a 21.67 GiB single-shard checkpoint stops fitting on a 23.4 GiB host. All of it is measured, four load paths across four checkpoints, in [`loader-flag-kernel-30.json`](benchmarks/loader-flag-kernel-30.json); the full chain — including what was disproven on the way — is [open-questions.md §8](docs/open-questions.md). **RAM ceiling.** vLLM `mmap`s the whole checkpoint, and the limit is `MemTotal` rather than free memory. A 21.67 GiB file would not map into the 21.43 GiB this guest had when that was first hit; the fix was to raise the VM's RAM, which is now 23.40 GiB with 8 GiB of swap, and that checkpoint loads. Size for the ceiling rather than expecting to hit it. [Weight loading and the kernel regression](https://cadamcat.github.io/dual-radeon-vllm/articles/weight-loading-19x.html) follows the kernel, mapping and memory-capacity experiments together. --- ## Repository map ``` diagnose/ Start here. Dependency-free probes hipgate3.cpp ★ plain kernel vs hostcall kernel — decisive, 57 lines check-platform.sh one-shot triage: dmesg + bridge chain + hostcall count ar.py 30-second torchrun all_reduce reproducer sweep.sh 11 env-var combinations that do NOT help logs/ AMD_LOG_LEVEL=4 capture at the moment of failure build/ Rebuild RCCL without hostcall, and verify it verify-nohostcall.sh hostcall / assert / fprintf must all be 0 check-symbols.sh all 38 nccl symbols PyTorch needs deploy/ Inject into a ROCm/vLLM container (3 pieces, all required) benchmarks/ The measurement data and everything that produced it results-2026-08-24.jsonl 372 measurements on the patched container, same ladder, six of the nine configurations rerun as controls results.jsonl ★ the 2026-07-25 campaign: 292 measurements, one record per request; the source of that day's tables and charts. The cross-machine data is prefill.jsonl, decode.jsonl and CAMPAIGNS.md, the generated index of every campaign analyze/ turn that into the tables and charts; no GPU needed bench_runner.py the campaign runner: serial, checkpointed, VRAM-safe harness/ one telemetry shape for every machine, and the schema every campaign from 2026-09-02 writes: clocks, power, temperature and memory-controller busy beside each cell, so a slow kernel and a throttled card stop looking alike. `preflight_host_link.sh` reads the host's PCIe root ports before a Radeon campaign and refuses below x16 CAMPAIGNS.md ★ every campaign directory, generated from the READMEs (the entries that used to be listed here, and the thirty that were not) prompts/ rebuild the prompt ladders from Gutenberg #1228, and check them against the counts that were actually measured repro-mmap-prot.py host→device copy from a writable mapping; kernel-sensitive repro-mmap-prot.hip.cpp the same case in plain HIP, for machines with no PyTorch — a hypervisor host, a rescue image, a bare ROCm install cuda-*/ the rented and granted CUDA cards, one directory per card; cuda-modal/README.md is the 2026-09-03 sweep ledger.jsonl ★ the Radeon box's decode projection, one row per (configuration, rung), with the stack and patch list of every point. Built and gated by analyze/build_ledger.py prefill.jsonl every prefill point across machines, with the a/b/c fit decode.jsonl the same for decode, and it reconciles against the ledger wherever both cover a cell — two files projecting the same rows is how a repository grows two answers to one question patches/ Downstream changes to the installed vLLM, so the numbers above can be reproduced. None is a recommendation to run in production sliding-window-block-skip.patch start the paged-decode loop at the window wintest.py the before/after timing harness for it. It also records token ids, which turned out not to be a correctness test here: greedy decoding is irreproducible on this machine with the patch absent adapt-muse-glimmer.py back-adapt upstream's model file to a vLLM that predates the model docs/ benchmarks.md ★ the five-model study, with all four charts root-cause.md the RCCL bug: evidence chain and 13 tested hypotheses vfio-atomics.md the bug in a VM is one line of VM configuration: the single-function passthrough A/B open-questions.md what we have NOT proven — including one root cause we published, disproved ourselves, and rewrote architecture-notes.md why MoE, dense and hybrid-SSM behave so differently here hybrid-decode-on-rdna.md why the hybrid-SSM model collapses at long context — kernel-level profile, and the wrong answer it replaced sliding-window-block-skip.md the paged-decode kernel reads the whole sequence and masks the window away; 11 lines, 2.75-3.15× at 32K on two models, why gemma-3 pays it and gemma-4 does not, and the correctness argument we had to withdraw and replace speculative-decoding-on-rdna.md speculation on RDNA3: the 2D/3D attention path it selects, and the check on both vendors depth-cost-cross-machine.md the retention and depth-cost rankings recomputed across the measured machines, and how they move with repeats and the definition of cost deploy-vllm.md step-by-step deployment diagnosis.md is this your bug? assets/ every chart above and in docs/, as standalone SVG; the repository cover as cover.svg and its 1280×640 cover.png ``` **Reported upstream:** the RCCL root cause is [ROCm/ROCm#6520](https://github.com/ROCm/legacy-rocm-build/issues/6520), with a pointer on [#6074](https://github.com/ROCm/legacy-rocm-build/issues/6074). The passthrough caveat behind it went to `pve-devel` on 2026-08-24 as a two-patch `pve-docs` series and is at [v3](https://lore.proxmox.com/all/20260831130752.37364-1-Xy2462381442@gmail.com/) as a single patch after review. The hybrid attention evidence is linked from [hybrid-decode-on-rdna.md](docs/hybrid-decode-on-rdna.md), including the #45916 A/B; the GQA-gate performance and gsm8k records are linked above. **If you only open one file:** [`docs/benchmarks.md`](docs/benchmarks.md) if you came for numbers, [`docs/root-cause.md`](docs/root-cause.md) if you came for the bug. --- ## Corrections Every correction this page has carried stays on it. The bullets above now state what holds; what they used to say, and what changed it, is here. **gemma-4 on the 0.27 image, corrected 2026-09-09.** This page, three campaign READMEs and two articles said the image's Quark plugin reads `head_dim` off gemma-4's heterogeneous config and dies before loading. The [committed traceback](benchmarks/campaign-2026-08-29/logs/G31-tp2-on-027.log) shows vLLM's own Gemma4 converter performing the read and transformers' per-layer accessor raising; the Quark frame forwards the call unchanged. Upstream fixed the read in vLLM [#49797](https://github.com/vllm-project/vllm/pull/49797), present in 0.28.0 and absent from 0.27.1. Whether a newer ROCm image serves the model is not measured. **Source audit, corrected 2026-09-08.** The earlier four-entry Vulkan/MTP summary had no corresponding rows in the committed llama.cpp records located during this audit. It is replaced by the recorded Qwen3.6 ROCm/Vulkan depth sweep. The 12B second-card ratio in the August headline and table is 1.18×; 1.19× belongs to July. The eager comparison now identifies its missing raw output. **Stack scope, corrected 2026-09-08.** The long-context advice still told readers to avoid hybrid SSM and disable MTP, after the matched attention A/Bs had measured their repairs. The limitations table now points to those paths. The July Qwen3.6 versus August Qwen3.8 comparison changes checkpoint as well as patch; it cannot isolate a patch effect. The five-machine chart's prose also claimed its throughput order changed with depth; its rows keep the same order at both endpoints. The RCCL rebuild warning now distinguishes a failed rebuild from stock operation with atomics and the separate runtime opt-in without them. **Under *Architecture beats parameter count*.** *(Corrected 2026-08-27: this used to read "the slowest is a 27B, beaten 3.6× by a larger 31B dense". That comparison is confounded — the 27B's checkpoint is asymmetric int4 and misses the native W4A16 kernel, worth up to 3.24× on its own, see [w4a16-symmetry](benchmarks/w4a16-symmetry/). The MoE-over-dense result is not confounded: every model in it is on its best kernel path.)* **Under *What the second card buys depends on the model*.** *(2026-09-02: **measured, on the memory controller.** One sitting, both models, both topologies: the 8B's single card runs at **90 % `mem_busy`** and the 12B's at **56 %**, and across five cells the second card's gain follows that number and nothing else in the row. So "never bandwidth-bound in the first place" is no longer an inference from the scaling it explains ([data](benchmarks/campaign-2026-09-02d/)). Two other candidates are out with counters: the collective, which both models pay within 0.6 ms of each other per step, and the power cap — both TP=1 arms sit at 52 % of it.)* **Under *Attention parallelises across two cards at about 90 %*.** ~~Below ~1 K prompt tokens, one card prefills faster than two (3460 vs 2270 tok/s at 512): TP adds a ~76 ms per-request communication floor, 72 all-reduces at ~1.05 ms each.~~ **Withdrawn 2026-08-30.** Both halves rested on the fitted intercept `a`, which does not survive re-measurement — the same configurations give +76 ms in one campaign and +1.6 ms in the next, and one fit returns a fixed cost below zero. `b` and `c` reproduce to a few percent; `a` and the peak position do not ([details](docs/benchmarks.md#4-prefill-peaks-and-where-the-peak-sits)). **The collective has since been timed** — 16.6–21.5 µs at the batch-1 shape, 1.22 ms across the 8B's 73 of them, so the withdrawn 1.05 ms *each* was 49 to 63 times the measurement ([`benchmarks/allreduce-2026-09-02/`](benchmarks/allreduce-2026-09-02/)). **The crossover is still unmeasured**, and the reading offered for it here until 2026-09-02 — a first-request cost, round 1 slow — is wrong on this box: five rounds of that cell, twice, put round 1 *fastest* in three of the four arm-by-sitting combinations, and the spread tracks the clock the card had reached, not the request number ([`campaign-2026-09-02b/`](benchmarks/campaign-2026-09-02b/)). A 500-token cell here carries roughly 15 % of noise however many rounds you give it, and the three sittings that have measured it split 2:1 for the pair being ahead. **Under *MoE `torch.compile`* in the limits table.** *(Corrected 2026-08-29: the row said "26 min" and "TP=1 took 24". The 12B's long start is at TP=2 — its TP=1 starts were 59.67 s and 33.36 s — and `init_engine_s` bounds the compile rather than measuring it.)* **Under *A fix*, *Am I hit by the RCCL bug* and the repository map.** *(Corrected 2026-09-05: all three called `diagnose/hipgate3.cpp` a "30-line reproducer". It is 57 lines by `wc -l` — 54 non-blank, 39 excluding comments — and its first commit was 35 lines before it reached 57 on 2026-07-26, so thirty was never the count. [docs/root-cause.md](docs/root-cause.md) and the published article carry the same correction.)* --- ## Credits and licence Original investigation on a home Proxmox server with dual RX 7900 XT. Probes, build scripts, deployment glue and documentation are original work, released under the **MIT Licence** ([LICENSE](LICENSE)). **This repository contains no RCCL source code** — only a build recipe and diagnostics. A *compiled* RCCL produced by these scripts is a derivative work of RCCL and carries its BSD-3-Clause obligations; see [NOTICE.md](NOTICE.md). RCCL is © Advanced Micro Devices, Inc., portions © NVIDIA CORPORATION, BSD-3-Clause. Not affiliated with, endorsed by, or supported by AMD.