Cooperative groups kernel launch of Module management.#
Functions | |
hipError_t | hipModuleLaunchCooperativeKernel (hipFunction_t f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hipStream_t stream, void **kernelParams) |
launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelParams, where thread blocks can cooperate and synchronize as they execute | |
hipError_t | hipModuleLaunchCooperativeKernelMultiDevice (hipFunctionLaunchParams *launchParamsList, unsigned int numDevices, unsigned int flags) |
Launches kernels on multiple devices where thread blocks can cooperate and synchronize as they execute. | |
hipError_t | hipLaunchCooperativeKernel (const void *f, dim3 gridDim, dim3 blockDimX, void **kernelParams, unsigned int sharedMemBytes, hipStream_t stream) |
Launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelparams or extra, where thread blocks can cooperate and synchronize as they execute. | |
hipError_t | hipLaunchCooperativeKernelMultiDevice (hipLaunchParams *launchParamsList, int numDevices, unsigned int flags) |
Launches kernels on multiple devices where thread blocks can cooperate and synchronize as they execute. | |
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
Function Documentation
◆ hipLaunchCooperativeKernel() [1/2]
hipError_t hipLaunchCooperativeKernel | ( | const void * | f, |
dim3 | gridDim, | ||
dim3 | blockDimX, | ||
void ** | kernelParams, | ||
unsigned int | sharedMemBytes, | ||
hipStream_t | stream | ||
) |
Launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelparams or extra, where thread blocks can cooperate and synchronize as they execute.
- Parameters
-
[in] f Kernel to launch. [in] gridDim Grid dimensions specified as multiple of blockDim. [in] blockDimX 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 where the kernel should be dispatched. May be 0, in which case th default stream is used with associated synchronization rules.
Please note, HIP does not support kernel launch with total work items defined in dimension with size \( gridDim \cdot blockDim \geq 2^{32} \).
◆ hipLaunchCooperativeKernel() [2/2]
|
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() [1/2]
hipError_t hipLaunchCooperativeKernelMultiDevice | ( | hipLaunchParams * | launchParamsList, |
int | numDevices, | ||
unsigned int | flags | ||
) |
Launches kernels on multiple devices where thread blocks can cooperate and synchronize as they execute.
- Parameters
-
[in] launchParamsList List of launch parameters, one per device. [in] numDevices Size of the launchParamsList array. [in] flags Flags to control launch behavior.
◆ hipLaunchCooperativeKernelMultiDevice() [2/2]
|
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.
◆ hipModuleLaunchCooperativeKernel()
hipError_t hipModuleLaunchCooperativeKernel | ( | hipFunction_t | f, |
unsigned int | gridDimX, | ||
unsigned int | gridDimY, | ||
unsigned int | gridDimZ, | ||
unsigned int | blockDimX, | ||
unsigned int | blockDimY, | ||
unsigned int | blockDimZ, | ||
unsigned int | sharedMemBytes, | ||
hipStream_t | stream, | ||
void ** | kernelParams | ||
) |
launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelParams, where thread blocks can cooperate and synchronize as they execute
- Parameters
-
[in] f Kernel to launch. [in] gridDimX X grid dimension specified as multiple of blockDimX. [in] gridDimY Y grid dimension specified as multiple of blockDimY. [in] gridDimZ Z grid dimension specified as multiple of blockDimZ. [in] blockDimX X block dimension specified in work-items. [in] blockDimY Y block dimension specified in work-items. [in] blockDimZ Z block dimension specified in work-items. [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 where the kernel should be dispatched. May be 0, in which case the default stream is used with associated synchronization rules. [in] kernelParams A list of kernel arguments.
Please note, HIP does not support kernel launch with total work items defined in dimension with size \( gridDim \cdot blockDim \geq 2^{32} \).
- Returns
- hipSuccess, hipErrorDeinitialized, hipErrorNotInitialized, hipErrorInvalidContext, hipErrorInvalidHandle, hipErrorInvalidImage, hipErrorInvalidValue, hipErrorInvalidConfiguration, hipErrorLaunchFailure, hipErrorLaunchOutOfResources, hipErrorLaunchTimeOut, hipErrorCooperativeLaunchTooLarge, hipErrorSharedObjectInitFailed
◆ hipModuleLaunchCooperativeKernelMultiDevice()
hipError_t hipModuleLaunchCooperativeKernelMultiDevice | ( | hipFunctionLaunchParams * | launchParamsList, |
unsigned int | numDevices, | ||
unsigned int | flags | ||
) |
Launches kernels on multiple devices where thread blocks can cooperate and synchronize as they execute.
- Parameters
-
[in] launchParamsList List of launch parameters, one per device. [in] numDevices Size of the launchParamsList array. [in] flags Flags to control launch behavior.
- Returns
- hipSuccess, hipErrorDeinitialized, hipErrorNotInitialized, hipErrorInvalidContext, hipErrorInvalidHandle, hipErrorInvalidImage, hipErrorInvalidValue, hipErrorInvalidConfiguration, hipErrorInvalidResourceHandle, hipErrorLaunchFailure, hipErrorLaunchOutOfResources, hipErrorLaunchTimeOut, hipErrorCooperativeLaunchTooLarge, hipErrorSharedObjectInitFailed