Reputation: 1093
Is there a way to check the number of stream processors and cores utilized by an OpenCL kernel?
Upvotes: 1
Views: 262
Reputation: 5754
No. However you can make guesses based on your application: If the number of work items is much larger than the number of CUDA cores and the work group size is 32 or larger, all stream processors are used at the same time. If the number of work items is the about the same or lower than the number of CUDA cores, you won't have full utilization. If you set the work size to 16, only half of the CUDA cores will be used at any time, but the non-used half is blocked and cannot do other work. (So always set work group size to 32 or larger.)
Tools like nvidia-smi can tell you the time-averaged GPU usage. So if you run your kernel over and over without any delay in between, the usage indicates the average fraction of used CUDA cores at any time.
Upvotes: 2