Fix NVML memory reporting regression on coherent UMA platforms#1611
Open
parallelArchitect wants to merge 1 commit intoaristocratos:mainfrom
Open
Fix NVML memory reporting regression on coherent UMA platforms#1611parallelArchitect wants to merge 1 commit intoaristocratos:mainfrom
parallelArchitect wants to merge 1 commit intoaristocratos:mainfrom
Conversation
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.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.