[PR #3519] [CLOSED] [Benchmark] name the AMD card and its ROCm runtime in the standard report #4665

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

📋 Pull Request Information

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

Base: main ← Head: terminal-bench-facts-rocm


📝 Commits (1)

  • 9b7147a [Benchmark] name the AMD card and its ROCm runtime in the standard report

📊 Changes

3 files changed (+210 additions, -4 deletions)

View changed files

📝 docs/BENCHMARK_PROTOCOL.md (+6 -1)
📝 strata_cli/bench_facts.py (+64 -3)
➕ tests/terminal/test_bench_facts_amd.py (+140 -0)

📄 Description

Problem and result

A standard-v1 run on a Radeon AI PRO R9700 (gfx1201) with ROCm 10.1 named the vendor instead of the card and left the
runtime unmeasured. serve/telemetry.py reports the GPU as the amdgpu driver's product_name, which is empty on
gfx1201, so the server answers AMD Radeon; hardware() then preferred that answer over the name the local probe had
found, the results folder came out 2026-10-20-standard-unknown-..., and the README said runtime: not measured
because ROCm 7 and newer ship amd-smi and no rocm-smi.

After the change, on the same machine and the same revision of everything else, the probe reports both cards
(other_gpus() -> AMD Radeon AI PRO R9700, 34208743424 bytes and AMD Radeon Graphics, 805306368 bytes), the run is
filed under 2026-10-20-standard-ai-pro-r9700-*, and the README reads runtime: rocm 10.1.0. gpu-driver still says
it did not measure one, which is true here: amd-smi static --driver answers N/A because amdgpu is built into the
kernel (CachyOS 7.3.0-rc6), and the version is not invented from the kernel string.

Related discussion

Searched issues and open pull requests: none of the 100 open PRs touches strata_cli/bench_facts.py, and no issue
covers the bench facts naming. Community reports that hit the same hole are #3179 (RX 7900 XTX), #3468 (RX 6800 XTX)
and #3512 (AI PRO R9700), whose benchmark posts carry not measured for these fields; #1735 is the same class of
problem in the Monitor (board FRU string), not here. No scope agreement was opened for a change this size - say so if
one is wanted.

Approach

  • On Linux (and any non-Windows host) with no rocm-smi, read the card from amd-smi: static --asic gives the
    market name, static --driver the driver version, and amd-smi list --json the PCI address. Memory comes from
    /sys/class/drm/cardN/device/mem_info_vram_total for the card whose realpath ends in that address, not from the card
    number: on this box the discrete card is card1 and the iGPU is card2, and the numbering is not the same as
    amd-smi's gpu index.
  • A driver version of N/A or empty is not a version, so driver stays None and the report keeps its reason.
  • A served name that is only a vendor (AMD Radeon, NVIDIA, Intel, Advanced Micro Devices) no longer replaces
    the card the local probe named. A card only the server can see still wins, which is the old behavior and is what a
    second vendor or a different numbering needs.
  • rocm_version() reads <ROCM_PATH or /opt/rocm>/{.info,core/.info}/version and falls back to amd-smi -h, which
    prints ROCm version: 10.1.0; the software block gains a rocm runtime entry next to cuda and metal.
  • Default path unchanged: hosts that still have rocm-smi, Windows, and Apple silicon take the same code as before.
    Nothing here changes the machine or the run itself, only what the report says about it.

Validation

Passed:

  • PYTHONPATH=.:tests/terminal .venv/bin/python -m unittest test_bench_facts_amd -> 8 tests OK, at
    9de04cd4 plus these three files (Python 3.14 in the project venv, CachyOS, one R9700). The canned amd-smi
    answers in the test are this machine's real output trimmed to the fields read, and the fake sysfs tree repeats the
    symlink shape so the PCI-address match is exercised.
  • ... -m unittest test_download_integrity test_gfx_selection test_progress_words -> 59 tests OK (untouched upstream
    tests, run to show the terminal suite still passes next to the change).
  • ... -m unittest test_bench test_bench_standard -> 79 tests OK.
  • Live probe on the real machine: bf.other_gpus() -> the two cards above, bf.rocm_version() -> 10.1.0.
  • Three full standard-v1 runs with the patched facts (strata.py bench run --url http://127.0.0.1:8080), all
    Status: complete. 21 of 21 required requests finished, 0 failed, 0 skipped, Sanity checks: 12 of 12, filed under
    bench/results/2026-10-20-standard-ai-pro-r9700-{383f636c,cc06a72d,93ba556c}/README.md, which now carry the card
    name and runtime: rocm 10.1.0.

Failed: none observed.

Not run:

  • Windows and Apple silicon paths: untouched, and the new test skips itself under os.name == "nt".
  • A host whose amd-smi static --driver returns a real version. This box answers N/A for both GPUs, so the
    "driver version exists" branch is unexercised on hardware; the null case is covered by the test.
  • ROCm 6.x with rocm-smi present (older ROCm not installed here). Those hosts keep the original probe.
  • No native code is touched, so no CUDA/HIP/SYCL build is involved; the change is two Python files and one document.

Limits

  • Measured on one card (gfx1201, PCI 03:00.0) and one ROCm (10.1, amd-smi 27.1.0+7da43026). Whether every ROCm 7+
    install keeps the same gpu_data shape and <install>/core/.info/version is not established here.
  • Multi-GPU AMD hosts: each amd-smi GPU becomes one card, and the memory lookup only resolves when
    amd-smi list --json gives a BDF that matches a /sys/class/drm/cardN/device. A card without a BDF keeps
    memory_bytes null with the usual reason.
  • No performance claim: the change only affects what the report records.

🔄 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/3519 **Author:** [@l33tm4st3r](https://github.com/l33tm4st3r) **Created:** 10/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `terminal-bench-facts-rocm` --- ### 📝 Commits (1) - [`9b7147a`](https://github.com/Niko1221/Strata/commit/9b7147a36781f6bd26d20ecffa01654e544251bd) [Benchmark] name the AMD card and its ROCm runtime in the standard report ### 📊 Changes **3 files changed** (+210 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `docs/BENCHMARK_PROTOCOL.md` (+6 -1) 📝 `strata_cli/bench_facts.py` (+64 -3) ➕ `tests/terminal/test_bench_facts_amd.py` (+140 -0) </details> ### 📄 Description Problem and result A standard-v1 run on a Radeon AI PRO R9700 (gfx1201) with ROCm 10.1 named the vendor instead of the card and left the runtime unmeasured. `serve/telemetry.py` reports the GPU as the amdgpu driver's `product_name`, which is empty on gfx1201, so the server answers `AMD Radeon`; `hardware()` then preferred that answer over the name the local probe had found, the results folder came out `2026-10-20-standard-unknown-...`, and the README said `runtime: not measured` because ROCm 7 and newer ship `amd-smi` and no `rocm-smi`. After the change, on the same machine and the same revision of everything else, the probe reports both cards (`other_gpus()` -> `AMD Radeon AI PRO R9700, 34208743424 bytes` and `AMD Radeon Graphics, 805306368 bytes`), the run is filed under `2026-10-20-standard-ai-pro-r9700-*`, and the README reads `runtime: rocm 10.1.0`. `gpu-driver` still says it did not measure one, which is true here: `amd-smi static --driver` answers `N/A` because amdgpu is built into the kernel (CachyOS 7.3.0-rc6), and the version is not invented from the kernel string. Related discussion Searched issues and open pull requests: none of the 100 open PRs touches `strata_cli/bench_facts.py`, and no issue covers the bench facts naming. Community reports that hit the same hole are #3179 (RX 7900 XTX), #3468 (RX 6800 XTX) and #3512 (AI PRO R9700), whose benchmark posts carry `not measured` for these fields; #1735 is the same class of problem in the Monitor (board FRU string), not here. No scope agreement was opened for a change this size - say so if one is wanted. Approach - On Linux (and any non-Windows host) with no `rocm-smi`, read the card from `amd-smi`: `static --asic` gives the market name, `static --driver` the driver version, and `amd-smi list --json` the PCI address. Memory comes from `/sys/class/drm/cardN/device/mem_info_vram_total` for the card whose realpath ends in that address, not from the card number: on this box the discrete card is `card1` and the iGPU is `card2`, and the numbering is not the same as `amd-smi`'s `gpu` index. - A driver version of `N/A` or empty is not a version, so `driver` stays `None` and the report keeps its reason. - A served name that is only a vendor (`AMD Radeon`, `NVIDIA`, `Intel`, `Advanced Micro Devices`) no longer replaces the card the local probe named. A card only the server can see still wins, which is the old behavior and is what a second vendor or a different numbering needs. - `rocm_version()` reads `<ROCM_PATH or /opt/rocm>/{.info,core/.info}/version` and falls back to `amd-smi -h`, which prints `ROCm version: 10.1.0`; the software block gains a `rocm` runtime entry next to `cuda` and `metal`. - Default path unchanged: hosts that still have `rocm-smi`, Windows, and Apple silicon take the same code as before. Nothing here changes the machine or the run itself, only what the report says about it. Validation Passed: - `PYTHONPATH=.:tests/terminal .venv/bin/python -m unittest test_bench_facts_amd` -> 8 tests OK, at `9de04cd4` plus these three files (Python 3.14 in the project venv, CachyOS, one R9700). The canned `amd-smi` answers in the test are this machine's real output trimmed to the fields read, and the fake sysfs tree repeats the symlink shape so the PCI-address match is exercised. - `... -m unittest test_download_integrity test_gfx_selection test_progress_words` -> 59 tests OK (untouched upstream tests, run to show the terminal suite still passes next to the change). - `... -m unittest test_bench test_bench_standard` -> 79 tests OK. - Live probe on the real machine: `bf.other_gpus()` -> the two cards above, `bf.rocm_version()` -> `10.1.0`. - Three full standard-v1 runs with the patched facts (`strata.py bench run --url http://127.0.0.1:8080`), all `Status: complete. 21 of 21 required requests finished, 0 failed, 0 skipped`, `Sanity checks: 12 of 12`, filed under `bench/results/2026-10-20-standard-ai-pro-r9700-{383f636c,cc06a72d,93ba556c}/README.md`, which now carry the card name and `runtime: rocm 10.1.0`. Failed: none observed. Not run: - Windows and Apple silicon paths: untouched, and the new test skips itself under `os.name == "nt"`. - A host whose `amd-smi static --driver` returns a real version. This box answers `N/A` for both GPUs, so the "driver version exists" branch is unexercised on hardware; the null case is covered by the test. - ROCm 6.x with `rocm-smi` present (older ROCm not installed here). Those hosts keep the original probe. - No native code is touched, so no CUDA/HIP/SYCL build is involved; the change is two Python files and one document. Limits - Measured on one card (gfx1201, PCI 03:00.0) and one ROCm (10.1, `amd-smi` 27.1.0+7da43026). Whether every ROCm 7+ install keeps the same `gpu_data` shape and `<install>/core/.info/version` is not established here. - Multi-GPU AMD hosts: each `amd-smi` GPU becomes one card, and the memory lookup only resolves when `amd-smi list --json` gives a BDF that matches a `/sys/class/drm/cardN/device`. A card without a BDF keeps `memory_bytes` null with the usual reason. - No performance claim: the change only affects what the report records. --- <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:11 +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#4665
No description provided.