cuda.bindings._v2.driver.mem_batch_decompress_async#

cuda.bindings._v2.driver.mem_batch_decompress_async(
params_array,
size_t count,
unsigned int flags,
intptr_t stream,
) → size_t#

Submit a batch of count independent decompression operations.

Each of the count decompression operations is described by a single entry in the params_array array. Once the batch has been submitted, the function will return, and decompression will happen asynchronously w.r.t. the CPU. To the work completion tracking mechanisms in the CUDA driver, the batch will be considered a single unit of work and processed according to stream semantics, i.e., it is not possible to query the completion of individual decompression operations within a batch. The memory pointed to by each of CUmemDecompressParams.src, CUmemDecompressParams.dst, and CUmemDecompressParams.dstActBytes, must be capable of usage with the hardware decompress feature. That is, for each of said pointers, the pointer attribute CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE should give a non-zero value. To ensure this, the memory backing the pointers should have been allocated using one of the following CUDA memory allocators:.

  • cuMemAlloc().

  • mem_create() with the usage flag CU_MEM_CREATE_USAGE_HW_DECOMPRESS.

  • mem_alloc_from_pool_async() from a pool that was created with the usage flag CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS Additionally, CUmemDecompressParams.src, CUmemDecompressParams.dst, and CUmemDecompressParams.dstActBytes, must all be accessible from the device associated with the context where stream was created. For information on how to ensure this, see the documentation for the allocator of interest.

Parameters:
  • params_array (intptr_t) – The array of structures describing the independent decompression operations.

  • count (size_t) – The number of entries in params_array array.

  • flags (unsigned int) – Must be 0.

  • stream (intptr_t) – The stream where the work will be enqueued.

Returns:

The index into params_array of the decompression

operation for which the error returned by this function pertains to. If index is SIZE_MAX and the value returned is not CUDA_SUCCESS, then the error returned by this function should be considered a general error that does not pertain to a particular decompression operation. May be NULL, in which case, no index will be recorded in the event of error.

Return type:

size_t

See also

cuMemBatchDecompressAsync