Execution Control#
Collaboration diagram for Execution Control:
Functions | |
hipError_t | hipFuncSetAttribute (const void *func, hipFuncAttribute attr, int value) |
Set attribute for a specific function. | |
hipError_t | hipFuncSetCacheConfig (const void *func, hipFuncCache_t config) |
Set Cache configuration for a specific function. | |
hipError_t | hipFuncSetSharedMemConfig (const void *func, hipSharedMemConfig config) |
Set shared memory configuation for a specific function. | |
template<class T > | |
hipError_t | hipLaunchCooperativeKernel (T f, dim3 gridDim, dim3 blockDim, void **kernelParams, unsigned int sharedMemBytes, hipStream_t stream) |
Launches a device function. | |
template<class T > | |
hipError_t | hipLaunchCooperativeKernelMultiDevice (hipLaunchParams *launchParamsList, unsigned int numDevices, unsigned int flags=0) |
Launches kernel function on multiple devices, where thread blocks can cooperate and synchronize on execution. | |
Detailed Description
This section describes the execution control functions of HIP runtime API.
Function Documentation
◆ hipFuncSetAttribute()
hipError_t hipFuncSetAttribute | ( | const void * | func, |
hipFuncAttribute | attr, | ||
int | value | ||
) |
Set attribute for a specific function.
- Parameters
-
[in] func Pointer of the function [in] attr Attribute to set [in] value Value to set
Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.
◆ hipFuncSetCacheConfig()
hipError_t hipFuncSetCacheConfig | ( | const void * | func, |
hipFuncCache_t | config | ||
) |
Set Cache configuration for a specific function.
- Parameters
-
[in] func Pointer of the function. [in] config Configuration to set.
- Returns
- hipSuccess, hipErrorNotInitialized Note: AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.
◆ hipFuncSetSharedMemConfig()
hipError_t hipFuncSetSharedMemConfig | ( | const void * | func, |
hipSharedMemConfig | config | ||
) |
Set shared memory configuation for a specific function.
- Parameters
-
[in] func Pointer of the function [in] config Configuration
Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.
◆ hipLaunchCooperativeKernel()
template<class T >
|
inline |
Launches a device function.
- Template Parameters
-
T The type of the kernel function.
- Parameters
-
[in] f Kernel function to launch. [in] gridDim Grid dimensions specified as multiple of blockDim. [in] blockDim Block dimensions specified in work-items. [in] kernelParams A list of kernel arguments. [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The HIP-Clang compiler provides support for extern shared declarations. [in] stream Stream which on the kernel launched.
◆ hipLaunchCooperativeKernelMultiDevice()
template<class T >
|
inline |
Launches kernel function on multiple devices, where thread blocks can cooperate and synchronize on execution.
- Parameters
-
[in] launchParamsList List of kernel launch parameters, one per device. [in] numDevices Size of launchParamsList array. [in] flags Flag to handle launch behavior.