HIP: Heterogenous-computing Interface for Portability
|
Modules | |
Management | |
Functions | |
hipError_t | hipInit (unsigned int flags) |
Explicitly initializes the HIP runtime. More... | |
hipError_t | hipDeviceGet (hipDevice_t *device, int ordinal) |
Returns a handle to a compute device. More... | |
hipError_t | hipDeviceComputeCapability (int *major, int *minor, hipDevice_t device) |
Returns the compute capability of the device. More... | |
hipError_t | hipDeviceGetName (char *name, int len, hipDevice_t device) |
Returns an identifer string for the device. More... | |
hipError_t | hipDeviceGetPCIBusId (char *pciBusId, int len, int device) |
Returns a PCI Bus Id string for the device, overloaded to take int device ID. More... | |
hipError_t | hipDeviceGetByPCIBusId (int *device, const char *pciBusId) |
Returns a handle to a compute device. More... | |
hipError_t | hipDeviceTotalMem (size_t *bytes, hipDevice_t device) |
Returns the total amount of memory on the device. More... | |
hipError_t | hipDriverGetVersion (int *driverVersion) |
Returns the approximate HIP driver version. More... | |
hipError_t | hipRuntimeGetVersion (int *runtimeVersion) |
Returns the approximate HIP Runtime version. More... | |
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) |
hipError_t | hipModuleGetTexRef (textureReference **texRef, hipModule_t hmod, const char *name) |
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 | 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 | hipOccupancyMaxPotentialBlockSize (uint32_t *gridSize, uint32_t *blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, uint32_t blockSizeLimit) |
determine the grid and block sizes to achieves maximum occupancy for a kernel More... | |
hipError_t | hipOccupancyMaxActiveBlocksPerMultiprocessor (int *numBlocks, const void *f, int blockSize, size_t dynamicSMemSize) |
Returns occupancy for a device function. More... | |
hipError_t | hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags (int *numBlocks, const void *f, int blockSize, size_t dynamicSMemSize, unsigned int flags) |
Returns occupancy for a device function. 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... | |
hipError_t | hipModuleGetGlobal (hipDeviceptr_t *dptr, size_t *bytes, hipModule_t hmod, const char *name) |
returns device memory pointer and size of the kernel present in the module with symbol name More... | |
hipError_t hipDeviceComputeCapability | ( | int * | major, |
int * | minor, | ||
hipDevice_t | device | ||
) |
Returns the compute capability of the device.
[out] | major | |
[out] | minor | |
[in] | device |
hipError_t hipDeviceGet | ( | hipDevice_t * | device, |
int | ordinal | ||
) |
Returns a handle to a compute device.
[out] | device | |
[in] | ordinal |
hipError_t hipDeviceGetByPCIBusId | ( | int * | device, |
const char * | pciBusId | ||
) |
Returns a handle to a compute device.
[out] | device | handle |
[in] | PCI | Bus ID |
hipError_t hipDeviceGetName | ( | char * | name, |
int | len, | ||
hipDevice_t | device | ||
) |
Returns an identifer string for the device.
[out] | name | |
[in] | len | |
[in] | device |
hipError_t hipDeviceGetPCIBusId | ( | char * | pciBusId, |
int | len, | ||
int | device | ||
) |
Returns a PCI Bus Id string for the device, overloaded to take int device ID.
[out] | pciBusId | |
[in] | len | |
[in] | device |
hipError_t hipDeviceTotalMem | ( | size_t * | bytes, |
hipDevice_t | device | ||
) |
Returns the total amount of memory on the device.
[out] | bytes | |
[in] | device |
hipError_t hipDriverGetVersion | ( | int * | driverVersion | ) |
Returns the approximate HIP driver version.
[out] | driverVersion |
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. |
hipError_t hipFuncGetAttributes | ( | struct hipFuncAttributes * | attr, |
const void * | func | ||
) |
Find out attributes for a given function.
[out] | attr | |
[in] | func |
hipError_t hipInit | ( | unsigned int | flags | ) |
Explicitly initializes the HIP runtime.
Most HIP APIs implicitly initialize the HIP runtime. This API provides control over the timing of the initialization.
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 kernel can access this with HIP_DYNAMIC_SHARED. |
[in] | stream | Stream where the kernel should be dispatched. May be 0, in which case th default stream is used with associated synchronization rules. |
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] | hipLaunchParams | 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 hipModuleGetGlobal | ( | hipDeviceptr_t * | dptr, |
size_t * | bytes, | ||
hipModule_t | hmod, | ||
const char * | name | ||
) |
returns device memory pointer and size of the kernel present in the module with symbol name
[out] | dptr | |
[out] | bytes | |
[in] | hmod | |
[in] | name |
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 kernel can access this with HIP_DYNAMIC_SHARED. |
[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. |
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 |
hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor | ( | int * | numBlocks, |
const void * | f, | ||
int | blockSize, | ||
size_t | dynamicSMemSize | ||
) |
Returns occupancy for a device function.
[out] | numBlocks | Returned occupancy |
[in] | func | Kernel function for which occupancy is calulated |
[in] | blockSize | Block size the kernel is intended to be launched with |
[in] | dynamicSMemSize | Per - block dynamic shared memory usage intended, in bytes |
hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags | ( | int * | numBlocks, |
const void * | f, | ||
int | blockSize, | ||
size_t | dynamicSMemSize, | ||
unsigned int | flags | ||
) |
Returns occupancy for a device function.
[out] | numBlocks | Returned occupancy |
[in] | func | Kernel function for which occupancy is calulated |
[in] | blockSize | Block size the kernel is intended to be launched with |
[in] | dynamicSMemSize | Per - block dynamic shared memory usage intended, in bytes |
[in] | flags | Extra flags for occupancy calculation (currently ignored) |
hipError_t hipOccupancyMaxPotentialBlockSize | ( | uint32_t * | gridSize, |
uint32_t * | blockSize, | ||
hipFunction_t | f, | ||
size_t | dynSharedMemPerBlk, | ||
uint32_t | blockSizeLimit | ||
) |
determine the grid and block sizes to achieves maximum occupancy for a kernel
[out] | gridSize | minimum grid size for maximum potential occupancy |
[out] | blockSize | block size for maximum potential occupancy |
[in] | f | kernel to launch |
[in] | dynSharedMemPerBlk | dynamic shared memory usage (in bytes) intended for each block |
[in] | blockSizeLimit | the maximum block size for the kernel, use 0 for no limit |
hipError_t hipRuntimeGetVersion | ( | int * | runtimeVersion | ) |
Returns the approximate HIP Runtime version.
[out] | runtimeVersion |