cubecl_hip_sys

Function hipFreeAsync

Source
pub unsafe extern "C" fn hipFreeAsync(
    dev_ptr: *mut c_void,
    stream: hipStream_t,
) -> hipError_t
Expand description

@brief Frees memory with stream ordered semantics

Inserts a free operation into @p stream. The allocation must not be used after stream execution reaches the free. After this API returns, accessing the memory from any subsequent work launched on the GPU or querying its pointer attributes results in undefined behavior.

@note During stream capture, this function results in the creation of a free node and must therefore be passed the address of a graph allocation.

@param [in] dev_ptr Pointer to device memory to free @param [in] stream The stream, where the destruciton will occur according to the execution order

@returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported

@see hipMallocFromPoolAsync, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute, 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.