Skip to content

nvidia: don't report fake PCIe link on unified-memory SoC GPUs - #499

Open
Code4me2 wants to merge 1 commit into
Syllo:masterfrom
Code4me2:issue-426-gb10-pcie
Open

nvidia: don't report fake PCIe link on unified-memory SoC GPUs#499
Code4me2 wants to merge 1 commit into
Syllo:masterfrom
Code4me2:issue-426-gb10-pcie

Conversation

@Code4me2

Copy link
Copy Markdown

Summary

Fixes the PCIe misreporting portion of #426 on unified-memory SoC GPUs such as the DGX Spark (GB10).

On the GB10, the GPU is attached via NVLink-C2C (on-die interconnect), not a PCIe slot. However, NVML's nvmlDeviceGetCurrPcieLinkGeneration / nvmlDeviceGetCurrPcieLinkWidth return NVML_SUCCESS with placeholder values (GEN 1 @ 1x), which nvtop displayed as if they were a real PCIe link.

These devices are already detected (unified memory → has_unified_memory), so this PR gates PCIe link gen/width reporting on not being unified memory, making the header fall back to N/A. PCIe RX/TX throughput was already N/A here because NVML returns NVML_ERROR_NOT_SUPPORTED on this platform.

Before (master)

Device 0 [NVIDIA GB10] PCIe GEN 1@ 1x RX: N/A TX: N/A

After

Device 0 [NVIDIA GB10] PCIe GEN N/A RX: N/A TX: N/A

Memory (MEM[...Gi]) is already reported correctly on GB10 via the #466 unified-memory fallback; fan and memory-clock remain correctly N/A since the SoC does not expose them through NVML.

Validation

  • Built and tested on a DGX Spark (GB10, aarch64, driver 580.173.02).
  • Discrete (non-unified) GPUs are unaffected: has_unified_memory is only set when NVML reports unified/SoC memory.

On unified-memory SoC platforms such as the DGX Spark (GB10), the GPU is
attached via an on-die interconnect (NVLink-C2C) rather than a PCIe link.
NVML nevertheless returns NVML_SUCCESS for the current PCIe link
generation/width, but with placeholder values (GEN 1 @ 1x), which nvtop
surfaces as if they were real.

Since unified-memory devices have no PCIe framebuffer link, only report
PCIe link generation/width on discrete (non-unified) GPUs so the header
falls back to N/A instead of showing a misleading link. Pcie RX/TX
throughput already shows N/A on these devices because NVML returns
NVML_ERROR_NOT_SUPPORTED there.

Closes the PCIe misreporting part of Syllo#426.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant