34 #include <hip/hip_common.h>
38 HIP_ERROR_INVALID_VALUE,
39 HIP_ERROR_NOT_INITIALIZED,
40 HIP_ERROR_LAUNCH_OUT_OF_RESOURCES
45 unsigned hasGlobalInt32Atomics : 1;
46 unsigned hasGlobalFloatAtomicExch : 1;
47 unsigned hasSharedInt32Atomics : 1;
48 unsigned hasSharedFloatAtomicExch : 1;
49 unsigned hasFloatAtomicAdd : 1;
52 unsigned hasGlobalInt64Atomics : 1;
53 unsigned hasSharedInt64Atomics : 1;
56 unsigned hasDoubles : 1;
59 unsigned hasWarpVote : 1;
60 unsigned hasWarpBallot : 1;
61 unsigned hasWarpShuffle : 1;
62 unsigned hasFunnelShift : 1;
65 unsigned hasThreadFenceSystem : 1;
66 unsigned hasSyncThreadsExt : 1;
69 unsigned hasSurfaceFuncs : 1;
70 unsigned has3dGrid : 1;
71 unsigned hasDynamicParallelism : 1;
126 enum hipMemoryType memoryType;
131 unsigned allocationFlags;
154 hipErrorOutOfMemory = 2,
155 hipErrorNotInitialized = 3,
156 hipErrorDeinitialized = 4,
157 hipErrorProfilerDisabled = 5,
158 hipErrorProfilerNotInitialized = 6,
159 hipErrorProfilerAlreadyStarted = 7,
160 hipErrorProfilerAlreadyStopped = 8,
161 hipErrorInvalidImage = 200,
163 hipErrorContextAlreadyCurrent = 202,
164 hipErrorMapFailed = 205,
165 hipErrorUnmapFailed = 206,
166 hipErrorArrayIsMapped = 207,
167 hipErrorAlreadyMapped = 208,
168 hipErrorNoBinaryForGpu = 209,
169 hipErrorAlreadyAcquired = 210,
170 hipErrorNotMapped = 211,
171 hipErrorNotMappedAsArray = 212,
172 hipErrorNotMappedAsPointer = 213,
173 hipErrorECCNotCorrectable = 214,
174 hipErrorUnsupportedLimit = 215,
175 hipErrorContextAlreadyInUse = 216,
176 hipErrorPeerAccessUnsupported = 217,
178 hipErrorInvalidGraphicsContext = 219,
179 hipErrorInvalidSource = 300,
180 hipErrorFileNotFound = 301,
181 hipErrorSharedObjectSymbolNotFound = 302,
182 hipErrorSharedObjectInitFailed = 303,
183 hipErrorOperatingSystem = 304,
184 hipErrorInvalidHandle = 400,
185 hipErrorNotFound = 500,
186 hipErrorIllegalAddress = 700,
187 hipErrorInvalidSymbol = 701,
189 hipErrorMissingConfiguration = 1001,
193 hipErrorPriorLaunchFailure = 1005,
194 hipErrorLaunchTimeOut = 1006,
196 hipErrorInvalidDeviceFunction = 1008,
197 hipErrorInvalidConfiguration = 1009,
254 #if defined(__HIP_PLATFORM_HCC__) && !defined (__HIP_PLATFORM_NVCC__)
256 #elif defined(__HIP_PLATFORM_NVCC__) && !defined (__HIP_PLATFORM_HCC__)
257 #include "hip/nvcc_detail/hip_runtime_api.h"
259 #error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
Call to hipGetDeviceCount returned 0 devices.
Definition: hip_runtime_api.h:205
size_t totalConstMem
Size of shared memory region (in bytes).
Definition: hip_runtime_api.h:94
Maximum Shared Memory Per Multiprocessor.
Definition: hip_runtime_api.h:246
Maximum x-dimension of a block.
Definition: hip_runtime_api.h:224
Maximum x-dimension of a grid.
Definition: hip_runtime_api.h:227
Peer access was already enabled from the current device.
Definition: hip_runtime_api.h:206
HSA runtime memory call returned error. Typically not seen in production systems. ...
Definition: hip_runtime_api.h:209
Global memory bus width in bits.
Definition: hip_runtime_api.h:236
Produced when the IPC memory attach failed from ROCr.
Definition: hip_runtime_api.h:213
Successful completion.
Definition: hip_runtime_api.h:153
int minor
Minor compute capability. On HCC, this is an approximation and features may differ from CUDA CC...
Definition: hip_runtime_api.h:96
In CUDA DRV, it is CUDA_ERROR_INVALID_PTX.
Definition: hip_runtime_api.h:177
int canMapHostMemory
Check whether HIP can map host memory.
Definition: hip_runtime_api.h:108
Maximum number of 32-bit registers available to a thread block. This number is shared by all thread b...
Definition: hip_runtime_api.h:233
int regsPerBlock
Registers per block.
Definition: hip_runtime_api.h:86
Size of L2 cache in bytes. 0 if the device doesn't have L2 cache.
Definition: hip_runtime_api.h:239
#define hipHostMallocDefault
Flags that can be used with hipHostMalloc.
Definition: hip_runtime_api.h:103
HSA runtime call other than memory returned error. Typically not seen in production systems...
Definition: hip_runtime_api.h:210
int isMultiGpuBoard
1 if device is on a multi-GPU board, 0 if not.
Definition: hip_runtime_api.h:107
DeviceID must be in range 0...#compute-devices.
Definition: hip_runtime_api.h:198
Peak clock frequency in kilohertz.
Definition: hip_runtime_api.h:234
Definition: hip_runtime_api.h:125
int clockRate
Max clock frequency of the multiProcessors in khz.
Definition: hip_runtime_api.h:91
Maximum z-dimension of a grid.
Definition: hip_runtime_api.h:229
Minor compute capability version number.
Definition: hip_runtime_api.h:242
Maximum shared memory available per block in bytes.
Definition: hip_runtime_api.h:230
int pciBusID
PCI Bus ID.
Definition: hip_runtime_api.h:104
Maximum y-dimension of a grid.
Definition: hip_runtime_api.h:228
Multiple GPU devices.
Definition: hip_runtime_api.h:247
Unknown error.
Definition: hip_runtime_api.h:202
int maxThreadsPerBlock
Max work items per work group or workgroup max size.
Definition: hip_runtime_api.h:88
Maximum y-dimension of a block.
Definition: hip_runtime_api.h:225
hipError_t hipHostMalloc(void **ptr, size_t size, unsigned int flags)
Allocate device accessible page locked host memory.
Definition: hip_memory.cpp:161
size_t sharedMemPerBlock
Size of shared memory region (in bytes).
Definition: hip_runtime_api.h:85
int maxThreadsPerMultiProcessor
Maximum resident threads per multi-processor.
Definition: hip_runtime_api.h:99
Produced when trying to lock a page-locked memory.
Definition: hip_runtime_api.h:211
int l2CacheSize
L2 cache size.
Definition: hip_runtime_api.h:98
hipDeviceAttribute_t
Definition: hip_runtime_api.h:222
Major compute capability version number.
Definition: hip_runtime_api.h:241
Peer access was never enabled from the current device.
Definition: hip_runtime_api.h:208
Maximum number of threads per block.
Definition: hip_runtime_api.h:223
Resource handle (hipEvent_t or hipStream_t) invalid.
Definition: hip_runtime_api.h:203
Memory allocation error.
Definition: hip_runtime_api.h:190
hipDeviceArch_t arch
Architectural feature flags. New for HIP.
Definition: hip_runtime_api.h:102
int maxGridSize[3]
Max grid dimensions (XYZ).
Definition: hip_runtime_api.h:90
int computeMode
Compute mode.
Definition: hip_runtime_api.h:100
Maximum z-dimension of a block.
Definition: hip_runtime_api.h:226
PCI Bus ID.
Definition: hip_runtime_api.h:244
Invalid memory copy direction.
Definition: hip_runtime_api.h:201
Marker that more error codes are needed.
Definition: hip_runtime_api.h:214
Warp size in threads.
Definition: hip_runtime_api.h:232
int major
Major compute capability. On HCC, this is an approximation and features may differ from CUDA CC...
Definition: hip_runtime_api.h:95
Peak memory clock frequency in kilohertz.
Definition: hip_runtime_api.h:235
Maximum resident threads per multiprocessor.
Definition: hip_runtime_api.h:240
hipError_t
Definition: hip_runtime_api.h:152
int clockInstructionRate
Frequency in khz of the timer used by the device-side "clock*" instructions. New for HIP...
Definition: hip_runtime_api.h:101
Constant memory size in bytes.
Definition: hip_runtime_api.h:231
int warpSize
Warp size.
Definition: hip_runtime_api.h:87
int concurrentKernels
Device can possibly execute multiple kernels concurrently.
Definition: hip_runtime_api.h:103
size_t totalGlobalMem
Size of global memory region (in bytes).
Definition: hip_runtime_api.h:84
Invalid Device Pointer.
Definition: hip_runtime_api.h:200
An exception occurred on the device while executing a kernel.
Definition: hip_runtime_api.h:192
hipError_t hipMalloc(void **ptr, size_t size)
Allocate memory on the default accelerator.
Definition: hip_memory.cpp:105
Compute mode that device is currently in.
Definition: hip_runtime_api.h:238
PCI Device ID.
Definition: hip_runtime_api.h:245
int maxThreadsDim[3]
Max number of threads in each dimension (XYZ) of a block.
Definition: hip_runtime_api.h:89
Number of multiprocessors on the device.
Definition: hip_runtime_api.h:237
int memoryBusWidth
Global memory bus width in bits.
Definition: hip_runtime_api.h:93
One or more of the parameters passed to the API call is NULL or not in an acceptable range...
Definition: hip_runtime_api.h:199
Definition: hip_runtime_api.h:82
Indicates that asynchronous operations enqueued earlier are not ready. This is not actually an error...
Definition: hip_runtime_api.h:204
size_t maxSharedMemoryPerMultiProcessor
Maximum Shared Memory Per Multiprocessor.
Definition: hip_runtime_api.h:106
int pciDeviceID
PCI Device ID.
Definition: hip_runtime_api.h:105
char name[256]
Device name.
Definition: hip_runtime_api.h:83
Produced when trying to unlock a non-page-locked memory.
Definition: hip_runtime_api.h:212
Definition: hip_runtime_api.h:43
Contains C function APIs for HIP runtime. This file does not use any HCC builtin or special language ...
int memoryClockRate
Max global memory clock frequency in khz.
Definition: hip_runtime_api.h:92
TODO comment from hipErrorInitializationError.
Definition: hip_runtime_api.h:191
Produced when input context is invalid.
Definition: hip_runtime_api.h:162
Device can possibly execute multiple kernels concurrently.
Definition: hip_runtime_api.h:243
int multiProcessorCount
Number of multi-processors (compute units).
Definition: hip_runtime_api.h:97
Out of resources error.
Definition: hip_runtime_api.h:195