HIP: Heterogenous-computing Interface for Portability
|
Contains C function APIs for HIP runtime. This file does not use any HCC builtin or special language extensions (-hc mode) ; those functions in hip_runtime.h. More...
#include <stdint.h>
#include <stddef.h>
#include <hip/hcc_detail/host_defines.h>
#include <hip/hcc_detail/driver_types.h>
#include <hip/hcc_detail/hip_texture_types.h>
#include <hip/hcc_detail/hip_surface_types.h>
Go to the source code of this file.
Classes | |
struct | hipIpcMemHandle_st |
struct | hipIpcEventHandle_st |
struct | hipFuncAttributes |
struct | dim3 |
struct | hipLaunchParams_t |
Macros | |
#define | GENERIC_GRID_LAUNCH 1 |
#define | __HIP_ROCclr__ 0 |
#define | DEPRECATED(msg) __attribute__ ((deprecated(msg))) |
#define | DEPRECATED_MSG "This API is marked as deprecated and may not be supported in future releases. For more details please refer https://github.com/ROCm-Developer-Tools/HIP/blob/master/docs/markdown/hip_deprecated_api_list.md" |
#define | HIP_LAUNCH_PARAM_BUFFER_POINTER ((void*)0x01) |
#define | HIP_LAUNCH_PARAM_BUFFER_SIZE ((void*)0x02) |
#define | HIP_LAUNCH_PARAM_END ((void*)0x03) |
#define | __dparm(x) |
#define | hipIpcMemLazyEnablePeerAccess 0 |
#define | HIP_IPC_HANDLE_SIZE 64 |
#define | hipStreamDefault 0x00 |
Flags that can be used with hipStreamCreateWithFlags. More... | |
#define | hipStreamNonBlocking 0x01 |
Stream does not implicitly synchronize with null stream. | |
#define | hipEventDefault 0x0 |
Flags that can be used with hipEventCreateWithFlags: More... | |
#define | hipEventBlockingSync 0x1 |
Waiting will yield CPU. Power-friendly and usage-friendly but may increase latency. | |
#define | hipEventDisableTiming 0x2 |
Disable event's capability to record timing information. May improve performance. | |
#define | hipEventInterprocess 0x4 |
Event can support IPC. More... | |
#define | hipEventReleaseToDevice 0x40000000 |
#define | hipEventReleaseToSystem 0x80000000 |
#define | hipHostMallocDefault 0x0 |
Flags that can be used with hipHostMalloc. More... | |
#define | hipHostMallocPortable 0x1 |
Memory is considered allocated by all contexts. | |
#define | hipHostMallocMapped 0x2 |
can be obtained with hipHostGetDevicePointer. More... | |
#define | hipHostMallocWriteCombined 0x4 |
#define | hipHostMallocNumaUser 0x20000000 |
Host memory allocation will follow numa policy set by user. | |
#define | hipHostMallocCoherent 0x40000000 |
allocation. More... | |
#define | hipHostMallocNonCoherent 0x80000000 |
allocation. More... | |
#define | hipMemAttachGlobal 0x01 |
Memory can be accessed by any stream on any device. | |
#define | hipMemAttachHost 0x02 |
Memory cannot be accessed by any stream on any device. | |
#define | hipMemAttachSingle 0x04 |
the associated device More... | |
#define | hipDeviceMallocDefault 0x0 |
#define | hipDeviceMallocFinegrained 0x1 |
Memory is allocated in fine grained region of device. | |
#define | hipHostRegisterDefault 0x0 |
Flags that can be used with hipHostRegister. More... | |
#define | hipHostRegisterPortable 0x1 |
Memory is considered registered by all contexts. | |
#define | hipHostRegisterMapped 0x2 |
can be obtained with hipHostGetDevicePointer. More... | |
#define | hipHostRegisterIoMemory 0x4 |
Not supported. | |
#define | hipExtHostRegisterCoarseGrained 0x8 |
Coarse Grained host memory lock. | |
#define | hipDeviceScheduleAuto 0x0 |
Automatically select between Spin and Yield. | |
#define | hipDeviceScheduleSpin 0x1 |
may consume more power. More... | |
#define | hipDeviceScheduleYield 0x2 |
power and is friendlier to other threads in the system. More... | |
#define | hipDeviceScheduleBlockingSync 0x4 |
#define | hipDeviceScheduleMask 0x7 |
#define | hipDeviceMapHost 0x8 |
#define | hipDeviceLmemResizeToMax 0x16 |
#define | hipArrayDefault 0x00 |
Default HIP array allocation flag. | |
#define | hipArrayLayered 0x01 |
#define | hipArraySurfaceLoadStore 0x02 |
#define | hipArrayCubemap 0x04 |
#define | hipArrayTextureGather 0x08 |
#define | hipOccupancyDefault 0x00 |
#define | hipCooperativeLaunchMultiDeviceNoPreSync 0x01 |
#define | hipCooperativeLaunchMultiDeviceNoPostSync 0x02 |
#define | hipCpuDeviceId ((int)-1) |
#define | hipInvalidDeviceId ((int)-2) |
#define | hipExtAnyOrderLaunch 0x01 |
AnyOrderLaunch of kernels. | |
#define | USE_PEER_NON_UNIFIED 1 |
Typedefs | |
typedef struct ihipCtx_t * | hipCtx_t |
typedef int | hipDevice_t |
typedef enum hipDeviceP2PAttr | hipDeviceP2PAttr |
typedef struct ihipStream_t * | hipStream_t |
typedef struct hipIpcMemHandle_st | hipIpcMemHandle_t |
typedef struct hipIpcEventHandle_st | hipIpcEventHandle_t |
typedef struct ihipModule_t * | hipModule_t |
typedef struct ihipModuleSymbol_t * | hipFunction_t |
typedef struct hipFuncAttributes | hipFuncAttributes |
typedef struct ihipEvent_t * | hipEvent_t |
typedef enum hipMemoryAdvise | hipMemoryAdvise |
typedef enum hipMemRangeAttribute | hipMemRangeAttribute |
typedef enum hipJitOption | hipJitOption |
typedef enum hipFuncAttribute | hipFuncAttribute |
typedef enum hipFuncCache_t | hipFuncCache_t |
typedef enum hipSharedMemConfig | hipSharedMemConfig |
typedef struct dim3 | dim3 |
typedef struct hipLaunchParams_t | hipLaunchParams |
typedef void(* | hipStreamCallback_t) (hipStream_t stream, hipError_t status, void *userData) |
Enumerations | |
enum | hipDeviceP2PAttr { hipDevP2PAttrPerformanceRank = 0, hipDevP2PAttrAccessSupported, hipDevP2PAttrNativeAtomicSupported, hipDevP2PAttrHipArrayAccessSupported } |
enum | hipLimit_t { hipLimitMallocHeapSize = 0x02 } |
enum | hipMemoryAdvise { hipMemAdviseSetReadMostly = 1, hipMemAdviseUnsetReadMostly = 2, hipMemAdviseSetPreferredLocation = 3, hipMemAdviseUnsetPreferredLocation = 4, hipMemAdviseSetAccessedBy = 5, hipMemAdviseUnsetAccessedBy = 6 } |
enum | hipMemRangeAttribute { hipMemRangeAttributeReadMostly = 1, hipMemRangeAttributePreferredLocation = 2, hipMemRangeAttributeAccessedBy = 3, hipMemRangeAttributeLastPrefetchLocation = 4 } |
enum | hipJitOption { hipJitOptionMaxRegisters = 0, hipJitOptionThreadsPerBlock, hipJitOptionWallTime, hipJitOptionInfoLogBuffer, hipJitOptionInfoLogBufferSizeBytes, hipJitOptionErrorLogBuffer, hipJitOptionErrorLogBufferSizeBytes, hipJitOptionOptimizationLevel, hipJitOptionTargetFromContext, hipJitOptionTarget, hipJitOptionFallbackStrategy, hipJitOptionGenerateDebugInfo, hipJitOptionLogVerbose, hipJitOptionGenerateLineInfo, hipJitOptionCacheMode, hipJitOptionSm3xOpt, hipJitOptionFastCompile, hipJitOptionNumOptions } |
enum | hipFuncAttribute { hipFuncAttributeMaxDynamicSharedMemorySize = 8, hipFuncAttributePreferredSharedMemoryCarveout = 9, hipFuncAttributeMax } |
enum | hipFuncCache_t { hipFuncCachePreferNone, hipFuncCachePreferShared, hipFuncCachePreferL1, hipFuncCachePreferEqual } |
enum | hipSharedMemConfig { hipSharedMemBankSizeDefault, hipSharedMemBankSizeFourByte, hipSharedMemBankSizeEightByte } |
Functions | |
hipError_t | hipDeviceSynchronize (void) |
Waits on all active streams on current device. More... | |
hipError_t | hipDeviceReset (void) |
The state of current device is discarded and updated to a fresh state. More... | |
hipError_t | hipSetDevice (int deviceId) |
Set default device to be used for subsequent hip API calls from this thread. More... | |
hipError_t | hipGetDevice (int *deviceId) |
Return the default device id for the calling host thread. More... | |
hipError_t | hipGetDeviceCount (int *count) |
Return number of compute-capable devices. More... | |
hipError_t | hipDeviceGetAttribute (int *pi, hipDeviceAttribute_t attr, int deviceId) |
Query for a specific device attribute. More... | |
hipError_t | hipGetDeviceProperties (hipDeviceProp_t *prop, int deviceId) |
Returns device properties. More... | |
hipError_t | hipDeviceSetCacheConfig (hipFuncCache_t cacheConfig) |
Set L1/Shared cache partition. More... | |
hipError_t | hipDeviceGetCacheConfig (hipFuncCache_t *cacheConfig) |
Set Cache configuration for a specific function. More... | |
hipError_t | hipDeviceGetLimit (size_t *pValue, enum hipLimit_t limit) |
Get Resource limits of current device. More... | |
hipError_t | hipFuncSetAttribute (const void *func, hipFuncAttribute attr, int value) |
Set attribute for a specific function. More... | |
hipError_t | hipFuncSetCacheConfig (const void *func, hipFuncCache_t config) |
Set Cache configuration for a specific function. More... | |
hipError_t | hipFuncSetSharedMemConfig (const void *func, hipSharedMemConfig config) |
Set shared memory configuation for a specific function. More... | |
hipError_t | hipDeviceGetSharedMemConfig (hipSharedMemConfig *pConfig) |
Returns bank width of shared memory for current device. More... | |
hipError_t | hipGetDeviceFlags (unsigned int *flags) |
Gets the flags set for current device. More... | |
hipError_t | hipDeviceSetSharedMemConfig (hipSharedMemConfig config) |
The bank width of shared memory on current device is set. More... | |
hipError_t | hipSetDeviceFlags (unsigned flags) |
The current device behavior is changed according the flags passed. More... | |
hipError_t | hipChooseDevice (int *device, const hipDeviceProp_t *prop) |
Device which matches hipDeviceProp_t is returned. More... | |
hipError_t | hipExtGetLinkTypeAndHopCount (int device1, int device2, uint32_t *linktype, uint32_t *hopcount) |
Returns the link type and hop count between two devices. More... | |
hipError_t | hipGetLastError (void) |
Return last error returned by any HIP runtime API call and resets the stored error code to hipSuccess. More... | |
hipError_t | hipPeekAtLastError (void) |
Return last error returned by any HIP runtime API call. More... | |
const char * | hipGetErrorName (hipError_t hip_error) |
Return name of the specified error code in text form. More... | |
const char * | hipGetErrorString (hipError_t hipError) |
Return handy text string message to explain the error which occurred. More... | |
hipError_t | hipStreamCreate (hipStream_t *stream) |
Create an asynchronous stream. More... | |
hipError_t | hipStreamCreateWithFlags (hipStream_t *stream, unsigned int flags) |
Create an asynchronous stream. More... | |
hipError_t | hipStreamCreateWithPriority (hipStream_t *stream, unsigned int flags, int priority) |
Create an asynchronous stream with the specified priority. More... | |
hipError_t | hipDeviceGetStreamPriorityRange (int *leastPriority, int *greatestPriority) |
Returns numerical values that correspond to the least and greatest stream priority. More... | |
hipError_t | hipStreamDestroy (hipStream_t stream) |
Destroys the specified stream. More... | |
hipError_t | hipStreamQuery (hipStream_t stream) |
Return hipSuccess if all of the operations in the specified stream have completed, or hipErrorNotReady if not. More... | |
hipError_t | hipStreamSynchronize (hipStream_t stream) |
Wait for all commands in stream to complete. More... | |
hipError_t | hipStreamWaitEvent (hipStream_t stream, hipEvent_t event, unsigned int flags) |
Make the specified compute stream wait for an event. More... | |
hipError_t | hipStreamGetFlags (hipStream_t stream, unsigned int *flags) |
Return flags associated with this stream. More... | |
hipError_t | hipStreamGetPriority (hipStream_t stream, int *priority) |
Query the priority of a stream. More... | |
hipError_t | hipExtStreamCreateWithCUMask (hipStream_t *stream, uint32_t cuMaskSize, const uint32_t *cuMask) |
Create an asynchronous stream with the specified CU mask. More... | |
hipError_t | hipStreamAddCallback (hipStream_t stream, hipStreamCallback_t callback, void *userData, unsigned int flags) |
Adds a callback to be called on the host after all currently enqueued items in the stream have completed. For each cudaStreamAddCallback call, a callback will be executed exactly once. The callback will block later work in the stream until it is finished. More... | |
hipError_t | hipEventCreateWithFlags (hipEvent_t *event, unsigned flags) |
Create an event with the specified flags. More... | |
hipError_t | hipEventCreate (hipEvent_t *event) |
hipError_t | hipEventRecord (hipEvent_t event, hipStream_t stream) |
Record an event in the specified stream. More... | |
hipError_t | hipEventDestroy (hipEvent_t event) |
Destroy the specified event. More... | |
hipError_t | hipEventSynchronize (hipEvent_t event) |
Wait for an event to complete. More... | |
hipError_t | hipEventElapsedTime (float *ms, hipEvent_t start, hipEvent_t stop) |
Return the elapsed time between two events. More... | |
hipError_t | hipEventQuery (hipEvent_t event) |
Query event status. More... | |
hipError_t | hipPointerGetAttributes (hipPointerAttribute_t *attributes, const void *ptr) |
Return attributes for the specified pointer. More... | |
hipError_t | hipMalloc (void **ptr, size_t size) |
Allocate memory on the default accelerator. More... | |
hipError_t | hipExtMallocWithFlags (void **ptr, size_t sizeBytes, unsigned int flags) |
Allocate memory on the default accelerator. More... | |
hipError_t | hipMallocHost (void **ptr, size_t size) |
Allocate pinned host memory [Deprecated]. More... | |
hipError_t | hipMemAllocHost (void **ptr, size_t size) |
Allocate pinned host memory [Deprecated]. More... | |
hipError_t | hipHostMalloc (void **ptr, size_t size, unsigned int flags) |
Allocate device accessible page locked host memory. More... | |
hipError_t | hipMallocManaged (void **dev_ptr, size_t size, unsigned int flags __dparm(hipMemAttachGlobal)) |
Allocates memory that will be automatically managed by AMD HMM. More... | |
hipError_t | hipHostAlloc (void **ptr, size_t size, unsigned int flags) |
Allocate device accessible page locked host memory [Deprecated]. More... | |
hipError_t | hipHostGetDevicePointer (void **devPtr, void *hstPtr, unsigned int flags) |
Get Device pointer from Host Pointer allocated through hipHostMalloc. More... | |
hipError_t | hipHostGetFlags (unsigned int *flagsPtr, void *hostPtr) |
Return flags associated with host pointer. More... | |
hipError_t | hipHostRegister (void *hostPtr, size_t sizeBytes, unsigned int flags) |
Register host memory so it can be accessed from the current device. More... | |
hipError_t | hipHostUnregister (void *hostPtr) |
Un-register host pointer. More... | |
hipError_t | hipMallocPitch (void **ptr, size_t *pitch, size_t width, size_t height) |
hipError_t | hipMemAllocPitch (hipDeviceptr_t *dptr, size_t *pitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes) |
hipError_t | hipFree (void *ptr) |
Free memory allocated by the hcc hip memory allocation API. This API performs an implicit hipDeviceSynchronize() call. If pointer is NULL, the hip runtime is initialized and hipSuccess is returned. More... | |
hipError_t | hipFreeHost (void *ptr) |
Free memory allocated by the hcc hip host memory allocation API. [Deprecated]. More... | |
hipError_t | hipHostFree (void *ptr) |
Free memory allocated by the hcc hip host memory allocation API This API performs an implicit hipDeviceSynchronize() call. If pointer is NULL, the hip runtime is initialized and hipSuccess is returned. More... | |
hipError_t | hipMemcpy (void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind) |
Copy data from src to dst. More... | |
hipError_t | hipMemcpyWithStream (void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream) |
hipError_t | hipMemcpyHtoD (hipDeviceptr_t dst, void *src, size_t sizeBytes) |
Copy data from Host to Device. More... | |
hipError_t | hipMemcpyDtoH (void *dst, hipDeviceptr_t src, size_t sizeBytes) |
Copy data from Device to Host. More... | |
hipError_t | hipMemcpyDtoD (hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes) |
Copy data from Device to Device. More... | |
hipError_t | hipMemcpyHtoDAsync (hipDeviceptr_t dst, void *src, size_t sizeBytes, hipStream_t stream) |
Copy data from Host to Device asynchronously. More... | |
hipError_t | hipMemcpyDtoHAsync (void *dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream) |
Copy data from Device to Host asynchronously. More... | |
hipError_t | hipMemcpyDtoDAsync (hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream) |
Copy data from Device to Device asynchronously. 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 | hipMemcpyAsync (void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream __dparm(0)) |
Copies sizeBytes bytes from the memory area pointed to by src to the memory area pointed to by offset bytes from the start of symbol symbol . More... | |
hipError_t | hipMemset (void *dst, int value, size_t sizeBytes) |
Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant byte value value. More... | |
hipError_t | hipMemsetD8 (hipDeviceptr_t dest, unsigned char value, size_t count) |
Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant byte value value. More... | |
hipError_t | hipMemsetD8Async (hipDeviceptr_t dest, unsigned char value, size_t count, hipStream_t stream __dparm(0)) |
Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant byte value value. More... | |
hipError_t | hipMemsetD16 (hipDeviceptr_t dest, unsigned short value, size_t count) |
Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant short value value. More... | |
hipError_t | hipMemsetD16Async (hipDeviceptr_t dest, unsigned short value, size_t count, hipStream_t stream __dparm(0)) |
Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant short value value. More... | |
hipError_t | hipMemsetD32 (hipDeviceptr_t dest, int value, size_t count) |
Fills the memory area pointed to by dest with the constant integer value for specified number of times. More... | |
hipError_t | hipMemsetAsync (void *dst, int value, size_t sizeBytes, hipStream_t stream __dparm(0)) |
Fills the first sizeBytes bytes of the memory area pointed to by dev with the constant byte value value. More... | |
hipError_t | hipMemsetD32Async (hipDeviceptr_t dst, int value, size_t count, hipStream_t stream __dparm(0)) |
Fills the memory area pointed to by dev with the constant integer value for specified number of times. More... | |
hipError_t | hipMemset2D (void *dst, size_t pitch, int value, size_t width, size_t height) |
Fills the memory area pointed to by dst with the constant value. More... | |
hipError_t | hipMemset2DAsync (void *dst, size_t pitch, int value, size_t width, size_t height, hipStream_t stream __dparm(0)) |
Fills asynchronously the memory area pointed to by dst with the constant value. More... | |
hipError_t | hipMemset3D (hipPitchedPtr pitchedDevPtr, int value, hipExtent extent) |
Fills synchronously the memory area pointed to by pitchedDevPtr with the constant value. More... | |
hipError_t | hipMemset3DAsync (hipPitchedPtr pitchedDevPtr, int value, hipExtent extent, hipStream_t stream __dparm(0)) |
Fills asynchronously the memory area pointed to by pitchedDevPtr with the constant value. More... | |
hipError_t | hipMemGetInfo (size_t *free, size_t *total) |
Query memory info. Return snapshot of free memory, and total allocatable memory on the device. More... | |
hipError_t | hipMemPtrGetInfo (void *ptr, size_t *size) |
hipError_t | hipMallocArray (hipArray **array, const hipChannelFormatDesc *desc, size_t width, size_t height __dparm(0), unsigned int flags __dparm(hipArrayDefault)) |
Allocate an array on the device. More... | |
hipError_t | hipArrayCreate (hipArray **pHandle, const HIP_ARRAY_DESCRIPTOR *pAllocateArray) |
hipError_t | hipArray3DCreate (hipArray **array, const HIP_ARRAY3D_DESCRIPTOR *pAllocateArray) |
hipError_t | hipMalloc3D (hipPitchedPtr *pitchedDevPtr, hipExtent extent) |
hipError_t | hipFreeArray (hipArray *array) |
Frees an array on the device. More... | |
hipError_t | hipFreeMipmappedArray (hipMipmappedArray_t mipmappedArray) |
Frees a mipmapped array on the device. More... | |
hipError_t | hipMalloc3DArray (hipArray **array, const struct hipChannelFormatDesc *desc, struct hipExtent extent, unsigned int flags) |
Allocate an array on the device. More... | |
hipError_t | hipMallocMipmappedArray (hipMipmappedArray_t *mipmappedArray, const struct hipChannelFormatDesc *desc, struct hipExtent extent, unsigned int numLevels, unsigned int flags __dparm(0)) |
Allocate a mipmapped array on the device. More... | |
hipError_t | hipGetMipmappedArrayLevel (hipArray_t *levelArray, hipMipmappedArray_const_t mipmappedArray, unsigned int level) |
Gets a mipmap level of a HIP mipmapped array. More... | |
hipError_t | hipMemcpy2D (void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind) |
Copies data between host and device. More... | |
hipError_t | hipMemcpyParam2D (const hip_Memcpy2D *pCopy) |
Copies memory for 2D arrays. More... | |
hipError_t | hipMemcpyParam2DAsync (const hip_Memcpy2D *pCopy, hipStream_t stream __dparm(0)) |
Copies memory for 2D arrays. More... | |
hipError_t | hipMemcpy2DAsync (void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream __dparm(0)) |
Copies data between host and device. More... | |
hipError_t | hipMemcpy2DToArray (hipArray *dst, size_t wOffset, size_t hOffset, const void *src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind) |
Copies data between host and device. More... | |
hipError_t | hipMemcpyToArray (hipArray *dst, size_t wOffset, size_t hOffset, const void *src, size_t count, hipMemcpyKind kind) |
Copies data between host and device. More... | |
hipError_t | hipMemcpyFromArray (void *dst, hipArray_const_t srcArray, size_t wOffset, size_t hOffset, size_t count, hipMemcpyKind kind) |
Copies data between host and device. More... | |
hipError_t | hipMemcpy2DFromArray (void *dst, size_t dpitch, hipArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, hipMemcpyKind kind) |
Copies data between host and device. More... | |
hipError_t | hipMemcpy2DFromArrayAsync (void *dst, size_t dpitch, hipArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream __dparm(0)) |
Copies data between host and device asynchronously. More... | |
hipError_t | hipMemcpyAtoH (void *dst, hipArray *srcArray, size_t srcOffset, size_t count) |
Copies data between host and device. More... | |
hipError_t | hipMemcpyHtoA (hipArray *dstArray, size_t dstOffset, const void *srcHost, size_t count) |
Copies data between host and device. More... | |
hipError_t | hipMemcpy3D (const struct hipMemcpy3DParms *p) |
Copies data between host and device. More... | |
hipError_t | hipMemcpy3DAsync (const struct hipMemcpy3DParms *p, hipStream_t stream __dparm(0)) |
Copies data between host and device asynchronously. More... | |
hipError_t | hipDrvMemcpy3D (const HIP_MEMCPY3D *pCopy) |
Copies data between host and device. More... | |
hipError_t | hipDrvMemcpy3DAsync (const HIP_MEMCPY3D *pCopy, hipStream_t stream) |
Copies data between host and device asynchronously. More... | |
hipError_t | hipDeviceCanAccessPeer (int *canAccessPeer, int deviceId, int peerDeviceId) |
Determine if a device can access a peer's memory. More... | |
hipError_t | hipDeviceEnablePeerAccess (int peerDeviceId, unsigned int flags) |
Enable direct access from current device's virtual address space to memory allocations physically located on a peer device. More... | |
hipError_t | hipDeviceDisablePeerAccess (int peerDeviceId) |
Disable direct access from current device's virtual address space to memory allocations physically located on a peer device. More... | |
hipError_t | hipMemGetAddressRange (hipDeviceptr_t *pbase, size_t *psize, hipDeviceptr_t dptr) |
Get information on memory allocations. More... | |
hipError_t | hipMemcpyPeer (void *dst, int dstDeviceId, const void *src, int srcDeviceId, size_t sizeBytes) |
Copies memory from one device to memory on another device. More... | |
hipError_t | hipMemcpyPeerAsync (void *dst, int dstDeviceId, const void *src, int srcDevice, size_t sizeBytes, hipStream_t stream __dparm(0)) |
Copies memory from one device to memory on another device. More... | |
hipError_t | hipInit (unsigned int flags) |
Explicitly initializes the HIP runtime. More... | |
hipError_t | hipCtxCreate (hipCtx_t *ctx, unsigned int flags, hipDevice_t device) |
Create a context and set it as current/ default context. More... | |
hipError_t | hipCtxDestroy (hipCtx_t ctx) |
Destroy a HIP context. More... | |
hipError_t | hipCtxPopCurrent (hipCtx_t *ctx) |
Pop the current/default context and return the popped context. More... | |
hipError_t | hipCtxPushCurrent (hipCtx_t ctx) |
Push the context to be set as current/ default context. More... | |
hipError_t | hipCtxSetCurrent (hipCtx_t ctx) |
Set the passed context as current/default. More... | |
hipError_t | hipCtxGetCurrent (hipCtx_t *ctx) |
Get the handle of the current/ default context. More... | |
hipError_t | hipCtxGetDevice (hipDevice_t *device) |
Get the handle of the device associated with current/default context. More... | |
hipError_t | hipCtxGetApiVersion (hipCtx_t ctx, int *apiVersion) |
Returns the approximate HIP api version. More... | |
hipError_t | hipCtxGetCacheConfig (hipFuncCache_t *cacheConfig) |
Set Cache configuration for a specific function. More... | |
hipError_t | hipCtxSetCacheConfig (hipFuncCache_t cacheConfig) |
Set L1/Shared cache partition. More... | |
hipError_t | hipCtxSetSharedMemConfig (hipSharedMemConfig config) |
Set Shared memory bank configuration. More... | |
hipError_t | hipCtxGetSharedMemConfig (hipSharedMemConfig *pConfig) |
Get Shared memory bank configuration. More... | |
hipError_t | hipCtxSynchronize (void) |
Blocks until the default context has completed all preceding requested tasks. More... | |
hipError_t | hipCtxGetFlags (unsigned int *flags) |
Return flags used for creating default context. More... | |
hipError_t | hipCtxEnablePeerAccess (hipCtx_t peerCtx, unsigned int flags) |
Enables direct access to memory allocations in a peer context. More... | |
hipError_t | hipCtxDisablePeerAccess (hipCtx_t peerCtx) |
Disable direct access from current context's virtual address space to memory allocations physically located on a peer context.Disables direct access to memory allocations in a peer context and unregisters any registered allocations. More... | |
hipError_t | hipDevicePrimaryCtxGetState (hipDevice_t dev, unsigned int *flags, int *active) |
Get the state of the primary context. More... | |
hipError_t | hipDevicePrimaryCtxRelease (hipDevice_t dev) |
Release the primary context on the GPU. More... | |
hipError_t | hipDevicePrimaryCtxRetain (hipCtx_t *pctx, hipDevice_t dev) |
Retain the primary context on the GPU. More... | |
hipError_t | hipDevicePrimaryCtxReset (hipDevice_t dev) |
Resets the primary context on the GPU. More... | |
hipError_t | hipDevicePrimaryCtxSetFlags (hipDevice_t dev, unsigned int flags) |
Set flags for the primary context. 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 | hipDeviceGetP2PAttribute (int *value, hipDeviceP2PAttr attr, int srcDevice, int dstDevice) |
Returns a value for attr of link between two devices. 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) |
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) |
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 | hipModuleOccupancyMaxPotentialBlockSize (int *gridSize, int *blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit) |
determine the grid and block sizes to achieves maximum occupancy for a kernel More... | |
hipError_t | hipModuleOccupancyMaxPotentialBlockSizeWithFlags (int *gridSize, int *blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit, unsigned int flags) |
determine the grid and block sizes to achieves maximum occupancy for a kernel More... | |
hipError_t | hipModuleOccupancyMaxActiveBlocksPerMultiprocessor (int *numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk) |
Returns occupancy for a device function. More... | |
hipError_t | hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags (int *numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags) |
Returns occupancy for a device function. More... | |
hipError_t | hipOccupancyMaxActiveBlocksPerMultiprocessor (int *numBlocks, const void *f, int blockSize, size_t dynSharedMemPerBlk) |
Returns occupancy for a device function. More... | |
hipError_t | hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags (int *numBlocks, const void *f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags __dparm(hipOccupancyDefault)) |
Returns occupancy for a device function. More... | |
hipError_t | hipOccupancyMaxPotentialBlockSize (int *gridSize, int *blockSize, const void *f, size_t dynSharedMemPerBlk, int blockSizeLimit) |
determine the grid and block sizes to achieves maximum occupancy for a kernel 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 | hipProfilerStart () |
Start recording of profiling information When using this API, start the profiler with profiling disabled. (–startdisabled) More... | |
hipError_t | hipProfilerStop () |
Stop recording of profiling information. When using this API, start the profiler with profiling disabled. (–startdisabled) More... | |
hipError_t | hipIpcGetMemHandle (hipIpcMemHandle_t *handle, void *devPtr) |
Gets an interprocess memory handle for an existing device memory allocation. More... | |
hipError_t | hipIpcOpenMemHandle (void **devPtr, hipIpcMemHandle_t handle, unsigned int flags) |
Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process. More... | |
hipError_t | hipIpcCloseMemHandle (void *devPtr) |
Close memory mapped with hipIpcOpenMemHandle. More... | |
hipError_t | hipIpcGetEventHandle (hipIpcEventHandle_t *handle, hipEvent_t event) |
hipError_t | hipIpcOpenEventHandle (hipEvent_t *event, hipIpcEventHandle_t handle) |
hipError_t | hipConfigureCall (dim3 gridDim, dim3 blockDim, size_t sharedMem __dparm(0), hipStream_t stream __dparm(0)) |
Configure a kernel launch. More... | |
hipError_t | hipSetupArgument (const void *arg, size_t size, size_t offset) |
Set a kernel argument. More... | |
hipError_t | hipLaunchByPtr (const void *func) |
Launch a kernel. More... | |
hipError_t | __hipPushCallConfiguration (dim3 gridDim, dim3 blockDim, size_t sharedMem __dparm(0), hipStream_t stream __dparm(0)) |
Push configuration of a kernel launch. More... | |
hipError_t | __hipPopCallConfiguration (dim3 *gridDim, dim3 *blockDim, size_t *sharedMem, hipStream_t *stream) |
Pop configuration of a kernel launch. More... | |
hipError_t | hipLaunchKernel (const void *function_address, dim3 numBlocks, dim3 dimBlocks, void **args, size_t sharedMemBytes __dparm(0), hipStream_t stream __dparm(0)) |
C compliant kernel launch API. More... | |
hipError_t | hipMemPrefetchAsync (const void *dev_ptr, size_t count, int device, hipStream_t stream __dparm(0)) |
Prefetches memory to the specified destination device using AMD HMM. More... | |
hipError_t | hipMemAdvise (const void *dev_ptr, size_t count, hipMemoryAdvise advice, int device) |
Advise about the usage of a given memory range to AMD HMM. More... | |
hipError_t | hipMemRangeGetAttribute (void *data, size_t data_size, hipMemRangeAttribute attribute, const void *dev_ptr, size_t count) |
Query an attribute of a given memory range in AMD HMM. More... | |
hipError_t | hipMemRangeGetAttributes (void **data, size_t *data_sizes, hipMemRangeAttribute *attributes, size_t num_attributes, const void *dev_ptr, size_t count) |
Query attributes of a given memory range in AMD HMM. More... | |
hipError_t | hipStreamAttachMemAsync (hipStream_t stream, hipDeviceptr_t *dev_ptr, size_t length __dparm(0), unsigned int flags __dparm(hipMemAttachSingle)) |
Attach memory to a stream asynchronously in AMD HMM. More... | |
hipError_t | hipRegisterApiCallback (uint32_t id, void *fun, void *arg) |
hipError_t | hipRemoveApiCallback (uint32_t id) |
hipError_t | hipRegisterActivityCallback (uint32_t id, void *fun, void *arg) |
hipError_t | hipRemoveActivityCallback (uint32_t id) |
const char * | hipApiName (uint32_t id) |
const char * | hipKernelNameRef (const hipFunction_t f) |
const char * | hipKernelNameRefByPtr (const void *hostFunction, hipStream_t stream) |
int | hipGetStreamDeviceId (hipStream_t stream) |
Contains C function APIs for HIP runtime. This file does not use any HCC builtin or special language extensions (-hc mode) ; those functions in hip_runtime.h.