-
Notifications
You must be signed in to change notification settings - Fork 296
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
The memory usage displayed by nvtop
is different from that of nvidia-smi
#322
Comments
I noticed this when I was writing a C program which needs to get VRAM usage of Nvidia GPUs. I used the following code and get the same result as what By the way, in most cases UINT32 nvidiaUsedVram(void) {
size_t freeMemory, totalMemory;
cudaMemGetInfo(&freeMemory, &totalMemory);
return (totalMemory - freeMemory) / (1024 * 1024);
} |
I face the same problem. After my os upgraded to 24.04, the dispaly of nvtop is no longer correct even I update the nvtop to 3.0.2-1. |
Hard to say which one is closer to what we can expect as "allocated memory". Nvtop uses the result of nvmlDeviceGetMemoryInfo_v2 coming directly from the driver! The value nvtop displays is the used memory: Allocated device memory (in bytes). |
Not sure either, since both methods are offered by nvidia. |
I noticed that on my platform (Ubuntu 24.04, RTX3060), when it comes to VRAM utilization,
nvtop
gives a different number tonvidia-smi
The text was updated successfully, but these errors were encountered: