0
votes

How can I learn maximum compute capability of devices for which I can compile code with the compiler from a given version of CUDA toolkit? Suppose, I have cuda6.5 toolkit. Is nvcc from there able to compile for GTX GeForce 970 (compute capability 5.2)?

2
There were two different versions of the CUDA 6.5 toolkit released, one which supported compute capability up to cc5.0 and the newer version that supported compute capability up to 5.2. If you have the older version, and you attempt to compile for a cc5.2 target (e.g. -arch=sm_52) you'll get an error from nvcc.Robert Crovella

2 Answers

1
votes

One approach would be trial and error - launch test compile commands with the compute capabilities you want. If you get an error, that toolkit version does not support that compute capability:

$ nvcc -arch=sm_20 t10.cu -o t10
$ nvcc -arch=sm_52 t10.cu -o t10
nvcc fatal   : Value 'sm_52' is not defined for option 'gpu-architecture'
$

Another approach would be to read the programming guide document that ships with each toolkit and is installed (e.g. on linux) in /usr/local/cuda/doc. Table 12 of that doc will list the available compute capabilities supported by that compiler version.

I'm sure there are other approaches as well. You could probably grep through the header files and figure it out.

0
votes

You compile the CUDA 7.0 samples with the CUDA 6.5 toolkit. It uses cc5.2 in the make. That'd be the fastest way to find out. Probably found out already, so it'd be nice if you'd tell everyone else the specific version number you discovered worked with cc5.2 for us other lazy people. :)