cuda.bindings._v2.driver.stream_wait_value32_v2#
- cuda.bindings._v2.driver.stream_wait_value32_v2(
- intptr_t stream,
- uint64_t addr,
- uint32_t value,
- unsigned int flags,
Wait on a memory location.
Enqueues a synchronization of the stream on the given memory location. Work ordered after the operation will block until the given condition on the memory is satisfied. By default, the condition is to wait for (int32_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other condition types can be specified via
flags. If the memory was registered viacuMemHostRegister(), the device pointer should be obtained withcuMemHostGetDevicePointer(). This function cannot be used with managed memory (cuMemAllocManaged). Support for CU_STREAM_WAIT_VALUE_NOR can be queried withdevice_get_attribute()andCU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2.- Parameters:
stream (intptr_t) – The stream to synchronize on the memory location.
addr (uint64_t) – The memory location to wait on.
value (uint32_t) – The value to compare with the memory location.
flags (unsigned int) – See
CUstreamWaitValue_flags.
Note
Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order.
See also
cuStreamWaitValue32_v2