改动 / #3630
#3630 [Benchmark] bench.sh: name the AMD card on ROCm 7+, where only amd-smi exists
open · @l33tm4st3r · 0 评论 · 去 GitHub 看
BenchmarksAMD / HIPModels & quantsDocumentationWindowsLinux
说明
## Problem and result The quick speed check (`bench.sh` / `tools/strata_bench.py`) has its own GPU probe, separate from `strata_cli/bench_facts.py`. It tries `nvidia-smi` and, when that is missing, `rocm-smi`. ROCm 7 and newer ship `amd-smi` and no `rocm-smi`, so on a Radeon box it reads no card at all and falls back to the engine's own vendor stub: the report said `GPU and VRAM: AMD Radeon` and the results folder was `...-community-unknown-...`, with `GPU driver: not read`. After this change, the same run on the machine below writes `AMD Radeon AI PRO R9700`, its 32 GiB and the amdgpu driver version, and the folder is `...-community-ai-pro-r9700-...`. Measured on: Ryzen 9 9950X3D, Radeon AI PRO R9700 (gfx1201), ROCm 10.1, Linux, Strata 0.2.2 / engine 0.1.47, `011c9e60`. ## Approach The same probe #3519 added to `bench_facts.py`, kept in the shape this file already uses (`name` / `vram_mib` / `driver`): `amd-smi static --asic` for the marketing name, `static --driver` for the kernel driver version, the PCI address from `amd-smi list --json`, and the VRAM size from that address's sysfs `mem_info_vram_total`. It only runs when neither `nvidia-smi` nor `rocm-smi` gave anything, and not on Windows (the registry path stays). One extra guard: the engine's `gpu_name` stub is the vendor alone (`AMD Radeon`), and #2001 takes a server name the local probe does not list as the right one. With a real name now read, that stub would have replaced it, so a bare vendor word is no longer treated as a card name. ## Validation - Passed: `tests/terminal/test_bench_community_amd.py`, 3 new tests, with the real `amd-smi` answers from this card (two cards: dGPU with driver `N/A` and the Ryzen iGPU). They check the names, the VRAM in MiB, the driver picking, the folder slug and that the stub does not replace the card. - Passed: the community suite end to end on this machine - folder `2026-10-21-community-ai-pro-r9700-qwen3-8-flash-next-iq3-s`, README names the card, VRAM and driver. - Passed: `test_bench_facts_amd` (8 tests) still OK; nothing else in this file was touched. - Not run: NVIDIA and Apple paths (untouched code, no such card here), Windows branch, and the `--clients` part of the suite. ## Limits The probe is best effort like the rest of the file: an `amd-smi` that answers nothing still yields a report, with the server's name. It adds no new dependency (the standard library only, `amd-smi` is read with the existing `run_cmd`).
本站相关内容
相关页面的快捷入口。