I want to know how to display percentage of the graphics card ability upon tasks being sent to the card. Like a Gnome's system monitor.
Moreover, how to obtain device parameters to calculate a percentage based on its hardware specs
How does nvidia-smi -a
get utilization? Is there an Cuda API to ask the card for this information?
CUDA Compatible Graphics To check if your computer has an NVIDA GPU and if it is CUDA enabled: Right click on the Windows desktop. If you see “NVIDIA Control Panel” or “NVIDIA Display” in the pop up dialogue, the computer has an NVIDIA GPU. Click on “NVIDIA Control Panel” or “NVIDIA Display” in the pop up dialogue.
You can verify that you have a CUDA-capable GPU through the Display Adapters section in the Windows Device Manager. Here you will find the vendor name and model of your graphics card(s). If you have an NVIDIA card that is listed in http://developer.nvidia.com/cuda-gpus, that GPU is CUDA-capable.
CUDA® is a parallel computing platform and programming model that enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU).
CUDA works with all Nvidia GPUs from the G8x series onwards, including GeForce, Quadro and the Tesla line. CUDA is compatible with most standard operating systems.
Process Hacker does this (this is only for Windows), but it's not CUDA-specific.
I know it uses some undocumented functions -- take a look at the plugin's source code to find out how.
What you want to do is not done in CUDA. For a percentage output of the utilization handles by a specific cuda device you have to ask the GPU driver like nvidia-smi does.
EDIT: After a little google search i found open-hardware-monitor It is written in C# and shows a way to get the utilization of AMD and nVidia cards on windows systems. The implementation for AMD cards works on linux and windows.
I've looked a bit inside the code. Look at the NVAPI.cs file to see how open-hardware-monitor uses the nvidia dlls on windows to get all sensor and load data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With