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)?
0
votes
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.
-arch=sm_52
) you'll get an error fromnvcc
. – Robert Crovella