liveBook · Manning

CUDA event

As explained in GPU Programming with Triton

A CUDA event is a GPU-timeline timestamp object used to record and measure points in CUDA stream execution.

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

How GPU Programming with Triton covers it

How deep it goes
Defines event timing through stream placement and GPU timestamps, without detailing event API syntax.
Examples
Places events before and after a kernel to measure elapsed GPU time.
What you can do after
Apply CUDA events to measure kernel execution on the GPU timeline.
How it connects
Connects CUDA streams, CPU launch overhead, and GPU synchronization to kernel timing.

Also explained in

Compare how 2 books explain CUDA event →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of GPU Programming with Triton. The section links point to the parts of the book it draws on.