NVidia Graphics Card - Getting Statistics

I need to write some low-level graphics card applications for my term paper. For example, temperature, working SM, access control, etc. OS linux, tesla c1060.

Could you give me some tips on where to look for such information?

CUDA does not provide these features. There must be some work with dev \ nvidia * probabaly. or not? I never wrote anything like this: any advice would be welcome.

Thank.

UPD: The nvidia settings are good, but they don’t provide everything I need. Mb there are several more ways how to do this on c \ cuda ptx?

+3
source share
3 answers

spring, , RivaTuner v2.24c guru3d.com / CPU-ID . , Linux, NVidia nvidia-settings -h, . !

+2

, 2 , - , Nvidia NVML API . ! , . ++, gpu , .

, gpu. : ( ) .

#include "nvml.h"

using namespace std;

Nvidia::Nvidia()
{
    nvmlInit();
}

Nvidia::~Nvidia()
{
    //dtor
}


unsigned int Nvidia::FetchTemp()
{
 unsigned int DeviceCount;
 nvmlReturn_t Rval=nvmlDeviceGetCount(&DeviceCount); //return type enum
 if(Rval!=0)
 {
     //Card read error
     return 0;
 }
 //Turn Count into index
 DeviceCount--;
 //Get Prereqs
 nvmlDevice_t Device;
 Rval=nvmlDeviceGetHandleByIndex(DeviceCount,&Device);
 if(Rval!=0)
 {
     //Card read error
     return 0;
 }
 nvmlTemperatureSensors_t TSensors=NVML_TEMPERATURE_GPU;

//Get Temperature
 unsigned int Temp=0;
 Rval=nvmlDeviceGetTemperature(Device,TSensors,&Temp);
 if(Rval!=0)
 {
     //Card read error
     return 0;
 }
 return Temp;
}
+2

You can write a DirectX program to query the capabilities of the card if you are interested in what features it supports.

0
source

Source: https://habr.com/ru/post/1735411/


All Articles