Cooperative groups kernel launch of Module management.

Cooperative groups kernel launch of Module management.#

HIP Runtime API Reference: Cooperative groups kernel launch of Module management.
Cooperative groups kernel launch of Module management.
Collaboration diagram for 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- Pointer of arguments passed to the kernel. If the kernel has multiple parameters, 'kernelParams' should be array of pointers, each points the corresponding argument.
[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} \).

Returns
hipSuccess, hipErrorNotInitialized, hipErrorInvalidValue, hipErrorCooperativeLaunchTooLarge

◆ hipLaunchCooperativeKernel() [2/2]

template<class T >
hipError_t hipLaunchCooperativeKernel ( f,
dim3  gridDim,
dim3  blockDim,
void **  kernelParams,
unsigned int  sharedMemBytes,
hipStream_t  stream 
)
inline

Launches a device function.

Template Parameters
TThe type of the kernel function.
Parameters
[in]fKernel function to launch.
[in]gridDimGrid dimensions specified as multiple of blockDim.
[in]blockDimBlock dimensions specified in work-items.
[in]kernelParamsA list of kernel arguments.
[in]sharedMemBytesAmount of dynamic shared memory to allocate for this kernel. The HIP-Clang compiler provides support for extern shared declarations.
[in]streamStream which on the kernel launched.
Returns
hipSuccess, hipErrorLaunchFailure, hipErrorInvalidValue, hipErrorInvalidResourceHandle

◆ 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]launchParamsListList of launch parameters, one per device.
[in]numDevicesSize of the launchParamsList array.
[in]flagsFlags to control launch behavior.
Returns
hipSuccess, hipErrorNotInitialized, hipErrorInvalidValue, hipErrorCooperativeLaunchTooLarge

◆ hipLaunchCooperativeKernelMultiDevice() [2/2]

template<class T >
hipError_t hipLaunchCooperativeKernelMultiDevice ( hipLaunchParams launchParamsList,
unsigned int  numDevices,
unsigned int  flags = 0 
)
inline

Launches kernel function on multiple devices, where thread blocks can cooperate and synchronize on execution.

Parameters
[in]launchParamsListList of kernel launch parameters, one per device.
[in]numDevicesSize of launchParamsList array.
[in]flagsFlag to handle launch behavior.
Returns
hipSuccess, hipErrorLaunchFailure, hipErrorInvalidValue, hipErrorInvalidResourceHandle

◆ 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]fKernel to launch.
[in]gridDimXX grid dimension specified as multiple of blockDimX.
[in]gridDimYY grid dimension specified as multiple of blockDimY.
[in]gridDimZZ grid dimension specified as multiple of blockDimZ.
[in]blockDimXX block dimension specified in work-items.
[in]blockDimYY block dimension specified in work-items.
[in]blockDimZZ block dimension specified in work-items.
[in]sharedMemBytesAmount of dynamic shared memory to allocate for this kernel. The HIP-Clang compiler provides support for extern shared declarations.
[in]streamStream where the kernel should be dispatched. May be 0, in which case the default stream is used with associated synchronization rules.
[in]kernelParamsA 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]launchParamsListList of launch parameters, one per device.
[in]numDevicesSize of the launchParamsList array.
[in]flagsFlags to control launch behavior.
Returns
hipSuccess, hipErrorDeinitialized, hipErrorNotInitialized, hipErrorInvalidContext, hipErrorInvalidHandle, hipErrorInvalidImage, hipErrorInvalidValue, hipErrorInvalidConfiguration, hipErrorInvalidResourceHandle, hipErrorLaunchFailure, hipErrorLaunchOutOfResources, hipErrorLaunchTimeOut, hipErrorCooperativeLaunchTooLarge, hipErrorSharedObjectInitFailed