|
HIP: Heterogenous-computing Interface for Portability
|
|
Functions | |
| HIP_PUBLIC_API hipError_t | hipExtModuleLaunchKernel (hipFunction_t f, uint32_t globalWorkSizeX, uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, uint32_t localWorkSizeX, uint32_t localWorkSizeY, uint32_t localWorkSizeZ, size_t sharedMemBytes, hipStream_t hStream, void **kernelParams, void **extra, hipEvent_t startEvent=nullptr, hipEvent_t stopEvent=nullptr, uint32_t flags=0) |
| Launches kernel with parameters and shared memory on stream with arguments passed to kernel params or extra arguments. More... | |
| HIP_PUBLIC_API hipError_t | hipHccModuleLaunchKernel (hipFunction_t f, uint32_t globalWorkSizeX, uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, uint32_t localWorkSizeX, uint32_t localWorkSizeY, uint32_t localWorkSizeZ, size_t sharedMemBytes, hipStream_t hStream, void **kernelParams, void **extra, hipEvent_t startEvent=nullptr, hipEvent_t stopEvent=nullptr) __attribute__((deprecated("use hipExtModuleLaunchKernel instead"))) |
| This HIP API is deprecated, please use hipExtModuleLaunchKernel() instead. | |
| hipError_t | hipModuleLoad (hipModule_t *module, const char *fname) |
| Loads code object from file into a hipModule_t. More... | |
| hipError_t | hipModuleUnload (hipModule_t module) |
| Frees the module. More... | |
| hipError_t | hipModuleGetFunction (hipFunction_t *function, hipModule_t module, const char *kname) |
| Function with kname will be extracted if present in module. More... | |
| hipError_t | hipFuncGetAttributes (struct hipFuncAttributes *attr, const void *func) |
| Find out attributes for a given function. More... | |
| hipError_t | hipFuncGetAttribute (int *value, hipFunction_attribute attrib, hipFunction_t hfunc) |
| Find out a specific attribute for a given function. More... | |
| hipError_t | hipModuleGetTexRef (textureReference **texRef, hipModule_t hmod, const char *name) |
| returns the handle of the texture reference with the name from the module. More... | |
| hipError_t | hipModuleLoadData (hipModule_t *module, const void *image) |
| builds module from code object which resides in host memory. Image is pointer to that location. More... | |
| hipError_t | hipModuleLoadDataEx (hipModule_t *module, const void *image, unsigned int numOptions, hipJitOption *options, void **optionValues) |
| builds module from code object which resides in host memory. Image is pointer to that location. Options are not used. hipModuleLoadData is called. More... | |
| hipError_t | hipModuleLaunchKernel (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, void **extra) |
| launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelparams or extra More... | |
| 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 More... | |
| 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. More... | |
| 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 More... | |
| 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. More... | |
| hipError_t | hipExtLaunchMultiKernelMultiDevice (hipLaunchParams *launchParamsList, int numDevices, unsigned int flags) |
| Launches kernels on multiple devices and guarantees all specified kernels are dispatched on respective streams before enqueuing any other work on the specified streams from any other threads. More... | |
This section describes the module management functions of HIP runtime API.
| hipError_t hipExtLaunchMultiKernelMultiDevice | ( | hipLaunchParams * | launchParamsList, |
| int | numDevices, | ||
| unsigned int | flags | ||
| ) |
Launches kernels on multiple devices and guarantees all specified kernels are dispatched on respective streams before enqueuing any other work on the specified streams from any other threads.
| [in] | hipLaunchParams | List of launch parameters, one per device. |
| [in] | numDevices | Size of the launchParamsList array. |
| [in] | flags | Flags to control launch behavior. |
| HIP_PUBLIC_API hipError_t hipExtModuleLaunchKernel | ( | hipFunction_t | f, |
| uint32_t | globalWorkSizeX, | ||
| uint32_t | globalWorkSizeY, | ||
| uint32_t | globalWorkSizeZ, | ||
| uint32_t | localWorkSizeX, | ||
| uint32_t | localWorkSizeY, | ||
| uint32_t | localWorkSizeZ, | ||
| size_t | sharedMemBytes, | ||
| hipStream_t | hStream, | ||
| void ** | kernelParams, | ||
| void ** | extra, | ||
| hipEvent_t | startEvent = nullptr, |
||
| hipEvent_t | stopEvent = nullptr, |
||
| uint32_t | flags = 0 |
||
| ) |
Launches kernel with parameters and shared memory on stream with arguments passed to kernel params or extra arguments.
| [in] | f | Kernel to launch. |
| [in] | gridDimX | X grid dimension specified in work-items. |
| [in] | gridDimY | Y grid dimension specified in work-items. |
| [in] | gridDimZ | Z grid dimension specified in work-items. |
| [in] | blockDimX | X block dimension specified in work-items. |
| [in] | blockDimY | Y grid dimension specified in work-items. |
| [in] | blockDimZ | Z grid dimension specified in work-items. |
| [in] | sharedMemBytes | Amount of dynamic shared memory to allocate for this kernel. 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 | pointer to kernel parameters. |
| [in] | extra | Pointer to kernel arguments. These are passed directly to the kernel and must be in the memory layout and alignment expected by the kernel. |
| [in] | startEvent | If non-null, specified event will be updated to track the start time of the kernel launch. The event must be created before calling this API. |
| [in] | stopEvent | If non-null, specified event will be updated to track the stop time of the kernel launch. The event must be created before calling this API. |
| [in] | flags. | The value of hipExtAnyOrderLaunch, signifies if kernel can be launched in any order. |
| hipError_t hipFuncGetAttribute | ( | int * | value, |
| hipFunction_attribute | attrib, | ||
| hipFunction_t | hfunc | ||
| ) |
Find out a specific attribute for a given function.
| [out] | value | |
| [in] | attrib | |
| [in] | hfunc |
| hipError_t hipFuncGetAttributes | ( | struct hipFuncAttributes * | attr, |
| const void * | func | ||
| ) |
Find out attributes for a given function.
| [out] | attr | |
| [in] | func |
| 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
| [in] | f | Kernel 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 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 x blockDim >= 2^32.
| 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.
| [in] | launchParamsList | List of launch parameters, one per device. |
| [in] | numDevices | Size of the launchParamsList array. |
| [in] | flags | Flags to control launch behavior. |
| hipError_t hipModuleGetFunction | ( | hipFunction_t * | function, |
| hipModule_t | module, | ||
| const char * | kname | ||
| ) |
Function with kname will be extracted if present in module.
| [in] | module | |
| [in] | kname | |
| [out] | function |
| hipError_t hipModuleGetTexRef | ( | textureReference ** | texRef, |
| hipModule_t | hmod, | ||
| const char * | name | ||
| ) |
returns the handle of the texture reference with the name from the module.
| [in] | hmod | |
| [in] | name | |
| [out] | texRef |
| 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
| [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 x blockDim >= 2^32.
| 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.
| [in] | launchParamsList | List of launch parameters, one per device. |
| [in] | numDevices | Size of the launchParamsList array. |
| [in] | flags | Flags to control launch behavior. |
| hipError_t hipModuleLaunchKernel | ( | 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, | ||
| void ** | extra | ||
| ) |
launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelparams or extra
| [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 dimensions specified in work-items |
| [in] | blockDimY | Y grid dimension specified in work-items |
| [in] | blockDimZ | Z grid 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 th default stream is used with associated synchronization rules. |
| [in] | kernelParams | |
| [in] | extra | Pointer to kernel arguments. These are passed directly to the kernel and must be in the memory layout and alignment expected by the kernel. |
Please note, HIP does not support kernel launch with total work items defined in dimension with size gridDim x blockDim >= 2^32. So gridDim.x * blockDim.x, gridDim.y * blockDim.y and gridDim.z * blockDim.z are always less than 2^32.
| hipError_t hipModuleLoad | ( | hipModule_t * | module, |
| const char * | fname | ||
| ) |
Loads code object from file into a hipModule_t.
| [in] | fname | |
| [out] | module |
| hipError_t hipModuleLoadData | ( | hipModule_t * | module, |
| const void * | image | ||
| ) |
builds module from code object which resides in host memory. Image is pointer to that location.
| [in] | image | |
| [out] | module |
| hipError_t hipModuleLoadDataEx | ( | hipModule_t * | module, |
| const void * | image, | ||
| unsigned int | numOptions, | ||
| hipJitOption * | options, | ||
| void ** | optionValues | ||
| ) |
builds module from code object which resides in host memory. Image is pointer to that location. Options are not used. hipModuleLoadData is called.
| [in] | image | |
| [out] | module | |
| [in] | number | of options |
| [in] | options | for JIT |
| [in] | option | values for JIT |
| hipError_t hipModuleUnload | ( | hipModule_t | module | ) |
Frees the module.
| [in] | module |
1.8.11