cubecl_hip_sys

Function hipSetDeviceFlags

Source
pub unsafe extern "C" fn hipSetDeviceFlags(
    flags: c_uint,
) -> hipError_t
Expand description

@brief The current device behavior is changed according the flags passed.

@param [in] flags Flag to set on the current device

The schedule flags impact how HIP waits for the completion of a command running on a device. hipDeviceScheduleSpin : HIP runtime will actively spin in the thread which submitted the work until the command completes. This offers the lowest latency, but will consume a CPU core and may increase power. hipDeviceScheduleYield : The HIP runtime will yield the CPU to system so that other tasks can use it. This may increase latency to detect the completion but will consume less power and is friendlier to other tasks in the system. hipDeviceScheduleBlockingSync : On ROCm platform, this is a synonym for hipDeviceScheduleYield. hipDeviceScheduleAuto : Use a hueristic to select between Spin and Yield modes. If the number of HIP contexts is greater than the number of logical processors in the system, use Spin scheduling. Else use Yield scheduling.

hipDeviceMapHost : Allow mapping host memory. On ROCM, this is always allowed and the flag is ignored. hipDeviceLmemResizeToMax : @warning ROCm silently ignores this flag.

@returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorSetOnActiveProcess