HIP: Heterogenous-computing Interface for Portability
hip_runtime_api.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
21 */
22 
23 //#pragma once
24 #ifndef HIP_INCLUDE_HIP_AMD_DETAIL_HIP_RUNTIME_API_H
25 #define HIP_INCLUDE_HIP_AMD_DETAIL_HIP_RUNTIME_API_H
26 
31 #include <stdint.h>
32 #include <stddef.h>
33 
34 #ifndef GENERIC_GRID_LAUNCH
35 #define GENERIC_GRID_LAUNCH 1
36 #endif
37 
39 #include <hip/amd_detail/driver_types.h>
42 
43 #if defined(_MSC_VER)
44 #define DEPRECATED(msg) __declspec(deprecated(msg))
45 #else // !defined(_MSC_VER)
46 #define DEPRECATED(msg) __attribute__ ((deprecated(msg)))
47 #endif // !defined(_MSC_VER)
48 
49 #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"
50 
51 #define HIP_LAUNCH_PARAM_BUFFER_POINTER ((void*)0x01)
52 #define HIP_LAUNCH_PARAM_BUFFER_SIZE ((void*)0x02)
53 #define HIP_LAUNCH_PARAM_END ((void*)0x03)
54 
55 #ifdef __cplusplus
56  #define __dparm(x) \
57  = x
58 #else
59  #define __dparm(x)
60 #endif
61 
62 #ifdef __GNUC__
63 #pragma GCC visibility push (default)
64 #endif
65 
66 #ifdef __cplusplus
67 namespace hip_impl {
68 hipError_t hip_init();
69 } // namespace hip_impl
70 #endif
71 
72 // Structure definitions:
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
76 
77 //---
78 // API-visible structures
79 typedef struct ihipCtx_t* hipCtx_t;
80 
81 // Note many APIs also use integer deviceIds as an alternative to the device pointer:
82 typedef int hipDevice_t;
83 
84 typedef enum hipDeviceP2PAttr {
85  hipDevP2PAttrPerformanceRank = 0,
86  hipDevP2PAttrAccessSupported,
87  hipDevP2PAttrNativeAtomicSupported,
88  hipDevP2PAttrHipArrayAccessSupported
89 } hipDeviceP2PAttr;
90 
91 typedef struct ihipStream_t* hipStream_t;
92 
93 #define hipIpcMemLazyEnablePeerAccess 0
94 
95 #define HIP_IPC_HANDLE_SIZE 64
96 
97 typedef struct hipIpcMemHandle_st {
98  char reserved[HIP_IPC_HANDLE_SIZE];
100 
101 typedef struct hipIpcEventHandle_st {
102  char reserved[HIP_IPC_HANDLE_SIZE];
104 
105 typedef struct ihipModule_t* hipModule_t;
106 
107 typedef struct ihipModuleSymbol_t* hipFunction_t;
108 
109 typedef struct hipFuncAttributes {
110  int binaryVersion;
111  int cacheModeCA;
112  size_t constSizeBytes;
113  size_t localSizeBytes;
114  int maxDynamicSharedSizeBytes;
115  int maxThreadsPerBlock;
116  int numRegs;
117  int preferredShmemCarveout;
118  int ptxVersion;
119  size_t sharedSizeBytes;
121 
122 typedef struct ihipEvent_t* hipEvent_t;
123 
124 enum hipLimit_t {
125  hipLimitMallocHeapSize = 0x02,
126 };
127 
132 #define hipStreamDefault \
134  0x00
135 #define hipStreamNonBlocking 0x01
136 
137 
139 #define hipEventDefault 0x0
140 #define hipEventBlockingSync \
141  0x1
142 #define hipEventDisableTiming \
143  0x2
144 #define hipEventInterprocess 0x4
145 #define hipEventReleaseToDevice \
146  0x40000000
147 #define hipEventReleaseToSystem \
150  0x80000000
151 
154 
156 #define hipHostMallocDefault 0x0
157 #define hipHostMallocPortable 0x1
158 #define hipHostMallocMapped \
159  0x2
160 #define hipHostMallocWriteCombined 0x4
162 #define hipHostMallocNumaUser \
163  0x20000000
164 
165 #define hipHostMallocCoherent \
166  0x40000000
167 #define hipHostMallocNonCoherent \
169  0x80000000
170 
172 #define hipMemAttachGlobal 0x01
173 #define hipMemAttachHost 0x02
174 #define hipMemAttachSingle 0x04
175 
177 #define hipDeviceMallocDefault 0x0
178 #define hipDeviceMallocFinegrained 0x1
179 #define hipMallocSignalMemory 0x2
180 
181 #define hipHostRegisterDefault 0x0
183 #define hipHostRegisterPortable 0x1
184 #define hipHostRegisterMapped \
185  0x2
186 #define hipHostRegisterIoMemory 0x4
188 #define hipExtHostRegisterCoarseGrained 0x8
189 
190 #define hipDeviceScheduleAuto 0x0
191 #define hipDeviceScheduleSpin \
192  0x1
193 #define hipDeviceScheduleYield \
195  0x2
196 #define hipDeviceScheduleBlockingSync 0x4
198 #define hipDeviceScheduleMask 0x7
199 
200 #define hipDeviceMapHost 0x8
201 #define hipDeviceLmemResizeToMax 0x16
202 
203 #define hipArrayDefault 0x00
204 #define hipArrayLayered 0x01
205 #define hipArraySurfaceLoadStore 0x02
206 #define hipArrayCubemap 0x04
207 #define hipArrayTextureGather 0x08
208 
209 #define hipOccupancyDefault 0x00
210 
211 #define hipCooperativeLaunchMultiDeviceNoPreSync 0x01
212 #define hipCooperativeLaunchMultiDeviceNoPostSync 0x02
213 
214 #define hipCpuDeviceId ((int)-1)
215 #define hipInvalidDeviceId ((int)-2)
216 
217 // Flags that can be used with hipExtLaunch Set of APIs
218 #define hipExtAnyOrderLaunch 0x01
219 
220 // Flags to be used with hipStreamWaitValue32 and hipStreamWaitValue64
221 #define hipStreamWaitValueGte 0x0
222 #define hipStreamWaitValueEq 0x1
223 #define hipStreamWaitValueAnd 0x2
224 #define hipStreamWaitValueNor 0x3
225 
226 /*
227  * @brief HIP Memory Advise values
228  * @enum
229  * @ingroup Enumerations
230  */
231 typedef enum hipMemoryAdvise {
243 
244 /*
245  * @brief HIP range attributes
246  * @enum
247  * @ingroup Enumerations
248  */
249 typedef enum hipMemRangeAttribute {
257 
258 /*
259  * @brief hipJitOption
260  * @enum
261  * @ingroup Enumerations
262  */
263 typedef enum hipJitOption {
264  hipJitOptionMaxRegisters = 0,
265  hipJitOptionThreadsPerBlock,
266  hipJitOptionWallTime,
267  hipJitOptionInfoLogBuffer,
268  hipJitOptionInfoLogBufferSizeBytes,
269  hipJitOptionErrorLogBuffer,
270  hipJitOptionErrorLogBufferSizeBytes,
271  hipJitOptionOptimizationLevel,
272  hipJitOptionTargetFromContext,
273  hipJitOptionTarget,
274  hipJitOptionFallbackStrategy,
275  hipJitOptionGenerateDebugInfo,
276  hipJitOptionLogVerbose,
277  hipJitOptionGenerateLineInfo,
278  hipJitOptionCacheMode,
279  hipJitOptionSm3xOpt,
280  hipJitOptionFastCompile,
281  hipJitOptionNumOptions
282 } hipJitOption;
283 
287 typedef enum hipFuncAttribute {
288  hipFuncAttributeMaxDynamicSharedMemorySize = 8,
289  hipFuncAttributePreferredSharedMemoryCarveout = 9,
290  hipFuncAttributeMax
292 
296 typedef enum hipFuncCache_t {
302 
306 typedef enum hipSharedMemConfig {
313 
318 typedef struct dim3 {
319  uint32_t x;
320  uint32_t y;
321  uint32_t z;
322 #ifdef __cplusplus
323  constexpr __host__ __device__ dim3(uint32_t _x = 1, uint32_t _y = 1, uint32_t _z = 1) : x(_x), y(_y), z(_z){};
324 #endif
326 
327 typedef struct hipLaunchParams_t {
328  void* func;
331  void **args;
332  size_t sharedMem;
333  hipStream_t stream;
335 
336 
337 typedef enum hipExternalMemoryHandleType_enum {
338  hipExternalMemoryHandleTypeOpaqueFd = 1,
339  hipExternalMemoryHandleTypeOpaqueWin32 = 2,
340  hipExternalMemoryHandleTypeOpaqueWin32Kmt = 3,
341  hipExternalMemoryHandleTypeD3D12Heap = 4,
342  hipExternalMemoryHandleTypeD3D12Resource = 5,
343  hipExternalMemoryHandleTypeD3D11Resource = 6,
344  hipExternalMemoryHandleTypeD3D11ResourceKmt = 7,
345 } hipExternalMemoryHandleType;
346 
348  hipExternalMemoryHandleType type;
349  union {
350  int fd;
351  struct {
352  void *handle;
353  const void *name;
354  } win32;
355  } handle;
356  unsigned long long size;
357  unsigned int flags;
359 
361  unsigned long long offset;
362  unsigned long long size;
363  unsigned int flags;
365 
366 typedef void* hipExternalMemory_t;
367 
368 #if __HIP_HAS_GET_PCH
369 
374  void __hipGetPCH(const char** pch, unsigned int*size);
375 #endif
376 
377 
378 // Doxygen end group GlobalDefs
382 //-------------------------------------------------------------------------------------------------
383 
384 
385 // The handle allows the async commands to use the stream even if the parent hipStream_t goes
386 // out-of-scope.
387 // typedef class ihipStream_t * hipStream_t;
388 
389 
390 /*
391  * Opaque structure allows the true event (pointed at by the handle) to remain "live" even if the
392  * surrounding hipEvent_t goes out-of-scope. This is handy for cases where the hipEvent_t goes
393  * out-of-scope but the true event is being written by some async queue or device */
394 // typedef struct hipEvent_t {
395 // struct ihipEvent_t *_handle;
396 //} hipEvent_t;
397 
398 
420 // TODO-ctx - more description on error codes.
421 hipError_t hipInit(unsigned int flags);
422 
438 hipError_t hipDriverGetVersion(int* driverVersion);
439 
452 hipError_t hipRuntimeGetVersion(int* runtimeVersion);
453 
454 
462 hipError_t hipDeviceGet(hipDevice_t* device, int ordinal);
463 
472 hipError_t hipDeviceComputeCapability(int* major, int* minor, hipDevice_t device);
473 
482 hipError_t hipDeviceGetName(char* name, int len, hipDevice_t device);
483 
484 
494 hipError_t hipDeviceGetP2PAttribute(int* value, hipDeviceP2PAttr attr,
495  int srcDevice, int dstDevice);
496 
505 hipError_t hipDeviceGetPCIBusId(char* pciBusId, int len, int device);
506 
507 
515 hipError_t hipDeviceGetByPCIBusId(int* device, const char* pciBusId);
516 
517 
525 hipError_t hipDeviceTotalMem(size_t* bytes, hipDevice_t device);
526 
527 
528 // doxygen end initialization
549 hipError_t hipDeviceSynchronize(void);
550 
551 
563 hipError_t hipDeviceReset(void);
564 
565 
597 hipError_t hipSetDevice(int deviceId);
598 
599 
613 hipError_t hipGetDevice(int* deviceId);
614 
615 
628 hipError_t hipGetDeviceCount(int* count);
629 
639 hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int deviceId);
640 
654 hipError_t hipGetDeviceProperties(hipDeviceProp_t* prop, int deviceId);
655 
656 
667 hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig);
668 
669 
680 hipError_t hipDeviceGetCacheConfig(hipFuncCache_t* cacheConfig);
681 
692 hipError_t hipDeviceGetLimit(size_t* pValue, enum hipLimit_t limit);
693 
694 
707 
715 hipError_t hipGetDeviceFlags(unsigned int* flags);
716 
729 
754 hipError_t hipSetDeviceFlags(unsigned flags);
755 
764 hipError_t hipChooseDevice(int* device, const hipDeviceProp_t* prop);
765 
778 hipError_t hipExtGetLinkTypeAndHopCount(int device1, int device2, uint32_t* linktype, uint32_t* hopcount);
779 
780 
781 // TODO: implement IPC apis
782 
808 hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t* handle, void* devPtr);
809 
846 hipError_t hipIpcOpenMemHandle(void** devPtr, hipIpcMemHandle_t handle, unsigned int flags);
847 
866 hipError_t hipIpcCloseMemHandle(void* devPtr);
867 
868 
869 hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t* handle, hipEvent_t event);
870 hipError_t hipIpcOpenEventHandle(hipEvent_t* event, hipIpcEventHandle_t handle);
871 
872 // end doxygen Device
897 hipError_t hipFuncSetAttribute(const void* func, hipFuncAttribute attr, int value);
898 
909 hipError_t hipFuncSetCacheConfig(const void* func, hipFuncCache_t config);
910 
923 hipError_t hipFuncSetSharedMemConfig(const void* func, hipSharedMemConfig config);
924 
925 //doxygen end execution
949 hipError_t hipGetLastError(void);
950 
951 
962 hipError_t hipPeekAtLastError(void);
963 
964 
973 const char* hipGetErrorName(hipError_t hip_error);
974 
975 
986 const char* hipGetErrorString(hipError_t hipError);
987 
988 // end doxygen Error
1021 hipError_t hipStreamCreate(hipStream_t* stream);
1022 
1023 
1041 hipError_t hipStreamCreateWithFlags(hipStream_t* stream, unsigned int flags);
1042 
1043 
1062 hipError_t hipStreamCreateWithPriority(hipStream_t* stream, unsigned int flags, int priority);
1063 
1064 
1079 hipError_t hipDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority);
1080 
1081 
1100 hipError_t hipStreamDestroy(hipStream_t stream);
1101 
1102 
1118 hipError_t hipStreamQuery(hipStream_t stream);
1119 
1120 
1140 hipError_t hipStreamSynchronize(hipStream_t stream);
1141 
1142 
1162 hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags);
1163 
1164 
1178 hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int* flags);
1179 
1180 
1194 hipError_t hipStreamGetPriority(hipStream_t stream, int* priority);
1195 
1196 
1216 hipError_t hipExtStreamCreateWithCUMask(hipStream_t* stream, uint32_t cuMaskSize, const uint32_t* cuMask);
1217 
1218 
1231 hipError_t hipExtStreamGetCUMask(hipStream_t stream, uint32_t cuMaskSize, uint32_t* cuMask);
1232 
1236 typedef void (*hipStreamCallback_t)(hipStream_t stream, hipError_t status, void* userData);
1237 
1253 hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback, void* userData,
1254  unsigned int flags);
1255 
1256 
1257 // end doxygen Stream
1302 hipError_t hipStreamWaitValue32(hipStream_t stream, void* ptr, int32_t value, unsigned int flags,
1303  uint32_t mask __dparm(0xFFFFFFFF));
1304 
1335 hipError_t hipStreamWaitValue64(hipStream_t stream, void* ptr, int64_t value, unsigned int flags,
1336  uint64_t mask __dparm(0xFFFFFFFFFFFFFFFF));
1337 
1354 hipError_t hipStreamWriteValue32(hipStream_t stream, void* ptr, int32_t value, unsigned int flags);
1355 
1372 hipError_t hipStreamWriteValue64(hipStream_t stream, void* ptr, int64_t value, unsigned int flags);
1373 
1374 
1375 // end doxygen Stream Memory Operations
1413 hipError_t hipEventCreateWithFlags(hipEvent_t* event, unsigned flags);
1414 
1415 
1427 hipError_t hipEventCreate(hipEvent_t* event);
1428 
1429 
1457 #ifdef __cplusplus
1458 hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream = NULL);
1459 #else
1460 hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream);
1461 #endif
1462 
1479 hipError_t hipEventDestroy(hipEvent_t event);
1480 
1481 
1499 hipError_t hipEventSynchronize(hipEvent_t event);
1500 
1501 
1537 hipError_t hipEventElapsedTime(float* ms, hipEvent_t start, hipEvent_t stop);
1538 
1539 
1555 hipError_t hipEventQuery(hipEvent_t event);
1556 
1557 
1558 // end doxygen Events
1588 hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void* ptr);
1589 
1600 hipError_t hipImportExternalMemory(hipExternalMemory_t* extMem_out, const hipExternalMemoryHandleDesc* memHandleDesc);
1601 
1613 hipError_t hipExternalMemoryGetMappedBuffer(void **devPtr, hipExternalMemory_t extMem, const hipExternalMemoryBufferDesc *bufferDesc);
1614 
1615 
1625 hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem);
1626 
1640 hipError_t hipMalloc(void** ptr, size_t size);
1641 
1656 hipError_t hipExtMallocWithFlags(void** ptr, size_t sizeBytes, unsigned int flags);
1657 
1670 DEPRECATED("use hipHostMalloc instead")
1671 hipError_t hipMallocHost(void** ptr, size_t size);
1672 
1685 DEPRECATED("use hipHostMalloc instead")
1686 hipError_t hipMemAllocHost(void** ptr, size_t size);
1687 
1701 hipError_t hipHostMalloc(void** ptr, size_t size, unsigned int flags);
1702 
1723 hipError_t hipMallocManaged(void** dev_ptr,
1724  size_t size,
1725  unsigned int flags __dparm(hipMemAttachGlobal));
1726 
1737 hipError_t hipMemPrefetchAsync(const void* dev_ptr,
1738  size_t count,
1739  int device,
1740  hipStream_t stream __dparm(0));
1741 
1752 hipError_t hipMemAdvise(const void* dev_ptr,
1753  size_t count,
1754  hipMemoryAdvise advice,
1755  int device);
1756 
1769 hipError_t hipMemRangeGetAttribute(void* data,
1770  size_t data_size,
1771  hipMemRangeAttribute attribute,
1772  const void* dev_ptr,
1773  size_t count);
1774 
1789 hipError_t hipMemRangeGetAttributes(void** data,
1790  size_t* data_sizes,
1791  hipMemRangeAttribute* attributes,
1792  size_t num_attributes,
1793  const void* dev_ptr,
1794  size_t count);
1795 
1808 hipError_t hipStreamAttachMemAsync(hipStream_t stream,
1809  hipDeviceptr_t* dev_ptr,
1810  size_t length __dparm(0),
1811  unsigned int flags __dparm(hipMemAttachSingle));
1812 
1813 // end doxygen Managed Memory
1831 DEPRECATED("use hipHostMalloc instead")
1832 hipError_t hipHostAlloc(void** ptr, size_t size, unsigned int flags);
1833 
1845 hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, unsigned int flags);
1846 
1856 hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr);
1857 
1894 hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags);
1895 
1904 hipError_t hipHostUnregister(void* hostPtr);
1905 
1925 hipError_t hipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t height);
1926 
1949 hipError_t hipMemAllocPitch(hipDeviceptr_t* dptr, size_t* pitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes);
1950 
1964 hipError_t hipFree(void* ptr);
1965 
1976 DEPRECATED("use hipHostFree instead")
1977 hipError_t hipFreeHost(void* ptr);
1978 
1992 hipError_t hipHostFree(void* ptr);
1993 
2023 hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind);
2024 
2025 // TODO: Add description
2026 hipError_t hipMemcpyWithStream(void* dst, const void* src, size_t sizeBytes,
2027  hipMemcpyKind kind, hipStream_t stream);
2045 hipError_t hipMemcpyHtoD(hipDeviceptr_t dst, void* src, size_t sizeBytes);
2046 
2064 hipError_t hipMemcpyDtoH(void* dst, hipDeviceptr_t src, size_t sizeBytes);
2065 
2083 hipError_t hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes);
2084 
2102 hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, void* src, size_t sizeBytes, hipStream_t stream);
2103 
2121 hipError_t hipMemcpyDtoHAsync(void* dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream);
2122 
2140 hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes,
2141  hipStream_t stream);
2142 
2143 hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes,
2144  hipModule_t hmod, const char* name);
2145 
2146 hipError_t hipGetSymbolAddress(void** devPtr, const void* symbol);
2147 hipError_t hipGetSymbolSize(size_t* size, const void* symbol);
2148 hipError_t hipMemcpyToSymbol(const void* symbol, const void* src,
2149  size_t sizeBytes, size_t offset __dparm(0),
2150  hipMemcpyKind kind __dparm(hipMemcpyHostToDevice));
2151 hipError_t hipMemcpyToSymbolAsync(const void* symbol, const void* src,
2152  size_t sizeBytes, size_t offset,
2153  hipMemcpyKind kind, hipStream_t stream __dparm(0));
2154 hipError_t hipMemcpyFromSymbol(void* dst, const void* symbol,
2155  size_t sizeBytes, size_t offset __dparm(0),
2156  hipMemcpyKind kind __dparm(hipMemcpyDeviceToHost));
2157 hipError_t hipMemcpyFromSymbolAsync(void* dst, const void* symbol,
2158  size_t sizeBytes, size_t offset,
2159  hipMemcpyKind kind,
2160  hipStream_t stream __dparm(0));
2161 
2190 hipError_t hipMemcpyAsync(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind,
2191  hipStream_t stream __dparm(0));
2192 
2202 hipError_t hipMemset(void* dst, int value, size_t sizeBytes);
2203 
2213 hipError_t hipMemsetD8(hipDeviceptr_t dest, unsigned char value, size_t count);
2214 
2230 hipError_t hipMemsetD8Async(hipDeviceptr_t dest, unsigned char value, size_t count, hipStream_t stream __dparm(0));
2231 
2241 hipError_t hipMemsetD16(hipDeviceptr_t dest, unsigned short value, size_t count);
2242 
2258 hipError_t hipMemsetD16Async(hipDeviceptr_t dest, unsigned short value, size_t count, hipStream_t stream __dparm(0));
2259 
2269 hipError_t hipMemsetD32(hipDeviceptr_t dest, int value, size_t count);
2270 
2286 hipError_t hipMemsetAsync(void* dst, int value, size_t sizeBytes, hipStream_t stream __dparm(0));
2287 
2303 hipError_t hipMemsetD32Async(hipDeviceptr_t dst, int value, size_t count,
2304  hipStream_t stream __dparm(0));
2305 
2317 hipError_t hipMemset2D(void* dst, size_t pitch, int value, size_t width, size_t height);
2318 
2331 hipError_t hipMemset2DAsync(void* dst, size_t pitch, int value, size_t width, size_t height,hipStream_t stream __dparm(0));
2332 
2341 hipError_t hipMemset3D(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent );
2342 
2352 hipError_t hipMemset3DAsync(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent ,hipStream_t stream __dparm(0));
2353 
2363 hipError_t hipMemGetInfo(size_t* free, size_t* total);
2364 
2365 
2366 hipError_t hipMemPtrGetInfo(void* ptr, size_t* size);
2367 
2368 
2381 hipError_t hipMallocArray(hipArray** array, const hipChannelFormatDesc* desc, size_t width,
2382  size_t height __dparm(0), unsigned int flags __dparm(hipArrayDefault));
2383 hipError_t hipArrayCreate(hipArray** pHandle, const HIP_ARRAY_DESCRIPTOR* pAllocateArray);
2384 
2385 hipError_t hipArrayDestroy(hipArray* array);
2386 
2387 hipError_t hipArray3DCreate(hipArray** array, const HIP_ARRAY3D_DESCRIPTOR* pAllocateArray);
2388 
2389 hipError_t hipMalloc3D(hipPitchedPtr* pitchedDevPtr, hipExtent extent);
2390 
2399 hipError_t hipFreeArray(hipArray* array);
2400 
2408 hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray);
2409 
2422 hipError_t hipMalloc3DArray(hipArray** array, const struct hipChannelFormatDesc* desc,
2423  struct hipExtent extent, unsigned int flags);
2424 
2437  hipMipmappedArray_t *mipmappedArray,
2438  const struct hipChannelFormatDesc* desc,
2439  struct hipExtent extent,
2440  unsigned int numLevels,
2441  unsigned int flags __dparm(0));
2442 
2453  hipArray_t *levelArray,
2454  hipMipmappedArray_const_t mipmappedArray,
2455  unsigned int level);
2456 
2473 hipError_t hipMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width,
2474  size_t height, hipMemcpyKind kind);
2475 
2485 hipError_t hipMemcpyParam2D(const hip_Memcpy2D* pCopy);
2486 
2497 hipError_t hipMemcpyParam2DAsync(const hip_Memcpy2D* pCopy, hipStream_t stream __dparm(0));
2498 
2516 hipError_t hipMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width,
2517  size_t height, hipMemcpyKind kind, hipStream_t stream __dparm(0));
2518 
2536 hipError_t hipMemcpy2DToArray(hipArray* dst, size_t wOffset, size_t hOffset, const void* src,
2537  size_t spitch, size_t width, size_t height, hipMemcpyKind kind);
2538 
2557 hipError_t hipMemcpy2DToArrayAsync(hipArray* dst, size_t wOffset, size_t hOffset, const void* src,
2558  size_t spitch, size_t width, size_t height, hipMemcpyKind kind,
2559  hipStream_t stream __dparm(0));
2560 
2576 DEPRECATED(DEPRECATED_MSG)
2577 hipError_t hipMemcpyToArray(hipArray* dst, size_t wOffset, size_t hOffset, const void* src,
2578  size_t count, hipMemcpyKind kind);
2579 
2595 DEPRECATED(DEPRECATED_MSG)
2596 hipError_t hipMemcpyFromArray(void* dst, hipArray_const_t srcArray, size_t wOffset, size_t hOffset,
2597  size_t count, hipMemcpyKind kind);
2598 
2616 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);
2617 
2636 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));
2637 
2651 hipError_t hipMemcpyAtoH(void* dst, hipArray* srcArray, size_t srcOffset, size_t count);
2652 
2666 hipError_t hipMemcpyHtoA(hipArray* dstArray, size_t dstOffset, const void* srcHost, size_t count);
2667 
2678 hipError_t hipMemcpy3D(const struct hipMemcpy3DParms* p);
2679 
2691 hipError_t hipMemcpy3DAsync(const struct hipMemcpy3DParms* p, hipStream_t stream __dparm(0));
2692 
2703 hipError_t hipDrvMemcpy3D(const HIP_MEMCPY3D* pCopy);
2704 
2716 hipError_t hipDrvMemcpy3DAsync(const HIP_MEMCPY3D* pCopy, hipStream_t stream);
2717 
2718 // doxygen end Memory
2749 hipError_t hipDeviceCanAccessPeer(int* canAccessPeer, int deviceId, int peerDeviceId);
2750 
2751 
2768 hipError_t hipDeviceEnablePeerAccess(int peerDeviceId, unsigned int flags);
2769 
2770 
2782 hipError_t hipDeviceDisablePeerAccess(int peerDeviceId);
2783 
2796 hipError_t hipMemGetAddressRange(hipDeviceptr_t* pbase, size_t* psize, hipDeviceptr_t dptr);
2797 
2798 #ifndef USE_PEER_NON_UNIFIED
2799 #define USE_PEER_NON_UNIFIED 1
2800 #endif
2801 
2802 #if USE_PEER_NON_UNIFIED == 1
2803 
2814 hipError_t hipMemcpyPeer(void* dst, int dstDeviceId, const void* src, int srcDeviceId,
2815  size_t sizeBytes);
2816 
2829 hipError_t hipMemcpyPeerAsync(void* dst, int dstDeviceId, const void* src, int srcDevice,
2830  size_t sizeBytes, hipStream_t stream __dparm(0));
2831 #endif
2832 
2833 
2834 // doxygen end PeerToPeer
2868 DEPRECATED(DEPRECATED_MSG)
2869 hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device);
2870 
2881 DEPRECATED(DEPRECATED_MSG)
2882 hipError_t hipCtxDestroy(hipCtx_t ctx);
2883 
2894 DEPRECATED(DEPRECATED_MSG)
2895 hipError_t hipCtxPopCurrent(hipCtx_t* ctx);
2896 
2907 DEPRECATED(DEPRECATED_MSG)
2908 hipError_t hipCtxPushCurrent(hipCtx_t ctx);
2909 
2920 DEPRECATED(DEPRECATED_MSG)
2921 hipError_t hipCtxSetCurrent(hipCtx_t ctx);
2922 
2933 DEPRECATED(DEPRECATED_MSG)
2934 hipError_t hipCtxGetCurrent(hipCtx_t* ctx);
2935 
2947 DEPRECATED(DEPRECATED_MSG)
2948 hipError_t hipCtxGetDevice(hipDevice_t* device);
2949 
2967 DEPRECATED(DEPRECATED_MSG)
2968 hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion);
2969 
2983 DEPRECATED(DEPRECATED_MSG)
2984 hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig);
2985 
2999 DEPRECATED(DEPRECATED_MSG)
3000 hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig);
3001 
3015 DEPRECATED(DEPRECATED_MSG)
3017 
3031 DEPRECATED(DEPRECATED_MSG)
3033 
3045 DEPRECATED(DEPRECATED_MSG)
3046 hipError_t hipCtxSynchronize(void);
3047 
3058 DEPRECATED(DEPRECATED_MSG)
3059 hipError_t hipCtxGetFlags(unsigned int* flags);
3060 
3080 DEPRECATED(DEPRECATED_MSG)
3081 hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags);
3082 
3099 DEPRECATED(DEPRECATED_MSG)
3100 hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx);
3101 
3102 // doxygen end Context deprecated
3119 hipError_t hipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int* flags, int* active);
3120 
3133 hipError_t hipDevicePrimaryCtxRelease(hipDevice_t dev);
3134 
3146 hipError_t hipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev);
3147 
3158 hipError_t hipDevicePrimaryCtxReset(hipDevice_t dev);
3159 
3171 hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags);
3172 
3173 // doxygen end Context Management
3197 hipError_t hipModuleLoad(hipModule_t* module, const char* fname);
3198 
3209 hipError_t hipModuleUnload(hipModule_t module);
3210 
3221 hipError_t hipModuleGetFunction(hipFunction_t* function, hipModule_t module, const char* kname);
3222 
3232 hipError_t hipFuncGetAttributes(struct hipFuncAttributes* attr, const void* func);
3233 
3243 hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc);
3244 
3254 hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const char* name);
3255 
3265 hipError_t hipModuleLoadData(hipModule_t* module, const void* image);
3266 
3279 hipError_t hipModuleLoadDataEx(hipModule_t* module, const void* image, unsigned int numOptions,
3280  hipJitOption* options, void** optionValues);
3281 
3306 hipError_t hipModuleLaunchKernel(hipFunction_t f, unsigned int gridDimX, unsigned int gridDimY,
3307  unsigned int gridDimZ, unsigned int blockDimX,
3308  unsigned int blockDimY, unsigned int blockDimZ,
3309  unsigned int sharedMemBytes, hipStream_t stream,
3310  void** kernelParams, void** extra);
3311 
3327 hipError_t hipLaunchCooperativeKernel(const void* f, dim3 gridDim, dim3 blockDimX,
3328  void** kernelParams, unsigned int sharedMemBytes,
3329  hipStream_t stream);
3330 
3342  int numDevices, unsigned int flags);
3343 
3344 
3357  int numDevices, unsigned int flags);
3358 
3359 
3360 // doxygen end Module
3385 //TODO - Match CUoccupancyB2DSize
3386 hipError_t hipModuleOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize,
3387  hipFunction_t f, size_t dynSharedMemPerBlk,
3388  int blockSizeLimit);
3389 
3402 //TODO - Match CUoccupancyB2DSize
3403 hipError_t hipModuleOccupancyMaxPotentialBlockSizeWithFlags(int* gridSize, int* blockSize,
3404  hipFunction_t f, size_t dynSharedMemPerBlk,
3405  int blockSizeLimit, unsigned int flags);
3406 
3416  int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk);
3417 
3428  int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags);
3429 
3439  int* numBlocks, const void* f, int blockSize, size_t dynSharedMemPerBlk);
3440 
3451  int* numBlocks, const void* f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags __dparm(hipOccupancyDefault));
3452 
3464 hipError_t hipOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize,
3465  const void* f, size_t dynSharedMemPerBlk,
3466  int blockSizeLimit);
3467 
3468 // doxygen end Occupancy
3486 // TODO - expand descriptions:
3492 DEPRECATED("use roctracer/rocTX instead")
3493 hipError_t hipProfilerStart();
3494 
3495 
3501 DEPRECATED("use roctracer/rocTX instead")
3502 hipError_t hipProfilerStop();
3503 
3504 // doxygen end profiler
3530 hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem __dparm(0), hipStream_t stream __dparm(0));
3531 
3532 
3543 hipError_t hipSetupArgument(const void* arg, size_t size, size_t offset);
3544 
3545 
3554 hipError_t hipLaunchByPtr(const void* func);
3555 
3556 
3572  dim3 blockDim,
3573  size_t sharedMem __dparm(0),
3574  hipStream_t stream __dparm(0));
3575 
3589 hipError_t __hipPopCallConfiguration(dim3 *gridDim,
3590  dim3 *blockDim,
3591  size_t *sharedMem,
3592  hipStream_t *stream);
3593 
3609 hipError_t hipLaunchKernel(const void* function_address,
3610  dim3 numBlocks,
3611  dim3 dimBlocks,
3612  void** args,
3613  size_t sharedMemBytes __dparm(0),
3614  hipStream_t stream __dparm(0));
3622 hipError_t hipDrvMemcpy2DUnaligned(const hip_Memcpy2D* pCopy);
3623 
3624 //TODO: Move this to hip_ext.h
3625 hipError_t hipExtLaunchKernel(const void* function_address, dim3 numBlocks, dim3 dimBlocks,
3626  void** args, size_t sharedMemBytes, hipStream_t stream,
3627  hipEvent_t startEvent, hipEvent_t stopEvent, int flags);
3628 // doxygen end Clang launch
3649 DEPRECATED(DEPRECATED_MSG)
3650 hipError_t hipBindTexture(
3651  size_t* offset,
3652  const textureReference* tex,
3653  const void* devPtr,
3654  const hipChannelFormatDesc* desc,
3655  size_t size __dparm(UINT_MAX));
3656 
3657 DEPRECATED(DEPRECATED_MSG)
3658 hipError_t hipBindTexture2D(
3659  size_t* offset,
3660  const textureReference* tex,
3661  const void* devPtr,
3662  const hipChannelFormatDesc* desc,
3663  size_t width,
3664  size_t height,
3665  size_t pitch);
3666 
3667 DEPRECATED(DEPRECATED_MSG)
3668 hipError_t hipBindTextureToArray(
3669  const textureReference* tex,
3670  hipArray_const_t array,
3671  const hipChannelFormatDesc* desc);
3672 
3673 DEPRECATED(DEPRECATED_MSG)
3674 hipError_t hipGetTextureAlignmentOffset(
3675  size_t* offset,
3676  const textureReference* texref);
3677 
3678 DEPRECATED(DEPRECATED_MSG)
3679 hipError_t hipUnbindTexture(const textureReference* tex);
3680 
3681 // doxygen end deprecated texture management
3686 hipError_t hipBindTextureToMipmappedArray(
3687  const textureReference* tex,
3688  hipMipmappedArray_const_t mipmappedArray,
3689  const hipChannelFormatDesc* desc);
3690 
3691  hipError_t hipGetTextureReference(
3692  const textureReference** texref,
3693  const void* symbol);
3694 
3695 hipError_t hipCreateTextureObject(
3696  hipTextureObject_t* pTexObject,
3697  const hipResourceDesc* pResDesc,
3698  const hipTextureDesc* pTexDesc,
3699  const struct hipResourceViewDesc* pResViewDesc);
3700 
3701 hipError_t hipDestroyTextureObject(hipTextureObject_t textureObject);
3702 
3703 hipError_t hipGetChannelDesc(
3704  hipChannelFormatDesc* desc,
3705  hipArray_const_t array);
3706 
3707 hipError_t hipGetTextureObjectResourceDesc(
3708  hipResourceDesc* pResDesc,
3709  hipTextureObject_t textureObject);
3710 
3711 hipError_t hipGetTextureObjectResourceViewDesc(
3712  struct hipResourceViewDesc* pResViewDesc,
3713  hipTextureObject_t textureObject);
3714 
3715 hipError_t hipGetTextureObjectTextureDesc(
3716  hipTextureDesc* pTexDesc,
3717  hipTextureObject_t textureObject);
3718 
3719 DEPRECATED(DEPRECATED_MSG)
3720 hipError_t hipTexRefGetAddress(
3721  hipDeviceptr_t* dev_ptr,
3722  const textureReference* texRef);
3723 
3724 DEPRECATED(DEPRECATED_MSG)
3725 hipError_t hipTexRefGetAddressMode(
3726  enum hipTextureAddressMode* pam,
3727  const textureReference* texRef,
3728  int dim);
3729 
3730 DEPRECATED(DEPRECATED_MSG)
3731 hipError_t hipTexRefGetFilterMode(
3732  enum hipTextureFilterMode* pfm,
3733  const textureReference* texRef);
3734 
3735 DEPRECATED(DEPRECATED_MSG)
3736 hipError_t hipTexRefGetFlags(
3737  unsigned int* pFlags,
3738  const textureReference* texRef);
3739 
3740 DEPRECATED(DEPRECATED_MSG)
3741 hipError_t hipTexRefGetFormat(
3742  hipArray_Format* pFormat,
3743  int* pNumChannels,
3744  const textureReference* texRef);
3745 
3746 DEPRECATED(DEPRECATED_MSG)
3747 hipError_t hipTexRefGetMaxAnisotropy(
3748  int* pmaxAnsio,
3749  const textureReference* texRef);
3750 
3751 DEPRECATED(DEPRECATED_MSG)
3752 hipError_t hipTexRefGetMipmapFilterMode(
3753  enum hipTextureFilterMode* pfm,
3754  const textureReference* texRef);
3755 
3756 DEPRECATED(DEPRECATED_MSG)
3757 hipError_t hipTexRefGetMipmapLevelBias(
3758  float* pbias,
3759  const textureReference* texRef);
3760 
3761 DEPRECATED(DEPRECATED_MSG)
3762 hipError_t hipTexRefGetMipmapLevelClamp(
3763  float* pminMipmapLevelClamp,
3764  float* pmaxMipmapLevelClamp,
3765  const textureReference* texRef);
3766 
3767 DEPRECATED(DEPRECATED_MSG)
3768 hipError_t hipTexRefGetMipMappedArray(
3769  hipMipmappedArray_t* pArray,
3770  const textureReference* texRef);
3771 
3772 DEPRECATED(DEPRECATED_MSG)
3773 hipError_t hipTexRefSetAddress(
3774  size_t* ByteOffset,
3775  textureReference* texRef,
3776  hipDeviceptr_t dptr,
3777  size_t bytes);
3778 
3779 DEPRECATED(DEPRECATED_MSG)
3780 hipError_t hipTexRefSetAddress2D(
3781  textureReference* texRef,
3782  const HIP_ARRAY_DESCRIPTOR* desc,
3783  hipDeviceptr_t dptr,
3784  size_t Pitch);
3785 
3786 hipError_t hipTexRefSetAddressMode(
3787  textureReference* texRef,
3788  int dim,
3789  enum hipTextureAddressMode am);
3790 
3791 hipError_t hipTexRefSetArray(
3792  textureReference* tex,
3793  hipArray_const_t array,
3794  unsigned int flags);
3795 
3796 hipError_t hipTexRefSetFilterMode(
3797  textureReference* texRef,
3798  enum hipTextureFilterMode fm);
3799 
3800 hipError_t hipTexRefSetFlags(
3801  textureReference* texRef,
3802  unsigned int Flags);
3803 
3804 hipError_t hipTexRefSetFormat(
3805  textureReference* texRef,
3806  hipArray_Format fmt,
3807  int NumPackedComponents);
3808 
3809 DEPRECATED(DEPRECATED_MSG)
3810 hipError_t hipTexRefSetMaxAnisotropy(
3811  textureReference* texRef,
3812  unsigned int maxAniso);
3813 
3814 hipError_t hipTexObjectCreate(
3815  hipTextureObject_t* pTexObject,
3816  const HIP_RESOURCE_DESC* pResDesc,
3817  const HIP_TEXTURE_DESC* pTexDesc,
3818  const HIP_RESOURCE_VIEW_DESC* pResViewDesc);
3819 
3820 hipError_t hipTexObjectDestroy(
3821  hipTextureObject_t texObject);
3822 
3823 hipError_t hipTexObjectGetResourceDesc(
3824  HIP_RESOURCE_DESC* pResDesc,
3825  hipTextureObject_t texObject);
3826 
3827 hipError_t hipTexObjectGetResourceViewDesc(
3828  HIP_RESOURCE_VIEW_DESC* pResViewDesc,
3829  hipTextureObject_t texObject);
3830 
3831 hipError_t hipTexObjectGetTextureDesc(
3832  HIP_TEXTURE_DESC* pTexDesc,
3833  hipTextureObject_t texObject);
3834 
3835 // doxygen end Texture management
3840 // The following are not supported.
3841 DEPRECATED(DEPRECATED_MSG)
3842 hipError_t hipTexRefSetBorderColor(
3843  textureReference* texRef,
3844  float* pBorderColor);
3845 
3846 hipError_t hipTexRefSetMipmapFilterMode(
3847  textureReference* texRef,
3848  enum hipTextureFilterMode fm);
3849 
3850 hipError_t hipTexRefSetMipmapLevelBias(
3851  textureReference* texRef,
3852  float bias);
3853 
3854 hipError_t hipTexRefSetMipmapLevelClamp(
3855  textureReference* texRef,
3856  float minMipMapLevelClamp,
3857  float maxMipMapLevelClamp);
3858 
3859 hipError_t hipTexRefSetMipmappedArray(
3860  textureReference* texRef,
3861  struct hipMipmappedArray* mipmappedArray,
3862  unsigned int Flags);
3863 
3864 hipError_t hipMipmappedArrayCreate(
3865  hipMipmappedArray_t* pHandle,
3866  HIP_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc,
3867  unsigned int numMipmapLevels);
3868 
3869 hipError_t hipMipmappedArrayDestroy(
3870  hipMipmappedArray_t hMipmappedArray);
3871 
3872 hipError_t hipMipmappedArrayGetLevel(
3873  hipArray_t* pLevelArray,
3874  hipMipmappedArray_t hMipMappedArray,
3875  unsigned int level);
3876 
3880 hipError_t hipRegisterApiCallback(uint32_t id, void* fun, void* arg);
3881 hipError_t hipRemoveApiCallback(uint32_t id);
3882 hipError_t hipRegisterActivityCallback(uint32_t id, void* fun, void* arg);
3883 hipError_t hipRemoveActivityCallback(uint32_t id);
3884 const char* hipApiName(uint32_t id);
3885 const char* hipKernelNameRef(const hipFunction_t f);
3886 const char* hipKernelNameRefByPtr(const void* hostFunction, hipStream_t stream);
3887 int hipGetStreamDeviceId(hipStream_t stream);
3888 
3889 #ifdef __cplusplus
3890 
3893 class hipGraph;
3894 typedef hipGraph* hipGraph_t;
3895 
3899 class hipGraphNode;
3900 typedef hipGraphNode* hipGraphNode_t;
3901 
3905 class hipGraphExec;
3906 typedef hipGraphExec* hipGraphExec_t;
3907 typedef enum hipGraphNodeType {
3908  hipGraphNodeTypeKernel = 1,
3909  hipGraphNodeTypeMemcpy = 2,
3910  hipGraphNodeTypeMemset = 3,
3911  hipGraphNodeTypeHost = 4,
3912  hipGraphNodeTypeGraph = 5,
3913  hipGraphNodeTypeEmpty = 6,
3914  hipGraphNodeTypeWaitEvent = 7,
3915  hipGraphNodeTypeEventRecord = 8,
3916  hipGraphNodeTypeMemcpy1D = 9,
3917  hipGraphNodeTypeMemcpyFromSymbol = 10,
3918  hipGraphNodeTypeMemcpyToSymbol = 11,
3919  hipGraphNodeTypeCount
3920 } hipGraphNodeType;
3921 
3922 typedef void (*hipHostFn_t)(void* userData);
3923 typedef struct hipHostNodeParams {
3924  hipHostFn_t fn;
3925  void* userData;
3926 } hipHostNodeParams;
3927 
3928 typedef struct hipKernelNodeParams {
3929  dim3 blockDim;
3930  void** extra;
3931  void* func;
3932  dim3 gridDim;
3933  void** kernelParams;
3934  unsigned int sharedMemBytes;
3935 } hipKernelNodeParams;
3936 
3937 typedef struct hipMemsetParams {
3938  void* dst;
3939  unsigned int elementSize;
3940  size_t height;
3941  size_t pitch;
3942  unsigned int value;
3943  size_t width;
3944 } hipMemsetParams;
3945 
3946 enum hipGraphExecUpdateResult {
3947  hipGraphExecUpdateSuccess = 0x0,
3948  hipGraphExecUpdateError = 0x1,
3949  hipGraphExecUpdateErrorTopologyChanged = 0x2,
3951  hipGraphExecUpdateErrorNodeTypeChanged = 0x3,
3952  hipGraphExecUpdateErrorFunctionChanged =
3953  0x4,
3954  hipGraphExecUpdateErrorParametersChanged =
3955  0x5,
3956  hipGraphExecUpdateErrorNotSupported =
3957  0x6,
3958  hipGraphExecUpdateErrorUnsupportedFunctionChange = 0x7
3959 };
3960 
3961 enum hipStreamCaptureMode {
3962  hipStreamCaptureModeGlobal = 0,
3963  hipStreamCaptureModeThreadLocal,
3964  hipStreamCaptureModeRelaxed
3965 };
3966 
3967 enum hipStreamCaptureStatus {
3968  hipStreamCaptureStatusNone = 0,
3969  hipStreamCaptureStatusActive,
3970  hipStreamCaptureStatusInvalidated
3971 };
3973 
3974 hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode);
3975 
3976 hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t* pGraph);
3977 
3978 // Creates a graph.
3979 hipError_t hipGraphCreate(hipGraph_t* pGraph, unsigned int flags);
3980 
3981 // Destroys a graph.
3982 hipError_t hipGraphDestroy(hipGraph_t graph);
3983 
3984 // Destroys an executable graph.
3985 hipError_t hipGraphExecDestroy(hipGraphExec_t pGraphExec);
3986 
3987 // Creates an executable graph from a graph.
3988 hipError_t hipGraphInstantiate(hipGraphExec_t* pGraphExec, hipGraph_t graph,
3989  hipGraphNode_t* pErrorNode, char* pLogBuffer, size_t bufferSize);
3990 
3991 // Launches an executable graph in a stream.
3992 hipError_t hipGraphLaunch(hipGraphExec_t graphExec, hipStream_t stream);
3993 
3994 // Creates a kernel execution node and adds it to a graph.
3995 hipError_t hipGraphAddKernelNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
3996  const hipGraphNode_t* pDependencies, size_t numDependencies,
3997  const hipKernelNodeParams* pNodeParams);
3998 
3999 // Creates a memcpy node and adds it to a graph.
4000 hipError_t hipGraphAddMemcpyNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
4001  const hipGraphNode_t* pDependencies, size_t numDependencies,
4002  const hipMemcpy3DParms* pCopyParams);
4003 
4004 // Creates a memset node and adds it to a graph.
4005 hipError_t hipGraphAddMemsetNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
4006  const hipGraphNode_t* pDependencies, size_t numDependencies,
4007  const hipMemsetParams* pMemsetParams);
4008 #endif
4009 // doxygen end graph API
4013 #ifdef __cplusplus
4014 } /* extern "c" */
4015 #endif
4016 
4017 
4018 #if USE_PROF_API
4019 #include <hip/amd_detail/hip_prof_str.h>
4020 #endif
4021 
4022 #ifdef __cplusplus
4023 
4024 #if defined(__clang__) && defined(__HIP__)
4025 template <typename T>
4026 static hipError_t __host__ inline hipOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize,
4027  T f, size_t dynSharedMemPerBlk = 0, int blockSizeLimit = 0) {
4028  return hipOccupancyMaxPotentialBlockSize(gridSize, blockSize, reinterpret_cast<const void*>(f),dynSharedMemPerBlk,blockSizeLimit);
4029 }
4030 
4031 template <typename T>
4032 static hipError_t __host__ inline hipOccupancyMaxPotentialBlockSizeWithFlags(int* gridSize, int* blockSize,
4033  T f, size_t dynSharedMemPerBlk = 0, int blockSizeLimit = 0, unsigned int flags = 0 ) {
4034  return hipOccupancyMaxPotentialBlockSize(gridSize, blockSize, reinterpret_cast<const void*>(f),dynSharedMemPerBlk,blockSizeLimit);
4035 }
4036 #endif // defined(__clang__) && defined(__HIP__)
4037 
4038 template <typename T>
4039 hipError_t hipGetSymbolAddress(void** devPtr, const T &symbol) {
4040  return ::hipGetSymbolAddress(devPtr, (const void *)&symbol);
4041 }
4042 
4043 template <typename T>
4044 hipError_t hipGetSymbolSize(size_t* size, const T &symbol) {
4045  return ::hipGetSymbolSize(size, (const void *)&symbol);
4046 }
4047 
4048 template <typename T>
4049 hipError_t hipMemcpyToSymbol(const T& symbol, const void* src, size_t sizeBytes,
4050  size_t offset __dparm(0),
4051  hipMemcpyKind kind __dparm(hipMemcpyHostToDevice)) {
4052  return ::hipMemcpyToSymbol((const void*)&symbol, src, sizeBytes, offset, kind);
4053 }
4054 
4055 template <typename T>
4056 hipError_t hipMemcpyToSymbolAsync(const T& symbol, const void* src, size_t sizeBytes, size_t offset,
4057  hipMemcpyKind kind, hipStream_t stream __dparm(0)) {
4058  return ::hipMemcpyToSymbolAsync((const void*)&symbol, src, sizeBytes, offset, kind, stream);
4059 }
4060 
4061 template <typename T>
4062 hipError_t hipMemcpyFromSymbol(void* dst, const T &symbol,
4063  size_t sizeBytes, size_t offset __dparm(0),
4064  hipMemcpyKind kind __dparm(hipMemcpyDeviceToHost)) {
4065  return ::hipMemcpyFromSymbol(dst, (const void*)&symbol, sizeBytes, offset, kind);
4066 }
4067 
4068 template <typename T>
4069 hipError_t hipMemcpyFromSymbolAsync(void* dst, const T& symbol, size_t sizeBytes, size_t offset,
4070  hipMemcpyKind kind, hipStream_t stream __dparm(0)) {
4071  return ::hipMemcpyFromSymbolAsync(dst, (const void*)&symbol, sizeBytes, offset, kind, stream);
4072 }
4073 
4074 template <class T>
4076  int* numBlocks, T f, int blockSize, size_t dynSharedMemPerBlk) {
4078  numBlocks, reinterpret_cast<const void*>(f), blockSize, dynSharedMemPerBlk);
4079 }
4080 
4081 template <class T>
4083  int* numBlocks, T f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags) {
4085  numBlocks, reinterpret_cast<const void*>(f), blockSize, dynSharedMemPerBlk, flags);
4086 }
4087 
4088 template <typename F>
4089 inline hipError_t hipOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize,
4090  F kernel, size_t dynSharedMemPerBlk, uint32_t blockSizeLimit) {
4091 return hipOccupancyMaxPotentialBlockSize(gridSize, blockSize,(hipFunction_t)kernel, dynSharedMemPerBlk, blockSizeLimit);
4092 }
4093 
4094 template <class T>
4095 inline hipError_t hipLaunchCooperativeKernel(T f, dim3 gridDim, dim3 blockDim,
4096  void** kernelParams, unsigned int sharedMemBytes, hipStream_t stream) {
4097  return hipLaunchCooperativeKernel(reinterpret_cast<const void*>(f), gridDim,
4098  blockDim, kernelParams, sharedMemBytes, stream);
4099 }
4100 
4101 template <class T>
4102 inline hipError_t hipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsList,
4103  unsigned int numDevices, unsigned int flags = 0) {
4104  return hipLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags);
4105 }
4106 
4107 template <class T>
4108 inline hipError_t hipExtLaunchMultiKernelMultiDevice(hipLaunchParams* launchParamsList,
4109  unsigned int numDevices, unsigned int flags = 0) {
4110  return hipExtLaunchMultiKernelMultiDevice(launchParamsList, numDevices, flags);
4111 }
4112 
4113 hipError_t hipCreateSurfaceObject(hipSurfaceObject_t* pSurfObject, const hipResourceDesc* pResDesc);
4114 
4115 hipError_t hipDestroySurfaceObject(hipSurfaceObject_t surfaceObject);
4116 
4117 template <class T, int dim, enum hipTextureReadMode readMode>
4118 DEPRECATED(DEPRECATED_MSG)
4119 static inline hipError_t hipBindTexture(size_t* offset, const struct texture<T, dim, readMode>& tex,
4120  const void* devPtr, size_t size = UINT_MAX) {
4121  return hipBindTexture(offset, &tex, devPtr, &tex.channelDesc, size);
4122 }
4123 
4124 template <class T, int dim, enum hipTextureReadMode readMode>
4125 DEPRECATED(DEPRECATED_MSG)
4126 static inline hipError_t
4127  hipBindTexture(size_t* offset, const struct texture<T, dim, readMode>& tex, const void* devPtr,
4128  const struct hipChannelFormatDesc& desc, size_t size = UINT_MAX) {
4129  return hipBindTexture(offset, &tex, devPtr, &desc, size);
4130 }
4131 
4132 template<class T, int dim, enum hipTextureReadMode readMode>
4133 DEPRECATED(DEPRECATED_MSG)
4134 static inline hipError_t hipBindTexture2D(
4135  size_t *offset,
4136  const struct texture<T, dim, readMode> &tex,
4137  const void *devPtr,
4138  size_t width,
4139  size_t height,
4140  size_t pitch)
4141 {
4142  return hipBindTexture2D(offset, &tex, devPtr, &tex.channelDesc, width, height, pitch);
4143 }
4144 
4145 template<class T, int dim, enum hipTextureReadMode readMode>
4146 DEPRECATED(DEPRECATED_MSG)
4147 static inline hipError_t hipBindTexture2D(
4148  size_t *offset,
4149  const struct texture<T, dim, readMode> &tex,
4150  const void *devPtr,
4151  const struct hipChannelFormatDesc &desc,
4152  size_t width,
4153  size_t height,
4154  size_t pitch)
4155 {
4156  return hipBindTexture2D(offset, &tex, devPtr, &desc, width, height, pitch);
4157 }
4158 
4159 template<class T, int dim, enum hipTextureReadMode readMode>
4160 DEPRECATED(DEPRECATED_MSG)
4161 static inline hipError_t hipBindTextureToArray(
4162  const struct texture<T, dim, readMode> &tex,
4163  hipArray_const_t array)
4164 {
4165  struct hipChannelFormatDesc desc;
4166  hipError_t err = hipGetChannelDesc(&desc, array);
4167  return (err == hipSuccess) ? hipBindTextureToArray(&tex, array, &desc) : err;
4168 }
4169 
4170 template<class T, int dim, enum hipTextureReadMode readMode>
4171 DEPRECATED(DEPRECATED_MSG)
4172 static inline hipError_t hipBindTextureToArray(
4173  const struct texture<T, dim, readMode> &tex,
4174  hipArray_const_t array,
4175  const struct hipChannelFormatDesc &desc)
4176 {
4177  return hipBindTextureToArray(&tex, array, &desc);
4178 }
4179 
4180 template<class T, int dim, enum hipTextureReadMode readMode>
4181 static inline hipError_t hipBindTextureToMipmappedArray(
4182  const struct texture<T, dim, readMode> &tex,
4183  hipMipmappedArray_const_t mipmappedArray)
4184 {
4185  struct hipChannelFormatDesc desc;
4186  hipArray_t levelArray;
4187  hipError_t err = hipGetMipmappedArrayLevel(&levelArray, mipmappedArray, 0);
4188  if (err != hipSuccess) {
4189  return err;
4190  }
4191  err = hipGetChannelDesc(&desc, levelArray);
4192  return (err == hipSuccess) ? hipBindTextureToMipmappedArray(&tex, mipmappedArray, &desc) : err;
4193 }
4194 
4195 template<class T, int dim, enum hipTextureReadMode readMode>
4196 static inline hipError_t hipBindTextureToMipmappedArray(
4197  const struct texture<T, dim, readMode> &tex,
4198  hipMipmappedArray_const_t mipmappedArray,
4199  const struct hipChannelFormatDesc &desc)
4200 {
4201  return hipBindTextureToMipmappedArray(&tex, mipmappedArray, &desc);
4202 }
4203 
4204 template<class T, int dim, enum hipTextureReadMode readMode>
4205 DEPRECATED(DEPRECATED_MSG)
4206 static inline hipError_t hipUnbindTexture(
4207  const struct texture<T, dim, readMode> &tex)
4208 {
4209  return hipUnbindTexture(&tex);
4210 }
4211 
4212 // doxygen end Texture
4217 #endif // __cplusplus
4218 
4219 #ifdef __GNUC__
4220 #pragma GCC visibility pop
4221 #endif
4222 
4223 // doxygen end HIP API
4228 #endif // HIP_INCLUDE_HIP_AMD_DETAIL_HIP_RUNTIME_API_H
hipFuncAttributes
Definition: hip_runtime_api.h:109
hipExternalMemoryBufferDesc_st
Definition: hip_runtime_api.h:360
hipPointerGetAttributes
hipError_t hipPointerGetAttributes(hipPointerAttribute_t *attributes, const void *ptr)
Return attributes for the specified pointer.
hipMemset3DAsync
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.
hipMemAdviseUnsetAccessedBy
@ hipMemAdviseUnsetAccessedBy
Definition: hip_runtime_api.h:240
hipMemcpy3D
hipError_t hipMemcpy3D(const struct hipMemcpy3DParms *p)
Copies data between host and device.
hipIpcOpenMemHandle
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...
hipCtxEnablePeerAccess
hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags)
Enables direct access to memory allocations in a peer context.
hipMallocPitch
hipError_t hipMallocPitch(void **ptr, size_t *pitch, size_t width, size_t height)
hipSetDevice
hipError_t hipSetDevice(int deviceId)
Set default device to be used for subsequent hip API calls from this thread.
hipDeviceGetP2PAttribute
hipError_t hipDeviceGetP2PAttribute(int *value, hipDeviceP2PAttr attr, int srcDevice, int dstDevice)
Returns a value for attr of link between two devices.
hipMemsetD16Async
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 v...
hipMemcpy2DFromArrayAsync
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.
hipDestroyExternalMemory
hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem)
Destroys an external memory object.
hipGetErrorString
const char * hipGetErrorString(hipError_t hipError)
Return handy text string message to explain the error which occurred.
hipMemRangeGetAttributes
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.
hipGetDeviceFlags
hipError_t hipGetDeviceFlags(unsigned int *flags)
Gets the flags set for current device.
hipDeviceGetByPCIBusId
hipError_t hipDeviceGetByPCIBusId(int *device, const char *pciBusId)
Returns a handle to a compute device.
hipMalloc3DArray
hipError_t hipMalloc3DArray(hipArray **array, const struct hipChannelFormatDesc *desc, struct hipExtent extent, unsigned int flags)
Allocate an array on the device.
hipChooseDevice
hipError_t hipChooseDevice(int *device, const hipDeviceProp_t *prop)
Device which matches hipDeviceProp_t is returned.
hipMemcpy2DAsync
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.
hipLaunchKernel
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.
hipMemsetD32
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 time...
hipStreamWriteValue64
hipError_t hipStreamWriteValue64(hipStream_t stream, void *ptr, int64_t value, unsigned int flags)
Enqueues a write command to the stream.
hipStreamCreate
hipError_t hipStreamCreate(hipStream_t *stream)
Create an asynchronous stream.
hipDeviceGetStreamPriorityRange
hipError_t hipDeviceGetStreamPriorityRange(int *leastPriority, int *greatestPriority)
Returns numerical values that correspond to the least and greatest stream priority.
hipIpcEventHandle_st
Definition: hip_runtime_api.h:101
hipStreamCreateWithPriority
hipError_t hipStreamCreateWithPriority(hipStream_t *stream, unsigned int flags, int priority)
Create an asynchronous stream with the specified priority.
hipMemAdviseUnsetReadMostly
@ hipMemAdviseUnsetReadMostly
Undo the effect of hipMemAdviseSetReadMostly.
Definition: hip_runtime_api.h:234
hipFuncCache_t
hipFuncCache_t
Definition: hip_runtime_api.h:296
hipPeekAtLastError
hipError_t hipPeekAtLastError(void)
Return last error returned by any HIP runtime API call.
hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags __dparm(hipOccupancyDefault))
Returns occupancy for a device function.
hipModuleGetTexRef
hipError_t hipModuleGetTexRef(textureReference **texRef, hipModule_t hmod, const char *name)
returns the handle of the texture reference with the name from the module.
hipMemcpy3DAsync
hipError_t hipMemcpy3DAsync(const struct hipMemcpy3DParms *p, hipStream_t stream __dparm(0))
Copies data between host and device asynchronously.
hipDeviceGetPCIBusId
hipError_t hipDeviceGetPCIBusId(char *pciBusId, int len, int device)
Returns a PCI Bus Id string for the device, overloaded to take int device ID.
hipHostGetFlags
hipError_t hipHostGetFlags(unsigned int *flagsPtr, void *hostPtr)
Return flags associated with host pointer.
hipMemGetAddressRange
hipError_t hipMemGetAddressRange(hipDeviceptr_t *pbase, size_t *psize, hipDeviceptr_t dptr)
Get information on memory allocations.
hipSurfaceObject_t
unsigned long long hipSurfaceObject_t
Definition: hip_surface_types.h:36
hipStreamWaitEvent
hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags)
Make the specified compute stream wait for an event.
hipFuncCachePreferEqual
@ hipFuncCachePreferEqual
prefer equal size L1 cache and shared memory
Definition: hip_runtime_api.h:300
hipGetDevice
hipError_t hipGetDevice(int *deviceId)
Return the default device id for the calling host thread.
hipMallocArray
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.
hipCtxSetCurrent
hipError_t hipCtxSetCurrent(hipCtx_t ctx)
Set the passed context as current/default.
hipMemcpyToArray
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.
HIP_MEMCPY3D
Definition: driver_types.h:406
hipMemcpyDtoDAsync
hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream)
Copy data from Device to Device asynchronously.
hipMemcpy2DFromArray
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.
hipModuleOccupancyMaxPotentialBlockSizeWithFlags
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
hipDevicePrimaryCtxRelease
hipError_t hipDevicePrimaryCtxRelease(hipDevice_t dev)
Release the primary context on the GPU.
hipHostMalloc
hipError_t hipHostMalloc(void **ptr, size_t size, unsigned int flags)
Allocate device accessible page locked host memory.
dim3::y
uint32_t y
y
Definition: hip_runtime_api.h:320
hipMemRangeGetAttribute
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.
hipDeviceGetName
hipError_t hipDeviceGetName(char *name, int len, hipDevice_t device)
Returns an identifer string for the device.
hipMemcpyParam2DAsync
hipError_t hipMemcpyParam2DAsync(const hip_Memcpy2D *pCopy, hipStream_t stream __dparm(0))
Copies memory for 2D arrays.
hipMemAdvise
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.
hipDeviceEnablePeerAccess
hipError_t hipDeviceEnablePeerAccess(int peerDeviceId, unsigned int flags)
Enable direct access from current device's virtual address space to memory allocations physically loc...
hipCtxSetCacheConfig
hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig)
Set L1/Shared cache partition.
hipExternalMemoryGetMappedBuffer
hipError_t hipExternalMemoryGetMappedBuffer(void **devPtr, hipExternalMemory_t extMem, const hipExternalMemoryBufferDesc *bufferDesc)
Maps a buffer onto an imported memory object.
hipStreamWaitValue32
hipError_t hipStreamWaitValue32(hipStream_t stream, void *ptr, int32_t value, unsigned int flags, uint32_t mask __dparm(0xFFFFFFFF))
Enqueues a wait command to the stream.
hipMallocMipmappedArray
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.
hipCtxPushCurrent
hipError_t hipCtxPushCurrent(hipCtx_t ctx)
Push the context to be set as current/ default context.
hipSharedMemConfig
hipSharedMemConfig
Definition: hip_runtime_api.h:306
hipDrvMemcpy3D
hipError_t hipDrvMemcpy3D(const HIP_MEMCPY3D *pCopy)
Copies data between host and device.
dim3::x
uint32_t x
x
Definition: hip_runtime_api.h:319
hipDeviceComputeCapability
hipError_t hipDeviceComputeCapability(int *major, int *minor, hipDevice_t device)
Returns the compute capability of the device.
hipStreamCallback_t
void(* hipStreamCallback_t)(hipStream_t stream, hipError_t status, void *userData)
Definition: hip_runtime_api.h:1236
hipMemoryAdvise
hipMemoryAdvise
Definition: hip_runtime_api.h:231
hip_Memcpy2D
Definition: driver_types.h:98
hipGetMipmappedArrayLevel
hipError_t hipGetMipmappedArrayLevel(hipArray_t *levelArray, hipMipmappedArray_const_t mipmappedArray, unsigned int level)
Gets a mipmap level of a HIP mipmapped array.
hipModuleOccupancyMaxPotentialBlockSize
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
__hipPushCallConfiguration
hipError_t __hipPushCallConfiguration(dim3 gridDim, dim3 blockDim, size_t sharedMem __dparm(0), hipStream_t stream __dparm(0))
Push configuration of a kernel launch.
hipIpcCloseMemHandle
hipError_t hipIpcCloseMemHandle(void *devPtr)
Close memory mapped with hipIpcOpenMemHandle.
hipDevicePrimaryCtxGetState
hipError_t hipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int *flags, int *active)
Get the state of the primary context.
hipLaunchCooperativeKernelMultiDevice
hipError_t hipLaunchCooperativeKernelMultiDevice(hipLaunchParams *launchParamsList, int numDevices, unsigned int flags)
Launches kernels on multiple devices where thread blocks can cooperate and synchronize as they execut...
hipDeviceSetCacheConfig
hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig)
Set L1/Shared cache partition.
hipMemcpyAtoH
hipError_t hipMemcpyAtoH(void *dst, hipArray *srcArray, size_t srcOffset, size_t count)
Copies data between host and device.
hipGetDeviceCount
hipError_t hipGetDeviceCount(int *count)
Return number of compute-capable devices.
hipSuccess
hipSuccess
Successful completion.
Definition: hip_runtime_api.h:204
hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags)
Returns occupancy for a device function.
hipSetupArgument
hipError_t hipSetupArgument(const void *arg, size_t size, size_t offset)
Set a kernel argument.
hipHostUnregister
hipError_t hipHostUnregister(void *hostPtr)
Un-register host pointer.
hipStreamGetFlags
hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int *flags)
Return flags associated with this stream.
hipMemsetD8Async
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 va...
hipExtStreamCreateWithCUMask
hipError_t hipExtStreamCreateWithCUMask(hipStream_t *stream, uint32_t cuMaskSize, const uint32_t *cuMask)
Create an asynchronous stream with the specified CU mask.
hipStreamSynchronize
hipError_t hipStreamSynchronize(hipStream_t stream)
Wait for all commands in stream to complete.
hip_texture_types.h
Defines the different newt vector types for HIP runtime.
hipGetErrorName
const char * hipGetErrorName(hipError_t hip_error)
Return name of the specified error code in text form.
dim3
struct dim3 dim3
hipDeviceGet
hipError_t hipDeviceGet(hipDevice_t *device, int ordinal)
Returns a handle to a compute device.
__host__
#define __host__
Definition: host_defines.h:59
hipMemcpyDtoD
hipError_t hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes)
Copy data from Device to Device.
hipMemcpy3DParms
Definition: driver_types.h:395
hipIpcGetMemHandle
hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t *handle, void *devPtr)
Gets an interprocess memory handle for an existing device memory allocation.
hipMemcpyHtoD
hipError_t hipMemcpyHtoD(hipDeviceptr_t dst, void *src, size_t sizeBytes)
Copy data from Host to Device.
hipDriverGetVersion
hipError_t hipDriverGetVersion(int *driverVersion)
Returns the approximate HIP driver version.
hipCtxGetFlags
hipError_t hipCtxGetFlags(unsigned int *flags)
Return flags used for creating default context.
hipMemcpy2DToArray
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.
hipMemAllocPitch
hipError_t hipMemAllocPitch(hipDeviceptr_t *dptr, size_t *pitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes)
hipDeviceProp_t
Definition: hip_runtime_api.h:84
hipMemAllocHost
hipError_t hipMemAllocHost(void **ptr, size_t size)
Allocate pinned host memory [Deprecated].
Definition: hip_runtime_api.h:947
hipMallocHost
hipError_t hipMallocHost(void **ptr, size_t size)
Allocate pinned host memory [Deprecated].
Definition: hip_runtime_api.h:941
hip_surface_types.h
Defines surface types for HIP runtime.
host_defines.h
TODO-doc.
hipMemsetD32Async
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...
hipRuntimeGetVersion
hipError_t hipRuntimeGetVersion(int *runtimeVersion)
Returns the approximate HIP Runtime version.
hipConfigureCall
hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem __dparm(0), hipStream_t stream __dparm(0))
Configure a kernel launch.
hipLaunchCooperativeKernel
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 kernelp...
hipEventQuery
hipError_t hipEventQuery(hipEvent_t event)
Query event status.
hipExtLaunchMultiKernelMultiDevice
hipError_t hipExtLaunchMultiKernelMultiDevice(hipLaunchParams *launchParamsList, int numDevices, unsigned int flags)
Launches kernels on multiple devices and guarantees all specified kernels are dispatched on respectiv...
hipStreamGetPriority
hipError_t hipStreamGetPriority(hipStream_t stream, int *priority)
Query the priority of a stream.
hipOccupancyMaxActiveBlocksPerMultiprocessor
hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *f, int blockSize, size_t dynSharedMemPerBlk)
Returns occupancy for a device function.
hipCtxGetApiVersion
hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int *apiVersion)
Returns the approximate HIP api version.
hipSharedMemBankSizeFourByte
@ hipSharedMemBankSizeFourByte
Definition: hip_runtime_api.h:308
hipEventSynchronize
hipError_t hipEventSynchronize(hipEvent_t event)
Wait for an event to complete.
hipFuncCachePreferNone
@ hipFuncCachePreferNone
no preference for shared memory or L1 (default)
Definition: hip_runtime_api.h:297
hipCtxCreate
hipError_t hipCtxCreate(hipCtx_t *ctx, unsigned int flags, hipDevice_t device)
Create a context and set it as current/ default context.
hipHostFree
hipError_t hipHostFree(void *ptr)
Free memory allocated by the hcc hip host memory allocation API This API performs an implicit hipDevi...
hipMemsetD16
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 v...
hipMipmappedArray
Definition: driver_types.h:122
hipMemRangeAttributeAccessedBy
@ hipMemRangeAttributeAccessedBy
Definition: hip_runtime_api.h:253
hipDeviceGetLimit
hipError_t hipDeviceGetLimit(size_t *pValue, enum hipLimit_t limit)
Get Resource limits of current device.
hipLaunchParams_t::args
void ** args
Arguments.
Definition: hip_runtime_api.h:331
hipMalloc
hipError_t hipMalloc(void **ptr, size_t size)
Allocate memory on the default accelerator.
hipIpcMemHandle_st
Definition: hip_runtime_api.h:97
hipEventElapsedTime
hipError_t hipEventElapsedTime(float *ms, hipEvent_t start, hipEvent_t stop)
Return the elapsed time between two events.
hipGetLastError
hipError_t hipGetLastError(void)
Return last error returned by any HIP runtime API call and resets the stored error code to hipSuccess...
hipInit
hipError_t hipInit(unsigned int flags)
Explicitly initializes the HIP runtime.
HIP_TEXTURE_DESC_st
Definition: driver_types.h:177
hipFuncSetCacheConfig
hipError_t hipFuncSetCacheConfig(const void *func, hipFuncCache_t config)
Set Cache configuration for a specific function.
hipCtxPopCurrent
hipError_t hipCtxPopCurrent(hipCtx_t *ctx)
Pop the current/default context and return the popped context.
hipArray
Definition: driver_types.h:84
hipHostGetDevicePointer
hipError_t hipHostGetDevicePointer(void **devPtr, void *hstPtr, unsigned int flags)
Get Device pointer from Host Pointer allocated through hipHostMalloc.
hipMemGetInfo
hipError_t hipMemGetInfo(size_t *free, size_t *total)
Query memory info. Return snapshot of free memory, and total allocatable memory on the device.
hipEventDestroy
hipError_t hipEventDestroy(hipEvent_t event)
Destroy the specified event.
hipDeviceSetSharedMemConfig
hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config)
The bank width of shared memory on current device is set.
hipDeviceReset
hipError_t hipDeviceReset(void)
The state of current device is discarded and updated to a fresh state.
hipSetDeviceFlags
hipError_t hipSetDeviceFlags(unsigned flags)
The current device behavior is changed according the flags passed.
hipCtxGetCurrent
hipError_t hipCtxGetCurrent(hipCtx_t *ctx)
Get the handle of the current/ default context.
hipFuncGetAttributes
hipError_t hipFuncGetAttributes(struct hipFuncAttributes *attr, const void *func)
Find out attributes for a given function.
HIP_ARRAY3D_DESCRIPTOR
Definition: driver_types.h:75
hipFuncGetAttribute
hipError_t hipFuncGetAttribute(int *value, hipFunction_attribute attrib, hipFunction_t hfunc)
Find out a specific attribute for a given function.
dim3
Definition: hip_runtime_api.h:318
hipStreamQuery
hipError_t hipStreamQuery(hipStream_t stream)
Return hipSuccess if all of the operations in the specified stream have completed,...
hipLaunchByPtr
hipError_t hipLaunchByPtr(const void *func)
Launch a kernel.
hipExtStreamGetCUMask
hipError_t hipExtStreamGetCUMask(hipStream_t stream, uint32_t cuMaskSize, uint32_t *cuMask)
Get CU mask associated with an asynchronous stream.
hipExtMallocWithFlags
hipError_t hipExtMallocWithFlags(void **ptr, size_t sizeBytes, unsigned int flags)
Allocate memory on the default accelerator.
hipStreamAttachMemAsync
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.
hipMemcpy2DToArrayAsync
hipError_t hipMemcpy2DToArrayAsync(hipArray *dst, size_t wOffset, size_t hOffset, 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.
hipDevicePrimaryCtxSetFlags
hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags)
Set flags for the primary context.
hipPointerAttribute_t
Definition: hip_runtime_api.h:169
hipFree
hipError_t hipFree(void *ptr)
Free memory allocated by the hcc hip memory allocation API. This API performs an implicit hipDeviceSy...
hipLaunchParams_t::func
void * func
Device function symbol.
Definition: hip_runtime_api.h:328
hipArrayDefault
#define hipArrayDefault
Default HIP array allocation flag.
Definition: hip_runtime_api.h:203
hipDevicePrimaryCtxRetain
hipError_t hipDevicePrimaryCtxRetain(hipCtx_t *pctx, hipDevice_t dev)
Retain the primary context on the GPU.
hipCtxSynchronize
hipError_t hipCtxSynchronize(void)
Blocks until the default context has completed all preceding requested tasks.
hipFreeHost
hipError_t hipFreeHost(void *ptr)
Free memory allocated by the hcc hip host memory allocation API. [Deprecated].
Definition: hip_runtime_api.h:1030
hipMemcpyHtoA
hipError_t hipMemcpyHtoA(hipArray *dstArray, size_t dstOffset, const void *srcHost, size_t count)
Copies data between host and device.
hipStreamAddCallback
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 comple...
hipLaunchParams_t::stream
hipStream_t stream
Stream identifier.
Definition: hip_runtime_api.h:333
hipMemcpyDtoHAsync
hipError_t hipMemcpyDtoHAsync(void *dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream)
Copy data from Device to Host asynchronously.
hipMemRangeAttributeReadMostly
@ hipMemRangeAttributeReadMostly
Definition: hip_runtime_api.h:250
hipMemRangeAttributeLastPrefetchLocation
@ hipMemRangeAttributeLastPrefetchLocation
The last location to which the range was prefetched.
Definition: hip_runtime_api.h:255
hipDrvMemcpy3DAsync
hipError_t hipDrvMemcpy3DAsync(const HIP_MEMCPY3D *pCopy, hipStream_t stream)
Copies data between host and device asynchronously.
hipEventRecord
hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream)
Record an event in the specified stream.
hipExternalMemoryHandleDesc_st
Definition: hip_runtime_api.h:347
hipLaunchParams_t::gridDim
dim3 gridDim
Grid dimentions.
Definition: hip_runtime_api.h:329
hipMemcpy2D
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.
hipExtent
Definition: driver_types.h:382
hipPitchedPtr
Definition: driver_types.h:375
hipMemAdviseSetReadMostly
@ hipMemAdviseSetReadMostly
Definition: hip_runtime_api.h:232
hipSharedMemBankSizeDefault
@ hipSharedMemBankSizeDefault
The compiler selects a device-specific value for the banking.
Definition: hip_runtime_api.h:307
hipMemset2D
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.
hipMemset3D
hipError_t hipMemset3D(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent)
Fills synchronously the memory area pointed to by pitchedDevPtr with the constant value.
hipStreamCreateWithFlags
hipError_t hipStreamCreateWithFlags(hipStream_t *stream, unsigned int flags)
Create an asynchronous stream.
hipDeviceGetAttribute
hipError_t hipDeviceGetAttribute(int *pi, hipDeviceAttribute_t attr, int deviceId)
Query for a specific device attribute.
hipMemcpyFromArray
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.
hipMemcpyPeerAsync
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.
hipDrvMemcpy2DUnaligned
hipError_t hipDrvMemcpy2DUnaligned(const hip_Memcpy2D *pCopy)
hipMemcpyHtoDAsync
hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, void *src, size_t sizeBytes, hipStream_t stream)
Copy data from Host to Device asynchronously.
hipMemcpyDtoH
hipError_t hipMemcpyDtoH(void *dst, hipDeviceptr_t src, size_t sizeBytes)
Copy data from Device to Host.
hipDeviceGetCacheConfig
hipError_t hipDeviceGetCacheConfig(hipFuncCache_t *cacheConfig)
Set Cache configuration for a specific function.
hipMemcpyPeer
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.
hipModuleLoadDataEx
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....
hipFreeMipmappedArray
hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray)
Frees a mipmapped array on the device.
hipRegisterApiCallback
hipError_t hipRegisterApiCallback(uint32_t id, void *fun, void *arg)
hipGetDeviceProperties
hipError_t hipGetDeviceProperties(hipDeviceProp_t *prop, int deviceId)
Returns device properties.
hipMemcpy
hipError_t hipMemcpy(void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind)
Copy data from src to dst.
hipEventCreateWithFlags
hipError_t hipEventCreateWithFlags(hipEvent_t *event, unsigned flags)
Create an event with the specified flags.
hipDeviceTotalMem
hipError_t hipDeviceTotalMem(size_t *bytes, hipDevice_t device)
Returns the total amount of memory on the device.
hipStreamWaitValue64
hipError_t hipStreamWaitValue64(hipStream_t stream, void *ptr, int64_t value, unsigned int flags, uint64_t mask __dparm(0xFFFFFFFFFFFFFFFF))
Enqueues a wait command to the stream.
hipFreeArray
hipError_t hipFreeArray(hipArray *array)
Frees an array on the device.
hipMallocManaged
hipError_t hipMallocManaged(void **dev_ptr, size_t size, unsigned int flags __dparm(hipMemAttachGlobal))
Allocates memory that will be automatically managed by AMD HMM.
textureReference
Definition: texture_types.h:74
hipCtxGetSharedMemConfig
hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig *pConfig)
Get Shared memory bank configuration.
hipDeviceCanAccessPeer
hipError_t hipDeviceCanAccessPeer(int *canAccessPeer, int deviceId, int peerDeviceId)
Determine if a device can access a peer's memory.
hipModuleGetFunction
hipError_t hipModuleGetFunction(hipFunction_t *function, hipModule_t module, const char *kname)
Function with kname will be extracted if present in module.
hipMemAdviseUnsetPreferredLocation
@ hipMemAdviseUnsetPreferredLocation
Clear the preferred location for the data.
Definition: hip_runtime_api.h:237
hipMemPrefetchAsync
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.
hipCtxDisablePeerAccess
hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx)
Disable direct access from current context's virtual address space to memory allocations physically l...
hipMemAdviseSetPreferredLocation
@ hipMemAdviseSetPreferredLocation
Definition: hip_runtime_api.h:235
HIP_RESOURCE_DESC_st
Definition: driver_types.h:299
hipTextureDesc
Definition: texture_types.h:95
hipResourceViewDesc
Definition: driver_types.h:334
dim3::z
uint32_t z
z
Definition: hip_runtime_api.h:321
hipCtxSetSharedMemConfig
hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config)
Set Shared memory bank configuration.
hipMemsetD8
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 va...
hipMemset2DAsync
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.
HIP_ARRAY_DESCRIPTOR
Definition: driver_types.h:68
hipCtxGetDevice
hipError_t hipCtxGetDevice(hipDevice_t *device)
Get the handle of the device associated with current/default context.
hipLaunchParams_t::blockDim
dim3 blockDim
Block dimentions.
Definition: hip_runtime_api.h:330
hipMemAttachGlobal
#define hipMemAttachGlobal
Memory can be accessed by any stream on any device.
Definition: hip_runtime_api.h:172
hipLaunchParams_t
Definition: hip_runtime_api.h:327
hipFuncCachePreferShared
@ hipFuncCachePreferShared
prefer larger shared memory and smaller L1 cache
Definition: hip_runtime_api.h:298
hipMemRangeAttributePreferredLocation
@ hipMemRangeAttributePreferredLocation
The preferred location of the range.
Definition: hip_runtime_api.h:252
hipFuncAttribute
hipFuncAttribute
Definition: hip_runtime_api.h:287
hipStreamWriteValue32
hipError_t hipStreamWriteValue32(hipStream_t stream, void *ptr, int32_t value, unsigned int flags)
Enqueues a write command to the stream.
hipSharedMemBankSizeEightByte
@ hipSharedMemBankSizeEightByte
Definition: hip_runtime_api.h:310
hipDeviceAttribute_t
hipDeviceAttribute_t
Definition: hip_runtime_api.h:321
hipFuncSetSharedMemConfig
hipError_t hipFuncSetSharedMemConfig(const void *func, hipSharedMemConfig config)
Set shared memory configuation for a specific function.
hipExtGetLinkTypeAndHopCount
hipError_t hipExtGetLinkTypeAndHopCount(int device1, int device2, uint32_t *linktype, uint32_t *hopcount)
Returns the link type and hop count between two devices.
hipResourceDesc
Definition: driver_types.h:273
hipDeviceSynchronize
hipError_t hipDeviceSynchronize(void)
Waits on all active streams on current device.
hipCtxGetCacheConfig
hipError_t hipCtxGetCacheConfig(hipFuncCache_t *cacheConfig)
Set Cache configuration for a specific function.
hipLaunchParams_t::sharedMem
size_t sharedMem
Shared memory.
Definition: hip_runtime_api.h:332
hipCtxDestroy
hipError_t hipCtxDestroy(hipCtx_t ctx)
Destroy a HIP context.
hipModuleLaunchKernel
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 kernelp...
hipProfilerStart
hipError_t hipProfilerStart()
Start recording of profiling information When using this API, start the profiler with profiling disab...
hipDeviceGetSharedMemConfig
hipError_t hipDeviceGetSharedMemConfig(hipSharedMemConfig *pConfig)
Returns bank width of shared memory for current device.
hipMemcpyAsync
hipError_t hipMemcpyAsync(void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream __dparm(0))
Copy data from src to dst asynchronously.
hipOccupancyMaxPotentialBlockSize
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
hipStreamDestroy
hipError_t hipStreamDestroy(hipStream_t stream)
Destroys the specified stream.
hipHostRegister
hipError_t hipHostRegister(void *hostPtr, size_t sizeBytes, unsigned int flags)
Register host memory so it can be accessed from the current device.
hipModuleLoad
hipError_t hipModuleLoad(hipModule_t *module, const char *fname)
Loads code object from file into a hipModule_t.
hipProfilerStop
hipError_t hipProfilerStop()
Stop recording of profiling information. When using this API, start the profiler with profiling disab...
hipEventCreate
hipError_t hipEventCreate(hipEvent_t *event)
HIP_RESOURCE_VIEW_DESC_st
Definition: driver_types.h:349
hipMemsetAsync
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 val...
hipModuleLoadData
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.
hipFuncCachePreferL1
@ hipFuncCachePreferL1
prefer larger L1 cache and smaller shared memory
Definition: hip_runtime_api.h:299
hipMemAttachSingle
#define hipMemAttachSingle
the associated device
Definition: hip_runtime_api.h:174
hipMemcpyParam2D
hipError_t hipMemcpyParam2D(const hip_Memcpy2D *pCopy)
Copies memory for 2D arrays.
hipHostAlloc
hipError_t hipHostAlloc(void **ptr, size_t size, unsigned int flags)
Allocate device accessible page locked host memory [Deprecated].
Definition: hip_runtime_api.h:953
hipMemset
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 va...
hipDeviceDisablePeerAccess
hipError_t hipDeviceDisablePeerAccess(int peerDeviceId)
Disable direct access from current device's virtual address space to memory allocations physically lo...
hipModuleOccupancyMaxActiveBlocksPerMultiprocessor
hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk)
Returns occupancy for a device function.
hipFuncSetAttribute
hipError_t hipFuncSetAttribute(const void *func, hipFuncAttribute attr, int value)
Set attribute for a specific function.
__hipPopCallConfiguration
hipError_t __hipPopCallConfiguration(dim3 *gridDim, dim3 *blockDim, size_t *sharedMem, hipStream_t *stream)
Pop configuration of a kernel launch.
hipDevicePrimaryCtxReset
hipError_t hipDevicePrimaryCtxReset(hipDevice_t dev)
Resets the primary context on the GPU.
hipChannelFormatDesc
Definition: driver_types.h:44
hipModuleUnload
hipError_t hipModuleUnload(hipModule_t module)
Frees the module.
hipMemAdviseSetAccessedBy
@ hipMemAdviseSetAccessedBy
Definition: hip_runtime_api.h:238
hipMemRangeAttribute
hipMemRangeAttribute
Definition: hip_runtime_api.h:249
hipImportExternalMemory
hipError_t hipImportExternalMemory(hipExternalMemory_t *extMem_out, const hipExternalMemoryHandleDesc *memHandleDesc)
Imports an external memory object.