pub unsafe extern "C" fn hipMallocFromPoolAsync(
dev_ptr: *mut *mut c_void,
size: usize,
mem_pool: hipMemPool_t,
stream: hipStream_t,
) -> hipError_t
Expand description
@brief Allocates memory from a specified pool with stream ordered semantics.
Inserts an allocation operation into @p stream. A pointer to the allocated memory is returned immediately in @p dev_ptr. The allocation must not be accessed until the allocation operation completes. The allocation comes from the specified memory pool.
@note The specified memory pool may be from a device different than that of the specified @p stream.
Basic stream ordering allows future work submitted into the same stream to use the allocation. Stream query, stream synchronize, and HIP events can be used to guarantee that the allocation operation completes before work submitted in a separate stream runs.
@note During stream capture, this function results in the creation of an allocation node. In this case, the allocation is owned by the graph instead of the memory pool. The memory pool’s properties are used to set the node’s creation parameters.
@param [out] dev_ptr Returned device pointer @param [in] size Number of bytes to allocate @param [in] mem_pool The pool to allocate from @param [in] stream The stream establishing the stream ordering semantic
@returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory
@see hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolCreate hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess,
@warning : This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.
@note This API is implemented on Linux, under development on Windows.