cubecl_hip_sys

Function hipModuleOccupancyMaxPotentialBlockSizeWithFlags

Source
pub unsafe extern "C" fn hipModuleOccupancyMaxPotentialBlockSizeWithFlags(
    gridSize: *mut c_int,
    blockSize: *mut c_int,
    f: hipFunction_t,
    dynSharedMemPerBlk: usize,
    blockSizeLimit: c_int,
    flags: c_uint,
) -> hipError_t
Expand description

@brief determine the grid and block sizes to achieves maximum occupancy for a kernel

@param [out] gridSize minimum grid size for maximum potential occupancy @param [out] blockSize block size for maximum potential occupancy @param [in] f kernel function for which occupancy is calulated @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block @param [in] blockSizeLimit the maximum block size for the kernel, use 0 for no limit @param [in] flags Extra flags for occupancy calculation (only default supported)

Please note, HIP does not support kernel launch with total work items defined in dimension with size gridDim x blockDim >= 2^32.

@returns #hipSuccess, #hipErrorInvalidValue