Get GPU memory usage progamatically

来源:互联网 发布:优秀的网络小说知乎 编辑:程序博客网 时间:2024/05/17 22:26

cudaMemGetInfo (documented here) requires nothing other than the cuda runtime API to get free memory and total memory on the current device.


Check out the function nvmlDeviceGetMemoryInfo in NVIDIA Management Libraryhttps://developer.nvidia.com/nvidia-management-library-nvml:

"Retrieves the amount of used, free and total memory available on the device, in bytes."

Don't know if AMD has something equivalent.


D3DKMTQueryStatistics is what you need.


原创粉丝点击