A CUDA event records a timestamp on the GPU timeline. Record one before a kernel and another after it in the stream, then measure the elapsed GPU time between them. This avoids mistaking the CPU’s quick return from a launch for completed GPU work. section 2.2.10
Measure a kernel
Queue a start event, launch the kernel, then queue a stop event. The GPU timestamps each event as it reaches that point in the stream. section 2.2.10

