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_eventall the activities of the contexth_ctxat the time of this call.h_eventandh_ctxmust be from the same CUDA context, otherwiseCUDA_ERROR_INVALID_HANDLEwill be returned. Calls such asevent_query()orctx_wait_event()will then examine or wait for completion of the work that was captured. Uses ofh_ctxafter this call do not modifyh_event. If the context passed toh_ctxis the primary context,h_eventwill capture all the activities of the primary context and its green contexts. If the context passed toh_ctxis a context converted from green context viactx_from_green_ctx(),h_eventwill 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_UNSUPPORTEDif the specified contexth_ctxhas a stream in the capture mode. In such a case, the call will invalidate all the conflicting captures.See also
cuCtxRecordEvent