-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update memory info to v2 #57
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nvmlDeviceGetMemoryInfo_v2
has been available for a few years now. I propose to update the implementation to v2, so that the results correspond with whatnvidia-smi
andgpustat
output.Currently, the outputs of
device.memory_info()
return annvmlMemory_t
struct withtotal
,free
andused
.nvmlMemory_v2_t
is defined in the existing code, but never used. Calling the NVML function with a struct set up forv2
gives a slightly different result, where theused
part doesn't include cache memory and other non-allocated stuff. Additionally, the struct has a field forversion
andreserved
memory.I implemented this change and did some testing, and it works! Importantly, the results of
device.memory_info()?.used
would produce912MB
on our A100s before the change, and now show7.8MB
with the v2 version, which matchesnvidia-smi
andgpustat
.The text was updated successfully, but these errors were encountered: