Skip to main content

Module device_events

Module device_events 

Source
Expand description

Device events, and the two things built on them.

The C-family device APIs — CUDA and HIP — expose the same event model, and the backends over them were each writing the same two types against it: a fence handed out so a caller can wait on a stream outside the server’s lock, and a profiler that times work on the device’s own clock. EventApi is the seam: a backend spells the driver calls, and EventFence and EventProfiler are written once above them.

Structs§

Event
A device event that owns itself: created with timing enabled, released when dropped.
EventFence
An event recorded on a stream and handed out, so a caller can wait for that stream’s work from outside the server.
EventProfiler
Device profiling on the GPU’s own clock.

Traits§

EventApi
The device event calls an EventFence and an EventProfiler are built from.