Occupancy

Occupancy#

HIPFORT API Reference: Occupancy
Occupancy

determine the grid and block sizes to achieves maximum occupancy for a kernel More...

Data Types

interface  hipfort::hipoccupancyavailabledynamicsmemperblock
 Returns dynamic shared memory available per block when launching numBlocks blocks on SM. More...
 

Detailed Description

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

----------------------------------------------------------------------------------------------—

This section describes the occupancy functions of HIP runtime API.

Parameters
[out]gridSizeminimum grid size for maximum potential occupancy
[out]blockSizeblock size for maximum potential occupancy
[in]fkernel function for which occupancy is calulated
[in]dynSharedMemPerBlkdynamic shared memory usage (in bytes) intended for each block
[in]blockSizeLimitthe maximum block size for the kernel, use 0 for no limit

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