cuda.bindings._v2.driver.stream_batch_mem_op_v2#

cuda.bindings._v2.driver.stream_batch_mem_op_v2(
intptr_t stream,
unsigned int count,
param_array,
unsigned int flags,
)#

Batch operations to synchronize the stream via memory operations.

This is a batch version of cuStreamWaitValue32() and cuStreamWriteValue32(). Batching operations may avoid some performance overhead in both the API call and the device execution versus adding them to the stream in separate API calls. The operations are enqueued in the order they appear in the array. See CUstreamBatchMemOpType for the full set of supported operations, and cuStreamWaitValue32(), cuStreamWaitValue64(), cuStreamWriteValue32(), and cuStreamWriteValue64() for details of specific operations. See related APIs for details on querying support for specific operations.

Parameters:
  • stream (intptr_t) – The stream to enqueue the operations in.

  • count (unsigned int) – The number of operations in the array. Must be less than 256.

  • param_array (intptr_t) – The types and parameters of the individual operations.

  • flags (unsigned int) – Reserved for future expansion; must be 0.

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

cuStreamBatchMemOp_v2