Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you calculate the load on a nvidia (cuda capable), gpu card?

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?

like image 468
stackoverflow Avatar asked Dec 07 '11 16:12

stackoverflow


People also ask

How do you calculate CUDA capability?

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.

How do I know if my GPU is CUDA capable?

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.

What does CUDA compute capability mean?

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).

Are all Nvidia gpus CUDA compatible?

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.


2 Answers

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.

like image 188
user541686 Avatar answered Oct 04 '22 01:10

user541686


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.

like image 40
Michael Haidl Avatar answered Oct 04 '22 01:10

Michael Haidl