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_ctx wait for all work captured in h_event. The synchronization will be performed on the device and will not block the calling CPU thread. See ctx_record_event() for details on what is captured by an event. If the context passed to h_ctx is the primary context, the primary context and its green contexts will wait for h_event. If the context passed to h_ctx is a context converted from green context via ctx_from_green_ctx(), the green context will wait for h_event.

Parameters:
  • h_ctx (intptr_t) – Context to wait.

  • h_event (intptr_t) – Event to wait on.

Note

h_event may be from a different context or device than h_ctx.

Note

The API will return CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED and invalidate the capture if the specified event h_event is part of an ongoing capture sequence or if the specified context h_ctx has a stream in the capture mode.

See also

cuCtxWaitEvent