ProEns08
ProEns08

Reputation: 1914

How to know the compute capability of my Nvidia Card in C/C++?

Many framework require that your nvidia graphic card has a specific compute capability version.

I am developing a C++ application that uses Cuda. I should get this information by code. so that I can assign the needed framework for each graphic compute capability. How to know the compute capability of my nvidia graphic in C/C++?

Upvotes: 3

Views: 1698

Answers (2)

user1084944
user1084944

Reputation:

From the CUDA Runtime API

__host__ ​cudaError_t cudaGetDeviceProperties ( cudaDeviceProp* prop, int  device )
Returns information about the compute-device.

Alternatively, you could use cudaDeviceGetAttribute to get the specific properties you want.

precisely: Returns in *prop the properties of device dev. The cudaDeviceProp structure is defined as:

‎    struct cudaDeviceProp {
              .... 
              int major;
              int minor;
              .....
   }

major, minor are the major and minor revision numbers defining the device's compute capability.

Upvotes: 6

Reda Drissi
Reda Drissi

Reputation: 1672

If you right click the nvidia icon on the bottom right of your screen then go to Nvidia control panel, a window will open then you can check all of the specs under "System Information" it's in the bottom left of the window .

Upvotes: 0

Related Questions