Skip to content

Fix NVML memory reporting regression on coherent UMA platforms#1611

Open
parallelArchitect wants to merge 1 commit intoaristocratos:mainfrom
parallelArchitect:main
Open

Fix NVML memory reporting regression on coherent UMA platforms#1611
parallelArchitect wants to merge 1 commit intoaristocratos:mainfrom
parallelArchitect:main

Conversation

@parallelArchitect
Copy link
Copy Markdown

@parallelArchitect parallelArchitect commented Apr 15, 2026

On GB10 / DGX Spark, nvmlDeviceGetMemoryInfo returns NVML_SUCCESS with total == system MemTotal (~121GB). This prevents correct UMA detection, causing incorrect VRAM reporting.

Fix: detect UMA by comparing NVML total against /proc/meminfo MemTotal. If total >= 90% of system RAM, classify as unified memory and use MemAvailable instead of MemTotal for display.

Also fix GCC 13 compatibility by replacing std::ranges::to with equivalent C++20 constructs.

Note: requires validation on GB10 / DGX Spark hardware. Author does not have access to a coherent UMA system.

References
Same root cause fixed in nvtop: Syllo/nvtop#463
NVML unified shim for GB10: https://github.com/parallelArchitect/nvml-unified-shim
btop discussion: #1586

Note
Requires validation on GB10 / DGX Spark hardware. Author does not have access to a coherent UMA system.

On GB10 / DGX Spark, nvmlDeviceGetMemoryInfo returns NVML_SUCCESS with
total == system MemTotal (~121GB). This prevents correct UMA detection,
causing incorrect VRAM reporting.

Fix: detect UMA by comparing NVML total against /proc/meminfo MemTotal.
If total >= 90% of system RAM, classify as unified memory and use
MemAvailable instead of MemTotal for display.

Also fix GCC 13 compatibility by replacing std::ranges::to with
equivalent C++20 constructs.

Note: requires validation on GB10 / DGX Spark hardware. Author does not
have access to a coherent UMA system.
@parallelArchitect
Copy link
Copy Markdown
Author

For anyone needing the NVML memory fix now while this PR is under review — the fix is available in this fork: https://github.com/parallelArchitect/nvml-unified-shim

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