Up until now, we have not determined the performance of the CUDA programs explicitly. In this section, we will see how to measure the performance of CUDA programs using CUDA Events and also visualize the performance using the Nvidia Visual Profiler. This is a very important concept in CUDA because it will allow you to choose the best-performing algorithms for a particular application from many options. First, we will measure performance using CUDA Events.
Performance measurement of CUDA programs
CUDA Events
We can use a CPU timer for measuring the performance of CUDA programs, but it will not give accurate results. It will include thread latency overhead and scheduling in the OS, among many other factors. The time measured...