cuda.bindings._v2.driver.event_record#

cuda.bindings._v2.driver.event_record(intptr_t h_event, intptr_t h_stream)#

Records an event.

Captures in h_event the contents of h_stream at the time of this call. h_event and h_stream must be from the same context otherwise CUDA_ERROR_INVALID_HANDLE is returned. Calls such as event_query() or stream_wait_event() will then examine or wait for completion of the work that was captured. Uses of h_stream after this call do not modify h_event. See note on default stream behavior for what is captured in the default case. event_record() can be called multiple times on the same event and will overwrite the previously captured state. Other APIs such as stream_wait_event() use the most recently captured state at the time of the API call, and are not affected by later calls to event_record(). Before the first call to event_record(), an event represents an empty set of work, so for example event_query() would return CUDA_SUCCESS.

Parameters:
  • h_event (intptr_t) – Event to record.

  • h_stream (intptr_t) – Stream to record event for.

See also

cuEventRecord