[PR #1733] [CLOSED] telemetry: the Monitor's PCIe tile had no link for AMD cards on Linux #3639

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1733
Author: @phoenixclyde
Created: 10/9/2026
Status: ❌ Closed

Base: main ← Head: amd-monitor-pcie-link


📝 Commits (1)

  • 5241c72 telemetry: the Monitor's PCIe tile had no link for AMD cards on Linux

📊 Changes

1 file changed (+64 additions, -0 deletions)

View changed files

📝 serve/telemetry.py (+64 -0)

📄 Description

_Nvml.read() reports pcie_gen, pcie_gen_max, pcie_width and the two
throughput counters; _Amd.read() (the amdgpu sysfs reader from #301)
reports none of them, so on Linux the Monitor's PCIe tile shows only
dashes while the NVIDIA tile fills in.

This adds the link the card actually gets: the narrowest and slowest hop
between the root port and the card, from each hop's max_link_speed and
max_link_width. A card that negotiates Gen4 on its own hop but sits
behind a Gen3 root port really runs at Gen3, and that is the number a
bandwidth budget needs. pcie_own_gen keeps the card's own hop aside so
the gap is visible, and pcie_path reports how many hops could be read --
the bottleneck is only claimed when all of them could, because a kernel
or a container that hides part of /sys/devices would otherwise report the
card's own hop as the whole path.

Measured on one MI50 32 GB in a Gen3 x16 slot (lspci: the root port at
00:02.0 runs at 8 GT/s x16, the bridge above the card is downgraded, and
the card's own hop negotiates 16 GT/s), /metrics reports pcie_gen 3,
pcie_gen_max 3, pcie_own_gen 4, pcie_width 16 and pcie_path 4/4.

Throughput is deliberately left out: amdgpu's pcie_bw is three counters
whose documented use is a total, not a direction, while _Nvml's
pcie_rx_mb is receive-only, so filling that name from pcie_bw would
label a combined figure as one direction. Happy to follow up separately
if you want the tile to show a rate.

Hardware the numbers come from: one Radeon Instinct MI50 32 GB (gfx906,
PCI 1002:66a1, VBIOS 113-D1631711-100) on a Xeon E5-2696 v4 (Broadwell,
no AVX-512), in a PCIe 3.0 x16 slot, 128 GB RAM, Ubuntu, kernel
7.0.0-34-generic, ROCm 7.14 in a container.


🔄 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/1733 **Author:** [@phoenixclyde](https://github.com/phoenixclyde) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `amd-monitor-pcie-link` --- ### 📝 Commits (1) - [`5241c72`](https://github.com/Niko1221/Strata/commit/5241c7289f954d0e3b731793d6aa0a5287de5d9a) telemetry: the Monitor's PCIe tile had no link for AMD cards on Linux ### 📊 Changes **1 file changed** (+64 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `serve/telemetry.py` (+64 -0) </details> ### 📄 Description _Nvml.read() reports pcie_gen, pcie_gen_max, pcie_width and the two throughput counters; _Amd.read() (the amdgpu sysfs reader from #301) reports none of them, so on Linux the Monitor's PCIe tile shows only dashes while the NVIDIA tile fills in. This adds the link the card actually gets: the narrowest and slowest hop between the root port and the card, from each hop's max_link_speed and max_link_width. A card that negotiates Gen4 on its own hop but sits behind a Gen3 root port really runs at Gen3, and that is the number a bandwidth budget needs. pcie_own_gen keeps the card's own hop aside so the gap is visible, and pcie_path reports how many hops could be read -- the bottleneck is only claimed when all of them could, because a kernel or a container that hides part of /sys/devices would otherwise report the card's own hop as the whole path. Measured on one MI50 32 GB in a Gen3 x16 slot (lspci: the root port at 00:02.0 runs at 8 GT/s x16, the bridge above the card is downgraded, and the card's own hop negotiates 16 GT/s), /metrics reports pcie_gen 3, pcie_gen_max 3, pcie_own_gen 4, pcie_width 16 and pcie_path 4/4. Throughput is deliberately left out: amdgpu's pcie_bw is three counters whose documented use is a total, not a direction, while _Nvml's pcie_rx_mb is receive-only, so filling that name from pcie_bw would label a combined figure as one direction. Happy to follow up separately if you want the tile to show a rate. Hardware the numbers come from: one Radeon Instinct MI50 32 GB (gfx906, PCI 1002:66a1, VBIOS 113-D1631711-100) on a Xeon E5-2696 v4 (Broadwell, no AVX-512), in a PCIe 3.0 x16 slot, 128 GB RAM, Ubuntu, kernel 7.0.0-34-generic, ROCm 7.14 in a container. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:29:44 +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#3639
No description provided.