3

Can anyone tell me how to find the GPU type (Fermi, Tesla or Kepler) by the program, so that the would call the correct function depending on the GPU type.

Through cudaDeviceProp.major, I was able to differentiate Fermi and Tesla through their compute capability. But I am not able to differentiate between Fermi and Kepler.

Do anyone know how to find it.

4

1 回答 1

7

To answer the question, cudaDeviceProp.major=3 identifies current Kepler cards, cudaDeviceProp.major=2 is for Fermi and cudaDeviceProp.major=1 for G8x/G9x/G2xx cards, as illustrated by this SDK deviceQuery output:

/deviceQuery Starting...

CUDA Device Query (Runtime API) version (CUDART static linking)

Found 1 CUDA Capable device(s)

Device 0: "GeForce GTX 680"
CUDA Driver Version / Runtime Version 4.2 / 4.2
CUDA Capability Major/Minor version number: 3.0
Total amount of global memory: 2048 MBytes (2147287040 bytes)
( 8) Multiprocessors x (192) CUDA Cores/MP: 1536 CUDA Cores
GPU Clock rate: 706 MHz (0.71 GHz)
Memory Clock rate: 3004 Mhz
于 2012-06-11T21:37:47.880 回答