cuda.bindings._v2.driver.ctx_wait_event#
- cuda.bindings._v2.driver.ctx_wait_event(intptr_t h_ctx, intptr_t h_event)#
Make a context wait on an event.
Makes all future work submitted to context
h_ctxwait for all work captured inh_event. The synchronization will be performed on the device and will not block the calling CPU thread. Seectx_record_event()for details on what is captured by an event. If the context passed toh_ctxis the primary context, the primary context and its green contexts will wait forh_event. If the context passed toh_ctxis a context converted from green context viactx_from_green_ctx(), the green context will wait forh_event.- Parameters:
h_ctx (intptr_t) – Context to wait.
h_event (intptr_t) – Event to wait on.
Note
h_eventmay be from a different context or device thanh_ctx.Note
The API will return
CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTEDand invalidate the capture if the specified eventh_eventis part of an ongoing capture sequence or if the specified contexth_ctxhas a stream in the capture mode.See also
cuCtxWaitEvent