cuda.bindings._v2.driver.stream_wait_value64_v2#
- cuda.bindings._v2.driver.stream_wait_value64_v2(
- intptr_t stream,
- uint64_t addr,
- uint64_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 (int64_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(). Support for this can be queried withdevice_get_attribute()andCU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS.- Parameters:
stream (intptr_t) – The stream to synchronize on the memory location.
addr (uint64_t) – The memory location to wait on.
value (uint64_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
cuStreamWaitValue64_v2