Reputation: 77
Can you show how to compute maximum number of threads that can reside in specific GPU using CUDA? I.e. maximum number of threads that I can assign to kernel. Thanks!
Upvotes: 1
Views: 2420
Reputation: 36446
You can get the maximum number of threads per multiprocessor (SM) using cudaGetDeviceProperties()
. Then multiply this by the number of SMs in your card.
Though this does not necessarily mean you should execute this number of threads. Consult this SO answer for a good explanation.
Upvotes: 1