[PR #3630] [CLOSED] [Benchmark] bench.sh: name the AMD card on ROCm 7+, where only amd-smi exists #4725

Closed
opened 2026-11-07 15:38:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3630
Author: @l33tm4st3r
Created: 10/21/2026
Status: ❌ Closed

Base: main ← Head: terminal-bench-community-amd


📝 Commits (1)

  • 4c3e048 [Benchmark] bench.sh: name the AMD card on ROCm 7+, where only amd-smi exists

📊 Changes

2 files changed (+127 additions, -0 deletions)

View changed files

➕ tests/terminal/test_bench_community_amd.py (+90 -0)
📝 tools/strata_bench.py (+37 -0)

📄 Description

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).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3630 **Author:** [@l33tm4st3r](https://github.com/l33tm4st3r) **Created:** 10/21/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `terminal-bench-community-amd` --- ### 📝 Commits (1) - [`4c3e048`](https://github.com/Niko1221/Strata/commit/4c3e048e3d7c6173a807b644befbf69ee705fe58) [Benchmark] bench.sh: name the AMD card on ROCm 7+, where only amd-smi exists ### 📊 Changes **2 files changed** (+127 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tests/terminal/test_bench_community_amd.py` (+90 -0) 📝 `tools/strata_bench.py` (+37 -0) </details> ### 📄 Description ## 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`). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:38:37 +07:00
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#4725
No description provided.