cubecl_hip_sys

Function hipDeviceSetMemPool

Source
pub unsafe extern "C" fn hipDeviceSetMemPool(
    device: c_int,
    mem_pool: hipMemPool_t,
) -> hipError_t
Expand description

@brief Sets the current memory pool of a device

The memory pool must be local to the specified device. @p hipMallocAsync allocates from the current mempool of the provided stream’s device. By default, a device’s current memory pool is its default memory pool.

@note Use @p hipMallocFromPoolAsync for asynchronous memory allocations from a device different than the one the stream runs on.

@param [in] device Device index for the update @param [in] mem_pool Memory pool for update as the current on the specified device

@returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDevice, #hipErrorNotSupported

@see hipDeviceGetDefaultMemPool, 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.