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 int *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 | 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 | 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 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 int * | 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 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 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 hipRuntimeGetVersion | ( | int * | runtimeVersion | ) |
Returns the approximate HIP Runtime version.
[out] | runtimeVersion |