Multi-GPU recipes and mixed setups
ci / check (push) Successful in 11s

Several of one GPU: <gpu>/<model>/<N>x-<engine>-<profile>.md with gpus,
tp and pp (tp × pp = gpus) and a declared PCIe topology. Different GPUs:
mixed/<setup>/, named after its cards, with the same layout as a GPU
folder and a generated mixed/README.md. Runs must sit in their recipe's
setup folder. Energy, and bandwidth for pipeline parallel or mixed, are
left out where bench-standard measures one GPU only; docs/
bench-standard-gaps.md lists those gaps for the benchmarks repo. The
wanted lists take the fewest of one GPU a model fits in.

Demo: 2x Arc B580 with vLLM TP 2 and llama.cpp layer split for
Qwen3.8-27B, -sm row as what lost, and Arc Pro B60 + Arc B580 mixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-29 18:59:51 +01:00
1 parent 753bdadf7a
commit 976a8b40e5
59 files changed
+39381 -119

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
# bench-standard gaps for multi-GPU runs
What bench-standard 0.5.0 doesn't record well when a server uses more than one GPU, and
how the cookbook works around it. Each section is written to be filed as an issue on
[benchmarks](https://git.linxweiler.xyz/miga/benchmarks/issues). The cookbook doesn't
change that repo.
## 1. `gpu_count` counts every GPU in the machine
**Now:** `collect-env.sh` counts all devices `xpu-smi` lists. A 2-GPU server on a 3-GPU
machine records `gpu_count=3`, and the `gpu` note says `3x ...`.
**Wanted:** count the devices the server uses: `ZE_AFFINITY_MASK` /
`ONEAPI_DEVICE_SELECTOR` from the launch command, or the engine's own device log.
**Cookbook meanwhile:** takes the count from `tp × pp` and ignores `gpu_count`.
## 2. PCIe link and ReBAR of the first GPU only
**Now:** `gpu_bdf` is the first device, and `pcie_link`, `pcie_max` and `rebar` describe it alone.
**Wanted:** one entry per GPU used, e.g. `pcie=Gen4 x8 · Gen4 x4 (chipset)`. With tensor
parallelism over PCIe, the slowest link decides the result.
**Cookbook meanwhile:** recipes declare `topology`, one link per GPU; submitters add it
in `--special-notes`.
## 3. No interconnect information
**Now:** nothing about how GPUs talk to each other.
**Wanted:** a note on the collective transport (oneCCL settings from the env flags,
whether P2P over PCIe is used or traffic goes through host memory).
**Cookbook meanwhile:** recipes describe it under Pitfalls.
## 4. Bandwidth share ignores pipeline parallel and mixed GPUs
**Now:** `postrun.py` multiplies the bandwidth by `tp` and the weights by `tp` (vLLM's
per-worker figure). With `pp > 1`, or with two different cards, the share is wrong.
**Wanted:** scale by the GPUs used, with each GPU's own bandwidth; for pipeline parallel,
decode reads each stage's weights in turn, so the reference is the per-stage sum of time,
not the sum of bandwidth.
**Cookbook meanwhile:** shows the bandwidth share only for tensor parallel over equal GPUs.
## 5. Power and energy of one GPU
**Now:** `gpu-power.sh` samples one device, so J/token for a 2-GPU run counts half the power.
**Wanted:** sample every GPU used and sum.
**Cookbook meanwhile:** leaves energy out of every multi-GPU recipe.
## 6. A standard model that needs more than one card
The standard models (9B, 27B) fit one 24–32 GB card, so multi-GPU only matters on the
10–16 GB cards. A larger model, like a 70B-class dense model or a big MoE, would make
multi-GPU recipes on the B60, B65 and B70 meaningful. It has to go into the standard
models table first.
+18 -1
View File
@@ -49,7 +49,24 @@ sudo xpu-smi config -d 0 --powerlimit 200
The power limit changes prefill and concurrency numbers. bench.sh records it. If you
change it, say so in the result (`--special-notes`).
## 5. Models
## 5. Several GPUs
- **Lanes:** every card should hang off the CPU, not the chipset. A second x16 slot is
often x4 through the chipset, and tensor parallelism sends activations over PCIe after
every layer. Check each card:
```sh
for d in $(lspci -D | awk '/VGA.*Intel/ {print $1}'); do
echo "$d $(sudo lspci -vv -s $d | grep -o 'LnkSta: Speed [^,]*, Width x[0-9]*')"; done
```
- **Device order:** `xpu-smi discovery` lists the Level Zero numbering. `ZE_AFFINITY_MASK`
picks and orders the cards a container sees. Splits like llama.cpp's `-ts 2,1` follow
that order.
- **What bench.sh misses:** it records PCIe, ReBAR and power of the first GPU only. Write
the others into `--special-notes`, and the links into the recipe's `topology`.
## 6. Models
The recipes mount `/models` into the container. Download the standard files there,
as each recipe shows, and check the hash: bench.sh rejects any other file.
+30 -3
View File
@@ -1,7 +1,13 @@
# Recipes
One file per exact setup: `<gpu>/<model>/<engine>-<profile>.md`, every part slugged
the way bench.sh names result folders (`Arc Pro B65` → `arc-pro-b65`).
One file per exact setup, every part slugged the way bench.sh names result folders
(`Arc Pro B65` → `arc-pro-b65`):
| setup | file |
|---|---|
| one GPU | `<gpu>/<model>/<engine>-<profile>.md` |
| N of the same GPU | `<gpu>/<model>/<N>x-<engine>-<profile>.md` |
| different GPUs | `mixed/<setup>/<model>/<engine>-<profile>.md`, the setup named `<N>x-<gpu>_<N>x-<gpu>` in name order, e.g. `1x-arc-b580_1x-arc-pro-b60` |
`tools/cookbook.py validate` rejects a file whose path doesn't match its front matter.
## Front matter
@@ -22,6 +28,7 @@ spec = "mtp:5" # as declared to bench.sh
thinking = "default" # as declared to bench.sh
tp = 1 # optional, default 1
pp = 1 # optional, default 1
gpus = 1 # optional, default 1; must be tp × pp
results = [ # result folders in <gpu>/results/, --full runs only
"261022_pascal_qwen3.8-27b_vllm_1x-arc-pro-b65",
]
@@ -32,6 +39,24 @@ The first result is the reference run. More results are reproductions. When thei
headline metric is within `agree_pct` of the first run (5%, `cookbook.toml`) and they
come from two or more submitters, the recipe is **verified**.
## Several GPUs
```toml
gpu = "Arc B580" # N of the same GPU ...
gpus = 2
tp = 2 # tp × pp = gpus
topology = ["Gen4 x8 CPU", "Gen4 x8 CPU"] # required: PCIe link of each GPU, and what it hangs off
gpu = ["Arc Pro B60", "Arc B580"] # ... or different GPUs: one name per card
topology = ["Gen5 x8 CPU", "Gen4 x8 CPU"] # in the same order
```
bench.sh reads PCIe, power and bandwidth from one GPU only, and counts every GPU in the
machine. So the cookbook takes the GPU count from `tp × pp`, needs `topology` declared, and
leaves energy (and, for pipeline parallel or mixed setups, bandwidth) out. Declare: vLLM
`--tensor-parallel-size N` → `tp = N`; llama.cpp `-sm layer` → `pp = N`, `-sm row` → `tp = N`.
See [bench-standard gaps](bench-standard-gaps.md).
## Body
````markdown
@@ -73,7 +98,9 @@ reproduce. Never type numbers into a recipe by hand.
- every cited result exists, is a `--full` run of an accepted bench-standard version,
on the standard model file
- `quant`, `kv`, `spec`, `thinking`, `tp`, `pp`, GPU and engine match what the run
declared and detected
declared and detected; `tp × pp` is the GPU count, and the runs sit in the recipe's
own folder's `results/`
- several GPUs: `topology` lists one link per GPU; mixed setups name two or more different GPUs
- the first `sh` block under `## Launch` is word for word the `server-cmd.txt` of every
cited run (line breaks, spacing and comments don't count; secrets are redacted the
way bench.sh does it)
+3 -2
View File
@@ -1,8 +1,9 @@
# Results
Result folders exactly as [bench-standard](https://git.linxweiler.xyz/miga/benchmarks)'s
`bench.sh` writes them, in the folder of the GPU they ran on:
`<gpu>/results/<YYMMDD>_<submitter>_<model>_<engine>_<N>x-<gpu>[_quick][_N]/`.
`bench.sh` writes them, in the folder of the setup they ran on:
`<gpu>/results/<run>/`, or `mixed/<setup>/results/<run>/` for different GPUs. bench.sh names
a run `<YYMMDD>_<submitter>_<model>_<engine>_<N>x-<gpu>[_quick][_N]`.
| file | what |
|---|---|
+3
View File
@@ -22,6 +22,9 @@ note = "optional: why it lost"
<!-- /cookbook:tried -->
```
For a mixed setup the file is `mixed/<setup>/<model>/tried.md` and `gpu` is the list of
cards, as in its recipes. One `tried.md` covers every GPU count of a model.
- Change **one thing** per entry, against the recipe's launch command.
- Quick runs are fine here: they show a direction. A variant that wins needs a
`--full` run and becomes the new recipe, and the old recipe's run goes in here.