cuda.bindings._v2.driver.ctx_record_event#

cuda.bindings._v2.driver.ctx_record_event(intptr_t h_ctx, intptr_t h_event)#

Records an event.

Captures in h_event all the activities of the context h_ctx at the time of this call. h_event and h_ctx must be from the same CUDA context, otherwise CUDA_ERROR_INVALID_HANDLE will be returned. Calls such as event_query() or ctx_wait_event() will then examine or wait for completion of the work that was captured. Uses of h_ctx after this call do not modify h_event. If the context passed to h_ctx is the primary context, h_event will capture all the activities of the primary context and its green contexts. If the context passed to h_ctx is a context converted from green context via ctx_from_green_ctx(), h_event will capture only the activities of the green context.

Parameters:
  • h_ctx (intptr_t) – Context to record event for.

  • h_event (intptr_t) – Event to record.

Note

The API will return CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED if the specified context h_ctx has a stream in the capture mode. In such a case, the call will invalidate all the conflicting captures.

See also

cuCtxRecordEvent