开发者

Programmatically fetch GPU utilization

Is there a standard way of getting the current load on the GPU? I'm looking for something similar to the Task Manager showing CPU%. Utilities such as GPU-Z show this value but I'm not sure how it gets this. I'm specifically interested in AMD graphics cards at the moment, any pointers would be helpful.

If there's no cle开发者_如何学编程an API way of doing it, are there any programs whose output I can capture to get this info?


For AMD/ATI cards, check out GPU PerfStudio. http://developer.amd.com/gpu/Pages/default.aspx

For NVidia cards, look at PerfHUD. http://developer.nvidia.com/object/nvperfhud_home.html

There is also a more generic tool in the DirectX SDK from MS called Pix that overlaps partially with these tools.

AFAIK there's no way to get something as simple as a %-use number for the GPU because it isn't that simple. But these tools will help in debugging and profiling what's going on in the GPU. Both ATI and NVidia provide public documentation with recommended steps to find and fix specific types of GPU bottlenecks.


Try nvidia-smi -a. It is shipped with nvidia drivers. Provides current GPU core and memory utilization information.

nvidia --help for full helping information.


This kind of information is always provided either through a PerformanceCounter or WMI. Use Perfmon.exe or download WmiCodeCreator to find out what the card manufacturer provided. Perhaps needless to say, this kind of code doesn't port well from one machine to another.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜