[GH-ISSUE #2062] strata_bench.py mislabels mixed-GPU hosts and single-GPU runs on multi-GPU hosts #825

Closed
opened 2026-11-04 01:46:15 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @MinhHaDuong on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2062

tools/strata_bench.py (v0.1.43) labels the hardware wrong on a host with two different GPUs. The measurements themselves are fine.

Setup: Linux, an RTX A4000 (nvidia-smi index 0) and an RTX 5070 Ti (index 1), driver 580.159.04, CUDA 13.0, Qwen3.8-Flash-Next IQ3_S. Two configs, both run with python tools/strata_bench.py --config <cfg> --think --runs 2:

  • solo: "gpu": [1]. The server runs on the 5070 Ti only (per-GPU memory: 14.1 GB on the 5070 Ti, the A4000 idle).
  • helper: the 5070 Ti with the A4000 as expert helper (--expert-cache-device1 --remote-expert-opt).

What the report says, for both runs:

  • folder 2026-10-12-community-2x-rtx-a4000-qwen3-8-flash-next-iq3-s: two A4000s, which neither run had;
  • title Community benchmark on NVIDIA RTX A4000 + NVIDIA GeForce RTX 5070 Ti and GPU and VRAM: ... 32 GiB VRAM, even for the solo run that used one 16 GB card.

Cause, as far as I can read it:

  1. gpu_slug() slugs names[0] and prefixes len(names)x-, so mixed cards collapse into N copies of the first one.
  2. gpu_names comes from gpu_info_local(), which lists every GPU of the host (nvidia-smi), not the GPUs the server was started on (the config's gpu list or --gpu).

Expected: the GPUs the server actually used, named one by one when they differ, e.g. rtx-5070-ti for the solo run and rtx-5070-ti-plus-rtx-a4000 for the helper run.

This matters for the shared format proposed in #713: a mixed-GPU or partial-GPU report would be filed under the wrong hardware.

Originally created by @MinhHaDuong on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2062 `tools/strata_bench.py` (v0.1.43) labels the hardware wrong on a host with two different GPUs. The measurements themselves are fine. **Setup:** Linux, an RTX A4000 (nvidia-smi index 0) and an RTX 5070 Ti (index 1), driver 580.159.04, CUDA 13.0, Qwen3.8-Flash-Next IQ3_S. Two configs, both run with `python tools/strata_bench.py --config <cfg> --think --runs 2`: - solo: `"gpu": [1]`. The server runs on the 5070 Ti only (per-GPU memory: 14.1 GB on the 5070 Ti, the A4000 idle). - helper: the 5070 Ti with the A4000 as expert helper (`--expert-cache-device1 --remote-expert-opt`). **What the report says, for both runs:** - folder `2026-10-12-community-2x-rtx-a4000-qwen3-8-flash-next-iq3-s`: two A4000s, which neither run had; - title `Community benchmark on NVIDIA RTX A4000 + NVIDIA GeForce RTX 5070 Ti` and `GPU and VRAM: ... 32 GiB VRAM`, even for the solo run that used one 16 GB card. **Cause, as far as I can read it:** 1. `gpu_slug()` slugs `names[0]` and prefixes `len(names)x-`, so mixed cards collapse into N copies of the first one. 2. `gpu_names` comes from `gpu_info_local()`, which lists every GPU of the host (nvidia-smi), not the GPUs the server was started on (the config's `gpu` list or `--gpu`). **Expected:** the GPUs the server actually used, named one by one when they differ, e.g. `rtx-5070-ti` for the solo run and `rtx-5070-ti-plus-rtx-a4000` for the helper run. This matters for the shared format proposed in #713: a mixed-GPU or partial-GPU report would be filed under the wrong hardware.
Author
Owner

@mmbeanz commented on GitHub (Oct 12, 2026):

Confirmed on a different mixed host (RTX 5060 Ti 16 GB + RTX 3060 12 GB, Linux, engine 7695859a = v0.1.43), plus two adjacent problems with the same "the report's hardware section lies" theme:

  1. gpu_slug() drops the second card. f"{len(names)}x-{s}" with s from names[0] only: an on-box run on this pair names the folder 2x-rtx-5060-ti-... and silently loses the 3060. (Run remotely with no local nvidia-smi, it instead used the server's combined gpu_name string and named the folder correctly by accident.)
  2. --url mode blends client and server fields in collect_machine(). GPU name, CPU and commit come from the server (correct), but ram_gib, os, gpu_driver and cuda come from the client. Our remote runs recorded ram_gib: 3.8 (the client VM), gpu_driver: null, cuda: null — on a 64 GB box with driver 615.71.09. Anyone benching over the LAN gets a fabricated machine block.
  3. The generated README cites engine-log-excerpt.txt in --url mode, where no such file is written.

Workaround we used: hand-write the Hardware section from nvidia-smi, lspci -vv under load, dmidecode and nvcc, and say so in the report (the auto block is marked unusable in ours). Our published results.json machine blocks are hand-corrected with the original wrong values listed in NOTES.md, so the tool bug stays visible in the artifacts: #2083.

Drafted with AI assistance; I reviewed every line and ran the measurements myself.

<!-- gh-comment-id:6121541475 --> @mmbeanz commented on GitHub (Oct 12, 2026): Confirmed on a different mixed host (RTX 5060 Ti 16 GB + RTX 3060 12 GB, Linux, engine `7695859a` = v0.1.43), plus two adjacent problems with the same "the report's hardware section lies" theme: 1. **`gpu_slug()` drops the second card.** `f"{len(names)}x-{s}"` with `s` from `names[0]` only: an on-box run on this pair names the folder `2x-rtx-5060-ti-...` and silently loses the 3060. (Run remotely with no local `nvidia-smi`, it instead used the server's combined `gpu_name` string and named the folder correctly by accident.) 2. **`--url` mode blends client and server fields in `collect_machine()`.** GPU name, CPU and commit come from the server (correct), but `ram_gib`, `os`, `gpu_driver` and `cuda` come from the **client**. Our remote runs recorded `ram_gib: 3.8` (the client VM), `gpu_driver: null`, `cuda: null` — on a 64 GB box with driver 615.71.09. Anyone benching over the LAN gets a fabricated machine block. 3. **The generated README cites `engine-log-excerpt.txt` in `--url` mode, where no such file is written.** Workaround we used: hand-write the Hardware section from `nvidia-smi`, `lspci -vv` under load, `dmidecode` and `nvcc`, and say so in the report (the auto block is marked unusable in ours). Our published `results.json` machine blocks are hand-corrected with the original wrong values listed in `NOTES.md`, so the tool bug stays visible in the artifacts: #2083. *Drafted with AI assistance; I reviewed every line and ran the measurements myself.*
Author
Owner

@Niko1221 commented on GitHub (Oct 12, 2026):

Both causes are right. The part about listing only the cards the server was started on was already fixed after 0.1.43 (#1985: the bench reads the config's gpu list or --gpu), so your solo run with "gpu": [1] will name the 5070 Ti alone on the next build. The folder and title part is fixed now: the slug names mixed cards one by one in the order they are listed (rtx-5070-ti-plus-rtx-a4000), and only identical cards get the Nx- form (2x-rtx-a4000). What the bench cannot see is a helper card: an --expert-cache-device1 helper is not in the config's gpu list, so the helper run would still name only the 5070 Ti. Can you paste the helper config's gpu value and its --expert-cache-device1 line (without keys) so I can check which number the helper uses and whether the bench can add that card to the report? I will leave this open for that.

<!-- gh-comment-id:6129343890 --> @Niko1221 commented on GitHub (Oct 12, 2026): Both causes are right. The part about listing only the cards the server was started on was already fixed after 0.1.43 (#1985: the bench reads the config's `gpu` list or `--gpu`), so your solo run with `"gpu": [1]` will name the 5070 Ti alone on the next build. The folder and title part is fixed now: the slug names mixed cards one by one in the order they are listed (`rtx-5070-ti-plus-rtx-a4000`), and only identical cards get the `Nx-` form (`2x-rtx-a4000`). What the bench cannot see is a helper card: an `--expert-cache-device1` helper is not in the config's `gpu` list, so the helper run would still name only the 5070 Ti. Can you paste the helper config's `gpu` value and its `--expert-cache-device1` line (without keys) so I can check which number the helper uses and whether the bench can add that card to the report? I will leave this open for that.
Author
Owner

@MinhHaDuong commented on GitHub (Oct 13, 2026):

Thanks. Here are the relevant fields from our v0.1.43 helper config (no keys):

{
  "gpu_order": "as_given",
  "args": ["...", "--expert-cache-device1", "auto", "--remote-expert-opt"]
}

The gpu key is absent in the helper config (not [1]). In the solo config it is "gpu": [1]. We do not set CUDA_VISIBLE_DEVICES in the helper launch; with no gpu key, the server's child_env() does not add it either.

nvidia-smi indices on this host are 0 = RTX A4000 (16 GB), 1 = RTX 5070 Ti (16 GB). The helper engine log says:

strata generate: GPU 0: NVIDIA GeForce RTX 5070 Ti, compute capability 12.0
strata generate: CUDA1: 7775 additional experts, 14.70 GiB; results return through pinned host rows

So the engine's CUDA0/main is the 5070 Ti and CUDA1/helper is the A4000; these are not the nvidia-smi indices. The actual helper argument is --expert-cache-device1 auto, not an explicit card number.

I also checked the benchmark fix in a disposable branch at upstream a0116b2 (which includes 905a605, #2062), keeping our installed engine unchanged:

  • All 17 tools/test_strata_bench.py tests pass.
  • A before/after check using our real config files and mocked hardware/API responses reproduces v0.1.43's incorrect 2x-rtx-a4000 / 32 GiB solo report. The new code reports rtx-5070-ti / 16 GiB.
  • The mixed-name slug is now rtx-5070-ti-plus-rtx-a4000.
  • As you noted, the helper config still reports only the 5070 Ti / 16 GiB in this check.

This validates the report-selection/naming code, not GPU performance or a rebuilt engine. No new GPU benchmark was run.

<!-- gh-comment-id:6141355417 --> @MinhHaDuong commented on GitHub (Oct 13, 2026): Thanks. Here are the relevant fields from our v0.1.43 helper config (no keys): ```json { "gpu_order": "as_given", "args": ["...", "--expert-cache-device1", "auto", "--remote-expert-opt"] } ``` The `gpu` key is **absent** in the helper config (not `[1]`). In the solo config it is `"gpu": [1]`. We do not set `CUDA_VISIBLE_DEVICES` in the helper launch; with no `gpu` key, the server's `child_env()` does not add it either. `nvidia-smi` indices on this host are 0 = RTX A4000 (16 GB), 1 = RTX 5070 Ti (16 GB). The helper engine log says: ```text strata generate: GPU 0: NVIDIA GeForce RTX 5070 Ti, compute capability 12.0 strata generate: CUDA1: 7775 additional experts, 14.70 GiB; results return through pinned host rows ``` So the engine's CUDA0/main is the 5070 Ti and CUDA1/helper is the A4000; these are not the `nvidia-smi` indices. The actual helper argument is `--expert-cache-device1 auto`, not an explicit card number. I also checked the benchmark fix in a disposable branch at upstream `a0116b2` (which includes `905a605`, #2062), keeping our installed engine unchanged: - All 17 `tools/test_strata_bench.py` tests pass. - A before/after check using our real config files and mocked hardware/API responses reproduces v0.1.43's incorrect `2x-rtx-a4000` / 32 GiB solo report. The new code reports `rtx-5070-ti` / 16 GiB. - The mixed-name slug is now `rtx-5070-ti-plus-rtx-a4000`. - As you noted, the helper config still reports only the 5070 Ti / 16 GiB in this check. This validates the report-selection/naming code, not GPU performance or a rebuilt engine. No new GPU benchmark was run.
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for the report. This is fixed in 0.2.0-beta (or an earlier release), and we're closing it as part of the tracker reset for 0.2.0-beta.

If it still happens on 0.2.0-beta, add the area prefix to the title ([Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]), put the Strata version and your hardware in the issue form fields, and comment /reopen. A check runs and reopens it.

<!-- gh-comment-id:6270772654 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for the report. This is fixed in 0.2.0-beta (or an earlier release), and we're closing it as part of the tracker reset for 0.2.0-beta. If it still happens on 0.2.0-beta, add the area prefix to the title ([Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]), put the Strata version and your hardware in the issue form fields, and comment `/reopen`. A check runs and reopens it.
Sign in to join this conversation.
No milestone
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.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#825
No description provided.