30 #ifndef HIP_INCLUDE_HIP_HIP_RUNTIME_API_H 31 #define HIP_INCLUDE_HIP_HIP_RUNTIME_API_H 35 #include <hip/hip_version.h> 36 #include <hip/hip_common.h> 40 HIP_ERROR_INVALID_VALUE,
41 HIP_ERROR_NOT_INITIALIZED,
42 HIP_ERROR_LAUNCH_OUT_OF_RESOURCES
47 unsigned hasGlobalInt32Atomics : 1;
48 unsigned hasGlobalFloatAtomicExch : 1;
49 unsigned hasSharedInt32Atomics : 1;
50 unsigned hasSharedFloatAtomicExch : 1;
51 unsigned hasFloatAtomicAdd : 1;
54 unsigned hasGlobalInt64Atomics : 1;
55 unsigned hasSharedInt64Atomics : 1;
58 unsigned hasDoubles : 1;
61 unsigned hasWarpVote : 1;
62 unsigned hasWarpBallot : 1;
63 unsigned hasWarpShuffle : 1;
64 unsigned hasFunnelShift : 1;
67 unsigned hasThreadFenceSystem : 1;
68 unsigned hasSyncThreadsExt : 1;
71 unsigned hasSurfaceFuncs : 1;
72 unsigned has3dGrid : 1;
73 unsigned hasDynamicParallelism : 1;
175 unsigned allocationFlags;
189 #if __cplusplus >= 201703L 190 #define __HIP_NODISCARD [[nodiscard]] 192 #define __HIP_NODISCARD 203 typedef enum __HIP_NODISCARD hipError_t {
206 hipErrorOutOfMemory = 2,
210 hipErrorNotInitialized = 3,
212 hipErrorInitializationError = 3,
213 hipErrorDeinitialized = 4,
214 hipErrorProfilerDisabled = 5,
215 hipErrorProfilerNotInitialized = 6,
216 hipErrorProfilerAlreadyStarted = 7,
217 hipErrorProfilerAlreadyStopped = 8,
218 hipErrorInvalidConfiguration = 9,
219 hipErrorInvalidPitchValue = 12,
220 hipErrorInvalidSymbol = 13,
223 hipErrorInsufficientDriver = 35,
224 hipErrorMissingConfiguration = 52,
225 hipErrorPriorLaunchFailure = 53,
226 hipErrorInvalidDeviceFunction = 98,
229 hipErrorInvalidImage = 200,
231 hipErrorContextAlreadyCurrent = 202,
232 hipErrorMapFailed = 205,
235 hipErrorUnmapFailed = 206,
236 hipErrorArrayIsMapped = 207,
237 hipErrorAlreadyMapped = 208,
238 hipErrorNoBinaryForGpu = 209,
239 hipErrorAlreadyAcquired = 210,
240 hipErrorNotMapped = 211,
241 hipErrorNotMappedAsArray = 212,
242 hipErrorNotMappedAsPointer = 213,
243 hipErrorECCNotCorrectable = 214,
244 hipErrorUnsupportedLimit = 215,
245 hipErrorContextAlreadyInUse = 216,
246 hipErrorPeerAccessUnsupported = 217,
248 hipErrorInvalidGraphicsContext = 219,
249 hipErrorInvalidSource = 300,
250 hipErrorFileNotFound = 301,
251 hipErrorSharedObjectSymbolNotFound = 302,
252 hipErrorSharedObjectInitFailed = 303,
253 hipErrorOperatingSystem = 304,
254 hipErrorInvalidHandle = 400,
257 hipErrorNotFound = 500,
259 hipErrorIllegalAddress = 700,
264 hipErrorLaunchTimeOut = 702,
269 hipErrorSetOnActiveProcess = 708,
270 hipErrorContextIsDestroyed = 709,
302 hipErrorUnknown = 999,
314 #undef __HIP_NODISCARD 398 enum hipComputeMode {
399 hipComputeModeDefault = 0,
400 hipComputeModeExclusive = 1,
401 hipComputeModeProhibited = 2,
402 hipComputeModeExclusiveProcess = 3
409 #if (defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) 413 #ifndef GENERIC_GRID_LAUNCH 414 #define GENERIC_GRID_LAUNCH 1 416 #include <hip/amd_detail/host_defines.h> 417 #include <hip/driver_types.h> 418 #include <hip/texture_types.h> 420 #if defined(_MSC_VER) 421 #define DEPRECATED(msg) __declspec(deprecated(msg)) 422 #else // !defined(_MSC_VER) 423 #define DEPRECATED(msg) __attribute__ ((deprecated(msg))) 424 #endif // !defined(_MSC_VER) 425 #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" 426 #define HIP_LAUNCH_PARAM_BUFFER_POINTER ((void*)0x01) 427 #define HIP_LAUNCH_PARAM_BUFFER_SIZE ((void*)0x02) 428 #define HIP_LAUNCH_PARAM_END ((void*)0x03) 436 #pragma GCC visibility push (default) 440 hipError_t hip_init();
449 typedef struct ihipCtx_t* hipCtx_t;
451 typedef int hipDevice_t;
452 typedef enum hipDeviceP2PAttr {
453 hipDevP2PAttrPerformanceRank = 0,
454 hipDevP2PAttrAccessSupported,
455 hipDevP2PAttrNativeAtomicSupported,
456 hipDevP2PAttrHipArrayAccessSupported
458 typedef struct ihipStream_t* hipStream_t;
459 #define hipIpcMemLazyEnablePeerAccess 0 460 #define HIP_IPC_HANDLE_SIZE 64 462 char reserved[HIP_IPC_HANDLE_SIZE];
465 char reserved[HIP_IPC_HANDLE_SIZE];
467 typedef struct ihipModule_t* hipModule_t;
468 typedef struct ihipModuleSymbol_t* hipFunction_t;
472 size_t constSizeBytes;
473 size_t localSizeBytes;
474 int maxDynamicSharedSizeBytes;
477 int preferredShmemCarveout;
479 size_t sharedSizeBytes;
481 typedef struct ihipEvent_t* hipEvent_t;
483 hipLimitPrintfFifoSize = 0x01,
484 hipLimitMallocHeapSize = 0x02,
490 #define hipStreamDefault \ 493 #define hipStreamNonBlocking 0x01 494 #define hipEventDefault 0x0 496 #define hipEventBlockingSync \ 498 #define hipEventDisableTiming \ 500 #define hipEventInterprocess 0x4 501 #define hipEventReleaseToDevice \ 503 #define hipEventReleaseToSystem \ 507 #define hipHostMallocDefault 0x0 511 #define hipHostMallocPortable 0x1 512 #define hipHostMallocMapped \ 514 #define hipHostMallocWriteCombined 0x4 516 #define hipHostMallocNumaUser \ 518 #define hipHostMallocCoherent \ 520 #define hipHostMallocNonCoherent \ 523 #define hipMemAttachGlobal 0x01 525 #define hipMemAttachHost 0x02 526 #define hipMemAttachSingle 0x04 527 #define hipDeviceMallocDefault 0x0 529 #define hipDeviceMallocFinegrained 0x1 530 #define hipMallocSignalMemory 0x2 531 #define hipHostRegisterDefault 0x0 533 #define hipHostRegisterPortable 0x1 534 #define hipHostRegisterMapped \ 536 #define hipHostRegisterIoMemory 0x4 538 #define hipExtHostRegisterCoarseGrained 0x8 539 #define hipDeviceScheduleAuto 0x0 540 #define hipDeviceScheduleSpin \ 542 #define hipDeviceScheduleYield \ 545 #define hipDeviceScheduleBlockingSync 0x4 547 #define hipDeviceScheduleMask 0x7 548 #define hipDeviceMapHost 0x8 549 #define hipDeviceLmemResizeToMax 0x16 550 #define hipArrayDefault 0x00 551 #define hipArrayLayered 0x01 552 #define hipArraySurfaceLoadStore 0x02 553 #define hipArrayCubemap 0x04 554 #define hipArrayTextureGather 0x08 555 #define hipOccupancyDefault 0x00 556 #define hipCooperativeLaunchMultiDeviceNoPreSync 0x01 557 #define hipCooperativeLaunchMultiDeviceNoPostSync 0x02 558 #define hipCpuDeviceId ((int)-1) 559 #define hipInvalidDeviceId ((int)-2) 561 #define hipExtAnyOrderLaunch 0x01 562 // Flags to be used with hipStreamWaitValue32 and hipStreamWaitValue64 563 #define hipStreamWaitValueGte 0x0 564 #define hipStreamWaitValueEq 0x1 565 #define hipStreamWaitValueAnd 0x2 566 #define hipStreamWaitValueNor 0x3 568 #define hipStreamPerThread ((hipStream_t)2) 627 typedef enum hipJitOption {
628 hipJitOptionMaxRegisters = 0,
629 hipJitOptionThreadsPerBlock,
630 hipJitOptionWallTime,
631 hipJitOptionInfoLogBuffer,
632 hipJitOptionInfoLogBufferSizeBytes,
633 hipJitOptionErrorLogBuffer,
634 hipJitOptionErrorLogBufferSizeBytes,
635 hipJitOptionOptimizationLevel,
636 hipJitOptionTargetFromContext,
638 hipJitOptionFallbackStrategy,
639 hipJitOptionGenerateDebugInfo,
640 hipJitOptionLogVerbose,
641 hipJitOptionGenerateLineInfo,
642 hipJitOptionCacheMode,
644 hipJitOptionFastCompile,
645 hipJitOptionNumOptions
651 hipFuncAttributeMaxDynamicSharedMemorySize = 8,
652 hipFuncAttributePreferredSharedMemoryCarveout = 9,
683 constexpr __host__ __device__
dim3(uint32_t _x = 1, uint32_t _y = 1, uint32_t _z = 1) : x(_x), y(_y), z(_z){};
694 typedef enum hipExternalMemoryHandleType_enum {
695 hipExternalMemoryHandleTypeOpaqueFd = 1,
696 hipExternalMemoryHandleTypeOpaqueWin32 = 2,
697 hipExternalMemoryHandleTypeOpaqueWin32Kmt = 3,
698 hipExternalMemoryHandleTypeD3D12Heap = 4,
699 hipExternalMemoryHandleTypeD3D12Resource = 5,
700 hipExternalMemoryHandleTypeD3D11Resource = 6,
701 hipExternalMemoryHandleTypeD3D11ResourceKmt = 7,
702 } hipExternalMemoryHandleType;
704 hipExternalMemoryHandleType type;
712 unsigned long long size;
716 unsigned long long offset;
717 unsigned long long size;
720 typedef void* hipExternalMemory_t;
721 typedef enum hipExternalSemaphoreHandleType_enum {
722 hipExternalSemaphoreHandleTypeOpaqueFd = 1,
723 hipExternalSemaphoreHandleTypeOpaqueWin32 = 2,
724 hipExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3,
725 hipExternalSemaphoreHandleTypeD3D12Fence = 4
726 } hipExternalSemaphoreHandleType;
728 hipExternalSemaphoreHandleType type;
738 typedef void* hipExternalSemaphore_t;
742 unsigned long long value;
745 unsigned long long key;
747 unsigned int reserved[12];
750 unsigned int reserved[16];
758 unsigned long long value;
761 unsigned long long key;
762 unsigned int timeoutMs;
764 unsigned int reserved[10];
767 unsigned int reserved[16];
770 #if __HIP_HAS_GET_PCH 776 void __hipGetPCH(
const char** pch,
unsigned int*size);
798 hipGraphicsRegisterFlagsNone = 0,
807 typedef struct _hipGraphicsResource hipGraphicsResource;
809 typedef hipGraphicsResource* hipGraphicsResource_t;
843 hipError_t
hipInit(
unsigned int flags);
880 hipError_t
hipDeviceGet(hipDevice_t* device,
int ordinal);
909 int srcDevice,
int dstDevice);
1535 hipError_t
hipStreamWaitEvent(hipStream_t stream, hipEvent_t event,
unsigned int flags);
1617 unsigned int flags);
1661 hipError_t
hipStreamWaitValue32(hipStream_t stream,
void* ptr, uint32_t value,
unsigned int flags,
1662 uint32_t mask __dparm(0xFFFFFFFF));
1695 hipError_t
hipStreamWaitValue64(hipStream_t stream,
void* ptr, uint64_t value,
unsigned int flags,
1696 uint64_t mask __dparm(0xFFFFFFFFFFFFFFFF));
1716 hipError_t
hipStreamWriteValue32(hipStream_t stream,
void* ptr, uint32_t value,
unsigned int flags);
1736 hipError_t
hipStreamWriteValue64(hipStream_t stream,
void* ptr, uint64_t value,
unsigned int flags);
1811 hipError_t
hipEventRecord(hipEvent_t event, hipStream_t stream = NULL);
1957 unsigned int numExtSems, hipStream_t stream);
1972 unsigned int numExtSems, hipStream_t stream);
2030 hipError_t
hipMalloc(
void** ptr,
size_t size);
2058 DEPRECATED(
"use hipHostMalloc instead")
2087 hipError_t
hipHostMalloc(
void** ptr,
size_t size,
unsigned int flags);
2123 hipStream_t stream __dparm(0));
2153 const
void* dev_ptr,
2172 size_t num_attributes,
2173 const
void* dev_ptr,
2189 size_t length __dparm(0),
2209 hipError_t
hipHostAlloc(
void** ptr,
size_t size,
unsigned int flags);
2268 hipError_t
hipHostRegister(
void* hostPtr,
size_t sizeBytes,
unsigned int flags);
2296 hipError_t
hipMallocPitch(
void** ptr,
size_t* pitch,
size_t width,
size_t height);
2318 hipError_t
hipMemAllocPitch(hipDeviceptr_t* dptr,
size_t* pitch,
size_t widthInBytes,
size_t height,
unsigned int elementSizeBytes);
2332 hipError_t
hipFree(
void* ptr);
2387 hipError_t
hipMemcpy(
void* dst, const
void* src,
size_t sizeBytes, hipMemcpyKind kind);
2389 hipError_t hipMemcpyWithStream(
void* dst, const
void* src,
size_t sizeBytes,
2390 hipMemcpyKind kind, hipStream_t stream);
2408 hipError_t
hipMemcpyHtoD(hipDeviceptr_t dst,
void* src,
size_t sizeBytes);
2426 hipError_t
hipMemcpyDtoH(
void* dst, hipDeviceptr_t src,
size_t sizeBytes);
2444 hipError_t
hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src,
size_t sizeBytes);
2462 hipError_t
hipMemcpyHtoDAsync(hipDeviceptr_t dst,
void* src,
size_t sizeBytes, hipStream_t stream);
2480 hipError_t
hipMemcpyDtoHAsync(
void* dst, hipDeviceptr_t src,
size_t sizeBytes, hipStream_t stream);
2498 hipError_t
hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src,
size_t sizeBytes,
2499 hipStream_t stream);
2516 hipModule_t hmod, const
char*
name);
2517 hipError_t hipGetSymbolAddress(
void** devPtr, const
void* symbol);
2518 hipError_t hipGetSymbolSize(
size_t* size, const
void* symbol);
2519 hipError_t hipMemcpyToSymbol(const
void* symbol, const
void* src,
2520 size_t sizeBytes,
size_t offset __dparm(0),
2521 hipMemcpyKind kind __dparm(hipMemcpyHostToDevice));
2522 hipError_t hipMemcpyToSymbolAsync(const
void* symbol, const
void* src,
2523 size_t sizeBytes,
size_t offset,
2524 hipMemcpyKind kind, hipStream_t stream __dparm(0));
2525 hipError_t hipMemcpyFromSymbol(
void* dst, const
void* symbol,
2526 size_t sizeBytes,
size_t offset __dparm(0),
2527 hipMemcpyKind kind __dparm(hipMemcpyDeviceToHost));
2528 hipError_t hipMemcpyFromSymbolAsync(
void* dst, const
void* symbol,
2529 size_t sizeBytes,
size_t offset,
2531 hipStream_t stream __dparm(0));
2560 hipError_t
hipMemcpyAsync(
void* dst, const
void* src,
size_t sizeBytes, hipMemcpyKind kind,
2561 hipStream_t stream __dparm(0));
2571 hipError_t
hipMemset(
void* dst,
int value,
size_t sizeBytes);
2581 hipError_t
hipMemsetD8(hipDeviceptr_t dest,
unsigned char value,
size_t count);
2597 hipError_t
hipMemsetD8Async(hipDeviceptr_t dest,
unsigned char value,
size_t count, hipStream_t stream __dparm(0));
2607 hipError_t
hipMemsetD16(hipDeviceptr_t dest,
unsigned short value,
size_t count);
2623 hipError_t
hipMemsetD16Async(hipDeviceptr_t dest,
unsigned short value,
size_t count, hipStream_t stream __dparm(0));
2633 hipError_t
hipMemsetD32(hipDeviceptr_t dest,
int value,
size_t count);
2649 hipError_t
hipMemsetAsync(
void* dst,
int value,
size_t sizeBytes, hipStream_t stream __dparm(0));
2666 hipStream_t stream __dparm(0));
2677 hipError_t
hipMemset2D(
void* dst,
size_t pitch,
int value,
size_t width,
size_t height);
2689 hipError_t
hipMemset2DAsync(
void* dst,
size_t pitch,
int value,
size_t width,
size_t height,hipStream_t stream __dparm(0));
2719 hipError_t hipMemPtrGetInfo(
void* ptr,
size_t* size);
2733 size_t height __dparm(0),
unsigned int flags __dparm(
hipArrayDefault));
2735 hipError_t hipArrayDestroy(
hipArray* array);
2767 struct
hipExtent extent,
unsigned int flags);
2783 unsigned int numLevels,
2784 unsigned int flags __dparm(0));
2797 unsigned int level);
2814 hipError_t
hipMemcpy2D(
void* dst,
size_t dpitch, const
void* src,
size_t spitch,
size_t width,
2815 size_t height, hipMemcpyKind kind);
2854 hipError_t
hipMemcpy2DAsync(
void* dst,
size_t dpitch, const
void* src,
size_t spitch,
size_t width,
2855 size_t height, hipMemcpyKind kind, hipStream_t stream __dparm(0));
2874 size_t spitch,
size_t width,
size_t height, hipMemcpyKind kind);
2894 size_t spitch,
size_t width,
size_t height, hipMemcpyKind kind,
2895 hipStream_t stream __dparm(0));
2911 DEPRECATED(DEPRECATED_MSG)
2913 size_t count, hipMemcpyKind kind);
2929 DEPRECATED(DEPRECATED_MSG)
2931 size_t count, hipMemcpyKind kind);
3114 #ifndef USE_PEER_NON_UNIFIED 3115 #define USE_PEER_NON_UNIFIED 1 3117 #if USE_PEER_NON_UNIFIED == 1 3129 hipError_t
hipMemcpyPeer(
void* dst,
int dstDeviceId,
const void* src,
int srcDeviceId,
3143 hipError_t
hipMemcpyPeerAsync(
void* dst,
int dstDeviceId,
const void* src,
int srcDevice,
3144 size_t sizeBytes, hipStream_t stream __dparm(0));
3176 DEPRECATED(DEPRECATED_MSG)
3177 hipError_t
hipCtxCreate(hipCtx_t* ctx,
unsigned int flags, hipDevice_t device);
3188 DEPRECATED(DEPRECATED_MSG)
3200 DEPRECATED(DEPRECATED_MSG)
3212 DEPRECATED(DEPRECATED_MSG)
3224 DEPRECATED(DEPRECATED_MSG)
3236 DEPRECATED(DEPRECATED_MSG)
3248 DEPRECATED(DEPRECATED_MSG)
3267 DEPRECATED(DEPRECATED_MSG)
3282 DEPRECATED(DEPRECATED_MSG)
3297 DEPRECATED(DEPRECATED_MSG)
3312 DEPRECATED(DEPRECATED_MSG)
3327 DEPRECATED(DEPRECATED_MSG)
3340 DEPRECATED(DEPRECATED_MSG)
3352 DEPRECATED(DEPRECATED_MSG)
3373 DEPRECATED(DEPRECATED_MSG)
3391 DEPRECATED(DEPRECATED_MSG)
3480 hipError_t
hipModuleLoad(hipModule_t* module, const
char* fname);
3501 hipError_t
hipModuleGetFunction(hipFunction_t* function, hipModule_t module, const
char* kname);
3520 hipError_t
hipFuncGetAttribute(
int* value, hipFunction_attribute attrib, hipFunction_t hfunc);
3553 hipError_t
hipModuleLoadDataEx(hipModule_t* module, const
void* image,
unsigned int numOptions,
3554 hipJitOption* options,
void** optionValues);
3580 unsigned int gridDimZ,
unsigned int blockDimX,
3581 unsigned int blockDimY,
unsigned int blockDimZ,
3582 unsigned int sharedMemBytes, hipStream_t stream,
3583 void** kernelParams,
void** extra);
3600 void** kernelParams,
unsigned int sharedMemBytes,
3601 hipStream_t stream);
3613 int numDevices,
unsigned int flags);
3626 int numDevices,
unsigned int flags);
3651 hipFunction_t f,
size_t dynSharedMemPerBlk,
3652 int blockSizeLimit);
3667 hipFunction_t f,
size_t dynSharedMemPerBlk,
3668 int blockSizeLimit,
unsigned int flags);
3678 int* numBlocks, hipFunction_t f,
int blockSize,
size_t dynSharedMemPerBlk);
3689 int* numBlocks, hipFunction_t f,
int blockSize,
size_t dynSharedMemPerBlk,
unsigned int flags);
3699 int* numBlocks, const
void* f,
int blockSize,
size_t dynSharedMemPerBlk);
3710 int* numBlocks, const
void* f,
int blockSize,
size_t dynSharedMemPerBlk,
unsigned int flags __dparm(hipOccupancyDefault));
3723 const
void* f,
size_t dynSharedMemPerBlk,
3724 int blockSizeLimit);
3745 DEPRECATED("use roctracer/rocTX instead")
3752 DEPRECATED("use roctracer/rocTX instead")
3778 hipError_t
hipConfigureCall(
dim3 gridDim,
dim3 blockDim,
size_t sharedMem __dparm(0), hipStream_t stream __dparm(0));
3814 size_t sharedMem __dparm(0),
3815 hipStream_t stream __dparm(0));
3832 hipStream_t *stream);
3852 size_t sharedMemBytes __dparm(0),
3853 hipStream_t stream __dparm(0));
3863 hipError_t hipExtLaunchKernel(const
void* function_address,
dim3 numBlocks,
dim3 dimBlocks,
3864 void** args,
size_t sharedMemBytes, hipStream_t stream,
3865 hipEvent_t startEvent, hipEvent_t stopEvent,
int flags);
3884 DEPRECATED(DEPRECATED_MSG)
3885 hipError_t hipBindTexture(
3890 size_t size __dparm(UINT_MAX));
3891 DEPRECATED(DEPRECATED_MSG)
3892 hipError_t hipBindTexture2D(
3900 DEPRECATED(DEPRECATED_MSG)
3901 hipError_t hipBindTextureToArray(
3905 DEPRECATED(DEPRECATED_MSG)
3906 hipError_t hipGetTextureAlignmentOffset(
3909 DEPRECATED(DEPRECATED_MSG)
3915 hipError_t hipBindTextureToMipmappedArray(
3919 hipError_t hipGetTextureReference(
3921 const
void* symbol);
3922 hipError_t hipCreateTextureObject(
3923 hipTextureObject_t* pTexObject,
3927 hipError_t hipDestroyTextureObject(hipTextureObject_t textureObject);
3928 hipError_t hipGetChannelDesc(
3931 hipError_t hipGetTextureObjectResourceDesc(
3933 hipTextureObject_t textureObject);
3934 hipError_t hipGetTextureObjectResourceViewDesc(
3936 hipTextureObject_t textureObject);
3937 hipError_t hipGetTextureObjectTextureDesc(
3939 hipTextureObject_t textureObject);
3940 DEPRECATED(DEPRECATED_MSG)
3941 hipError_t hipTexRefGetAddress(
3942 hipDeviceptr_t* dev_ptr,
3944 DEPRECATED(DEPRECATED_MSG)
3945 hipError_t hipTexRefGetAddressMode(
3946 enum hipTextureAddressMode* pam,
3949 DEPRECATED(DEPRECATED_MSG)
3950 hipError_t hipTexRefGetFilterMode(
3951 enum hipTextureFilterMode* pfm,
3953 DEPRECATED(DEPRECATED_MSG)
3954 hipError_t hipTexRefGetFlags(
3955 unsigned int* pFlags,
3957 DEPRECATED(DEPRECATED_MSG)
3958 hipError_t hipTexRefGetFormat(
3959 hipArray_Format* pFormat,
3962 DEPRECATED(DEPRECATED_MSG)
3963 hipError_t hipTexRefGetMaxAnisotropy(
3966 DEPRECATED(DEPRECATED_MSG)
3967 hipError_t hipTexRefGetMipmapFilterMode(
3968 enum hipTextureFilterMode* pfm,
3970 DEPRECATED(DEPRECATED_MSG)
3971 hipError_t hipTexRefGetMipmapLevelBias(
3974 DEPRECATED(DEPRECATED_MSG)
3975 hipError_t hipTexRefGetMipmapLevelClamp(
3976 float* pminMipmapLevelClamp,
3977 float* pmaxMipmapLevelClamp,
3979 DEPRECATED(DEPRECATED_MSG)
3980 hipError_t hipTexRefGetMipMappedArray(
3983 DEPRECATED(DEPRECATED_MSG)
3984 hipError_t hipTexRefSetAddress(
3987 hipDeviceptr_t dptr,
3989 DEPRECATED(DEPRECATED_MSG)
3990 hipError_t hipTexRefSetAddress2D(
3993 hipDeviceptr_t dptr,
3995 hipError_t hipTexRefSetAddressMode(
3998 enum hipTextureAddressMode am);
3999 hipError_t hipTexRefSetArray(
4002 unsigned int flags);
4003 hipError_t hipTexRefSetFilterMode(
4005 enum hipTextureFilterMode fm);
4006 hipError_t hipTexRefSetFlags(
4008 unsigned int Flags);
4009 hipError_t hipTexRefSetFormat(
4011 hipArray_Format fmt,
4012 int NumPackedComponents);
4013 DEPRECATED(DEPRECATED_MSG)
4014 hipError_t hipTexRefSetMaxAnisotropy(
4016 unsigned int maxAniso);
4017 hipError_t hipTexObjectCreate(
4018 hipTextureObject_t* pTexObject,
4022 hipError_t hipTexObjectDestroy(
4023 hipTextureObject_t texObject);
4024 hipError_t hipTexObjectGetResourceDesc(
4026 hipTextureObject_t texObject);
4027 hipError_t hipTexObjectGetResourceViewDesc(
4029 hipTextureObject_t texObject);
4030 hipError_t hipTexObjectGetTextureDesc(
4032 hipTextureObject_t texObject);
4038 DEPRECATED(DEPRECATED_MSG)
4039 hipError_t hipTexRefSetBorderColor(
4041 float* pBorderColor);
4042 hipError_t hipTexRefSetMipmapFilterMode(
4044 enum hipTextureFilterMode fm);
4045 hipError_t hipTexRefSetMipmapLevelBias(
4048 hipError_t hipTexRefSetMipmapLevelClamp(
4050 float minMipMapLevelClamp,
4051 float maxMipMapLevelClamp);
4052 hipError_t hipTexRefSetMipmappedArray(
4055 unsigned int Flags);
4056 hipError_t hipMipmappedArrayCreate(
4059 unsigned int numMipmapLevels);
4060 hipError_t hipMipmappedArrayDestroy(
4062 hipError_t hipMipmappedArrayGetLevel(
4065 unsigned int level);
4085 hipError_t hipRemoveApiCallback(uint32_t
id);
4086 hipError_t hipRegisterActivityCallback(uint32_t
id,
void* fun,
void* arg);
4087 hipError_t hipRemoveActivityCallback(uint32_t
id);
4088 const
char* hipApiName(uint32_t
id);
4089 const
char* hipKernelNameRef(const hipFunction_t f);
4090 const
char* hipKernelNameRefByPtr(const
void* hostFunction, hipStream_t stream);
4091 int hipGetStreamDeviceId(hipStream_t stream);
4124 hipGraphNodeTypeCount
4126 typedef void (*hipHostFn_t)(
void* userData);
4136 void** kernelParams;
4137 unsigned int sharedMemBytes;
4141 unsigned int elementSize;
4159 hipGraphExecUpdateErrorUnsupportedFunctionChange = 0x7
4161 typedef enum hipStreamCaptureMode {
4162 hipStreamCaptureModeGlobal = 0,
4163 hipStreamCaptureModeThreadLocal,
4164 hipStreamCaptureModeRelaxed
4165 } hipStreamCaptureMode;
4250 hipGraphNode_t* pErrorNode,
char* pLogBuffer,
size_t bufferSize);
4314 void* dst,
const void* src,
size_t count, hipMemcpyKind kind);
4355 size_t* pNumRootNodes);
4471 #if defined(__clang__) && defined(__HIP__) 4472 template <
typename T>
4474 T f,
size_t dynSharedMemPerBlk = 0,
int blockSizeLimit = 0) {
4477 template <
typename T>
4478 static hipError_t __host__
inline hipOccupancyMaxPotentialBlockSizeWithFlags(
int* gridSize,
int* blockSize,
4479 T f,
size_t dynSharedMemPerBlk = 0,
int blockSizeLimit = 0,
unsigned int flags = 0 ) {
4482 #endif // defined(__clang__) && defined(__HIP__) 4483 template <
typename T>
4484 hipError_t hipGetSymbolAddress(
void** devPtr,
const T &symbol) {
4485 return ::hipGetSymbolAddress(devPtr, (
const void *)&symbol);
4487 template <
typename T>
4488 hipError_t hipGetSymbolSize(
size_t* size,
const T &symbol) {
4489 return ::hipGetSymbolSize(size, (
const void *)&symbol);
4491 template <
typename T>
4492 hipError_t hipMemcpyToSymbol(
const T& symbol,
const void* src,
size_t sizeBytes,
4493 size_t offset __dparm(0),
4494 hipMemcpyKind kind __dparm(hipMemcpyHostToDevice)) {
4495 return ::hipMemcpyToSymbol((
const void*)&symbol, src, sizeBytes, offset, kind);
4497 template <
typename T>
4498 hipError_t hipMemcpyToSymbolAsync(
const T& symbol,
const void* src,
size_t sizeBytes,
size_t offset,
4499 hipMemcpyKind kind, hipStream_t stream __dparm(0)) {
4500 return ::hipMemcpyToSymbolAsync((
const void*)&symbol, src, sizeBytes, offset, kind, stream);
4502 template <
typename T>
4503 hipError_t hipMemcpyFromSymbol(
void* dst,
const T &symbol,
4504 size_t sizeBytes,
size_t offset __dparm(0),
4505 hipMemcpyKind kind __dparm(hipMemcpyDeviceToHost)) {
4506 return ::hipMemcpyFromSymbol(dst, (
const void*)&symbol, sizeBytes, offset, kind);
4508 template <
typename T>
4509 hipError_t hipMemcpyFromSymbolAsync(
void* dst,
const T& symbol,
size_t sizeBytes,
size_t offset,
4510 hipMemcpyKind kind, hipStream_t stream __dparm(0)) {
4511 return ::hipMemcpyFromSymbolAsync(dst, (
const void*)&symbol, sizeBytes, offset, kind, stream);
4515 int* numBlocks, T f,
int blockSize,
size_t dynSharedMemPerBlk) {
4517 numBlocks, reinterpret_cast<const void*>(f), blockSize, dynSharedMemPerBlk);
4521 int* numBlocks, T f,
int blockSize,
size_t dynSharedMemPerBlk,
unsigned int flags) {
4523 numBlocks, reinterpret_cast<const void*>(f), blockSize, dynSharedMemPerBlk, flags);
4525 template <
typename F>
4527 F kernel,
size_t dynSharedMemPerBlk, uint32_t blockSizeLimit) {
4532 void** kernelParams,
unsigned int sharedMemBytes, hipStream_t stream) {
4534 blockDim, kernelParams, sharedMemBytes, stream);
4538 unsigned int numDevices,
unsigned int flags = 0) {
4543 unsigned int numDevices,
unsigned int flags = 0) {
4548 template <
class T,
int dim, enum hipTextureReadMode readMode>
4549 DEPRECATED(DEPRECATED_MSG)
4550 static inline hipError_t hipBindTexture(
size_t* offset, const struct texture<T, dim, readMode>& tex,
4551 const
void* devPtr,
size_t size = UINT_MAX) {
4552 return hipBindTexture(offset, &tex, devPtr, &tex.channelDesc, size);
4554 template <
class T,
int dim, enum hipTextureReadMode readMode>
4555 DEPRECATED(DEPRECATED_MSG)
4556 static inline hipError_t
4557 hipBindTexture(
size_t* offset, const struct texture<T, dim, readMode>& tex, const
void* devPtr,
4559 return hipBindTexture(offset, &tex, devPtr, &desc, size);
4561 template<
class T,
int dim, enum hipTextureReadMode readMode>
4562 DEPRECATED(DEPRECATED_MSG)
4563 static inline hipError_t hipBindTexture2D(
4565 const struct texture<T, dim, readMode> &tex,
4571 return hipBindTexture2D(offset, &tex, devPtr, &tex.channelDesc, width, height, pitch);
4573 template<
class T,
int dim, enum hipTextureReadMode readMode>
4574 DEPRECATED(DEPRECATED_MSG)
4575 static inline hipError_t hipBindTexture2D(
4577 const struct texture<T, dim, readMode> &tex,
4584 return hipBindTexture2D(offset, &tex, devPtr, &desc, width, height, pitch);
4586 template<
class T,
int dim, enum hipTextureReadMode readMode>
4587 DEPRECATED(DEPRECATED_MSG)
4588 static inline hipError_t hipBindTextureToArray(
4589 const struct texture<T, dim, readMode> &tex,
4593 hipError_t err = hipGetChannelDesc(&desc, array);
4594 return (err ==
hipSuccess) ? hipBindTextureToArray(&tex, array, &desc) : err;
4596 template<
class T,
int dim, enum hipTextureReadMode readMode>
4597 DEPRECATED(DEPRECATED_MSG)
4598 static inline hipError_t hipBindTextureToArray(
4599 const struct texture<T, dim, readMode> &tex,
4603 return hipBindTextureToArray(&tex, array, &desc);
4605 template<
class T,
int dim, enum hipTextureReadMode readMode>
4606 static inline hipError_t hipBindTextureToMipmappedArray(
4607 const struct texture<T, dim, readMode> &tex,
4616 err = hipGetChannelDesc(&desc, levelArray);
4617 return (err ==
hipSuccess) ? hipBindTextureToMipmappedArray(&tex, mipmappedArray, &desc) : err;
4619 template<
class T,
int dim, enum hipTextureReadMode readMode>
4620 static inline hipError_t hipBindTextureToMipmappedArray(
4621 const struct texture<T, dim, readMode> &tex,
4625 return hipBindTextureToMipmappedArray(&tex, mipmappedArray, &desc);
4627 template<
class T,
int dim, enum hipTextureReadMode readMode>
4628 DEPRECATED(DEPRECATED_MSG)
4629 static inline hipError_t hipUnbindTexture(
4630 const struct texture<T, dim, readMode> &tex)
4632 return hipUnbindTexture(&tex);
4636 #endif // __cplusplus 4645 typedef unsigned int GLuint;
4648 hipError_t hipGLGetDevices(
unsigned int* pHipDeviceCount,
int* pHipDevices,
4651 hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer,
4652 unsigned int flags);
4654 hipError_t hipGraphicsMapResources(
int count, hipGraphicsResource_t* resources,
4655 hipStream_t stream __dparm(0) );
4657 hipError_t hipGraphicsResourceGetMappedPointer(
void** devPtr,
size_t* size,
4658 hipGraphicsResource_t resource);
4660 hipError_t hipGraphicsUnmapResources(
int count, hipGraphicsResource_t* resources,
4661 hipStream_t stream __dparm(0));
4663 hipError_t hipGraphicsUnregisterResource(hipGraphicsResource_t resource);
4670 #pragma GCC visibility pop 4677 #elif !(defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && (defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) 4678 #include "hip/nvidia_detail/nvidia_hip_runtime_api.h" 4680 #error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__"); 4695 #if defined(__cplusplus) && !defined(__HIP_DISABLE_CPP_FUNCTIONS__) 4697 static inline hipError_t
hipMalloc(T** devPtr,
size_t size) {
4704 static inline hipError_t
hipHostMalloc(T** ptr,
size_t size,
4711 unsigned int flags = hipMemAttachGlobal) {
4718 #include <hip/amd_detail/hip_prof_str.h> 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.
hipError_t hipHostFree(void *ptr)
Free memory allocated by the hcc hip host memory allocation API This API performs an implicit hipDevi...
hipError_t hipModuleGetFunction(hipFunction_t *function, hipModule_t module, const char *kname)
Function with kname will be extracted if present in module.
Definition: hip_runtime_api.h:389
Device supports allocating managed memory on this system.
Definition: hip_runtime_api.h:384
frame.
Definition: hip_runtime_api.h:788
Definition: driver_types.h:327
hipErrorLaunchFailure
An exception occurred on the device while executing a kernel.
Definition: hip_runtime_api.h:276
prefer larger L1 cache and smaller shared memory
Definition: hip_runtime_api.h:661
Definition: hip_runtime_api.h:375
hipErrorMapBufferObjectFailed
Produced when the IPC memory attach failed from ROCr.
Definition: hip_runtime_api.h:234
Memory is physically located on host.
Definition: hip_runtime_api.h:157
hipError_t hipMemset3D(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent)
Fills synchronously the memory area pointed to by pitchedDevPtr with the constant value...
size_t totalConstMem
Size of shared memory region (in bytes).
Definition: hip_runtime_api.h:96
hipGraphExecUpdateResult
Definition: hip_runtime_api.h:4147
Definition: hip_runtime_api.h:352
hipError_t hipStreamGetPriority(hipStream_t stream, int *priority)
Query the priority of a stream.
int asicRevision
Revision of the GPU in this device.
Definition: hip_runtime_api.h:143
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
hipError_t hipDeviceGetCacheConfig(hipFuncCache_t *cacheConfig)
Set Cache configuration for a specific function.
The update failed because something about the node is not supported.
Definition: hip_runtime_api.h:4157
Maximum x-dimension of a block.
Definition: hip_runtime_api.h:323
Definition: hip_runtime_api.h:715
hipError_t hipGraphLaunch(hipGraphExec_t graphExec, hipStream_t stream)
launches an executable graph in a stream
hipError_t hipDriverGetVersion(int *driverVersion)
Returns the approximate HIP driver version.
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.
Definition: hip_runtime_api.h:686
hipError_t hipPeekAtLastError(void)
Return last error returned by any HIP runtime API call.
hipGraphNodeType
Definition: hip_runtime_api.h:4112
hipErrorStreamCaptureIsolation
Definition: hip_runtime_api.h:292
hipError_t hipGraphMemcpyNodeGetParams(hipGraphNode_t node, hipMemcpy3DParms *pNodeParams)
Gets a memcpy node's parameters.
Maximum x-dimension of a grid.
Definition: hip_runtime_api.h:326
Empty (no-op) node.
Definition: hip_runtime_api.h:4118
int isLargeBar
1: if it is a large PCI bar device, else 0
Definition: hip_runtime_api.h:142
int pageableMemoryAccessUsesHostPageTables
Device accesses pageable memory via the host's page tables.
Definition: hip_runtime_api.h:149
Maximum pitch in bytes allowed by memory copies.
Definition: hip_runtime_api.h:368
hipError_t hipGraphAddDependencies(hipGraph_t graph, const hipGraphNode_t *from, const hipGraphNode_t *to, size_t numDependencies)
Adds dependency edges to a graph.
hipError_t hipMemcpyParam2D(const hip_Memcpy2D *pCopy)
Copies memory for 2D arrays.
hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags)
Set flags for the primary context.
Definition: hip_runtime_api.h:578
hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags)
Enables direct access to memory allocations in a peer context.
int concurrentManagedAccess
Device can coherently access managed memory concurrently with the CPU.
Definition: hip_runtime_api.h:146
hipError_t hipDevicePrimaryCtxRetain(hipCtx_t *pctx, hipDevice_t dev)
Retain the primary context on the GPU.
hipError_t hipDeviceComputeCapability(int *major, int *minor, hipDevice_t device)
Returns the compute capability of the device.
hipError_t hipDeviceGetByPCIBusId(int *device, const char *pciBusId)
Returns a handle to a compute device.
int cooperativeMultiDeviceUnmatchedBlockDim
Definition: hip_runtime_api.h:138
hipError_t hipImportExternalMemory(hipExternalMemory_t *extMem_out, const hipExternalMemoryHandleDesc *memHandleDesc)
Imports an external memory object.
Definition: hip_runtime_api.h:464
Defines surface types for HIP runtime.
Global memory bus width in bits.
Definition: hip_runtime_api.h:339
Definition: hip_runtime_api.h:391
hipError_t hipExtMallocWithFlags(void **ptr, size_t sizeBytes, unsigned int flags)
Allocate memory on the default accelerator.
hipError_t hipFuncSetAttribute(const void *func, hipFuncAttribute attr, int value)
Set attribute for a specific function.
hipError_t hipMemGetAddressRange(hipDeviceptr_t *pbase, size_t *psize, hipDeviceptr_t dptr)
Get information on memory allocations.
hipError_t hipStreamWaitValue32(hipStream_t stream, void *ptr, uint32_t value, unsigned int flags, uint32_t mask __dparm(0xFFFFFFFF))
Enqueues a wait command to the stream.[BETA].
Definition: hip_runtime_api.h:385
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...
Definition: hip_runtime_api.h:4169
Definition: hip_runtime_api.h:727
int minor
Definition: hip_runtime_api.h:100
hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem)
Destroys an external memory object.
hipError_t hipFreeHost(void *ptr)
Free memory allocated by the hcc hip host memory allocation API. [Deprecated].
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.
unsigned int * hdpRegFlushCntl
Addres of HDP_REG_COHERENCY_FLUSH_CNTL register.
Definition: hip_runtime_api.h:127
hipError_t hipGraphExecDestroy(hipGraphExec_t pGraphExec)
Destroys an executable graph.
hipError_t hipGraphGetRootNodes(hipGraph_t graph, hipGraphNode_t *pRootNodes, size_t *pNumRootNodes)
Returns graph's root nodes.
hipErrorHostMemoryAlreadyRegistered
Produced when trying to lock a page-locked memory.
Definition: hip_runtime_api.h:272
Definition: driver_types.h:358
Memset 1D node.
Definition: hip_runtime_api.h:4115
hipErrorPeerAccessAlreadyEnabled
Peer access was already enabled from the current device.
Definition: hip_runtime_api.h:265
size_t texturePitchAlignment
Pitch alignment requirement for texture references bound to pitched memory.
Definition: hip_runtime_api.h:130
hipError_t hipMallocPitch(void **ptr, size_t *pitch, size_t width, size_t height)
Definition: hip_runtime_api.h:600
hipMemRangeCoherencyMode
Definition: hip_runtime_api.h:597
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
int canMapHostMemory
Check whether HIP can map host memory.
Definition: hip_runtime_api.h:116
Definition: hip_runtime_api.h:333
hipError_t hipCtxSetCurrent(hipCtx_t ctx)
Set the passed context as current/default.
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.
hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode)
Begins graph capture on a stream.
#define hipMemAttachGlobal
Memory can be accessed by any stream on any device.
Definition: hip_runtime_api.h:524
Definition: hip_runtime_api.h:739
hipErrorInvalidMemcpyDirection
Invalid memory copy direction.
Definition: hip_runtime_api.h:222
Revision of the GPU in this device.
Definition: hip_runtime_api.h:383
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...
hipError_t hipModuleLoad(hipModule_t *module, const char *fname)
Loads code object from file into a hipModule_t.
int regsPerBlock
Registers per block.
Definition: hip_runtime_api.h:88
int maxTexture3D[3]
Maximum dimensions (width, height, depth) of 3D images, in image elements.
Definition: hip_runtime_api.h:125
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.
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...
Definition: hip_runtime_api.h:342
Run time limit for kernels executed on the device.
Definition: hip_runtime_api.h:371
Definition: hip_runtime_api.h:619
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...
#define hipHostMallocDefault
Flags that can be used with hipHostMalloc.
Definition: hip_runtime_api.h:510
Not used currently.
Definition: hip_runtime_api.h:162
hipMemoryType
Definition: hip_runtime_api.h:156
Maximum dimension width of 3D images in image elements.
Definition: hip_runtime_api.h:361
iGPU
Definition: hip_runtime_api.h:355
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.
int isMultiGpuBoard
1 if device is on a multi-GPU board, 0 if not.
Definition: hip_runtime_api.h:115
hipError_t hipSignalExternalSemaphoresAsync(const hipExternalSemaphore_t *extSemArray, const hipExternalSemaphoreSignalParams *paramsArray, unsigned int numExtSems, hipStream_t stream)
Signals a set of external semaphore objects.
hipErrorAssert
Produced when the kernel calls assert.
Definition: hip_runtime_api.h:271
uint32_t x
x
Definition: hip_runtime_api.h:679
hipError_t hipMemcpyAtoH(void *dst, hipArray *srcArray, size_t srcOffset, size_t count)
Copies data between host and device.
hipError_t hipDrvMemcpy3D(const HIP_MEMCPY3D *pCopy)
Copies data between host and device.
hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray)
Frees a mipmapped array on the device.
hipError_t hipDeviceEnablePeerAccess(int peerDeviceId, unsigned int flags)
Enable direct access from current device's virtual address space to memory allocations physically loc...
hipErrorInvalidKernelFile
In CUDA DRV, it is CUDA_ERROR_INVALID_PTX.
Definition: hip_runtime_api.h:247
const char * hipGetErrorString(hipError_t hipError)
Return handy text string message to explain the error which occurred.
Peak clock frequency in kilohertz.
Definition: hip_runtime_api.h:337
hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags)
Returns occupancy for a device function.
int maxTexture1D
Maximum number of elements in 1D images.
Definition: hip_runtime_api.h:123
hipError_t hipDeviceGetSharedMemConfig(hipSharedMemConfig *pConfig)
Returns bank width of shared memory for current device.
hipError_t hipGraphInstantiate(hipGraphExec_t *pGraphExec, hipGraph_t graph, hipGraphNode_t *pErrorNode, char *pLogBuffer, size_t bufferSize)
Creates an executable graph from a graph.
Definition: hip_runtime_api.h:169
hipError_t hipDeviceGetStreamPriorityRange(int *leastPriority, int *greatestPriority)
Returns numerical values that correspond to the least and greatest stream priority.
hipError_t hipGetMipmappedArrayLevel(hipArray_t *levelArray, hipMipmappedArray_const_t mipmappedArray, unsigned int level)
Gets a mipmap level of a HIP mipmapped array.
int clockRate
Max clock frequency of the multiProcessors in khz.
Definition: hip_runtime_api.h:93
struct ihipGraph * hipGraph_t
Definition: hip_runtime_api.h:4103
Maximum z-dimension of a grid.
Definition: hip_runtime_api.h:328
hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipKernelNodeParams *pNodeParams)
Sets the parameters for a kernel node in the given graphExec.
prefer equal size L1 cache and shared memory
Definition: hip_runtime_api.h:662
Definition: hip_runtime_api.h:4131
hipError_t hipHostGetDevicePointer(void **devPtr, void *hstPtr, unsigned int flags)
Get Device pointer from Host Pointer allocated through hipHostMalloc.
hipError_t hipFreeArray(hipArray *array)
Frees an array on the device.
hipError_t hipExtLaunchMultiKernelMultiDevice(hipLaunchParams *launchParamsList, int numDevices, unsigned int flags)
Launches kernels on multiple devices and guarantees all specified kernels are dispatched on respectiv...
hipError_t hipStreamCreateWithPriority(hipStream_t *stream, unsigned int flags, int priority)
Create an asynchronous stream with the specified priority.
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...
hipError_t hipEventSynchronize(hipEvent_t event)
Wait for an event to complete.
Definition: driver_types.h:258
#define hipMemAttachSingle
the associated device
Definition: hip_runtime_api.h:526
hipError_t hipGraphKernelNodeSetParams(hipGraphNode_t node, const hipKernelNodeParams *pNodeParams)
Sets a kernel node's parameters.
hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t *pGraph)
Ends capture on a stream, returning the captured graph.
hipErrorHostMemoryNotRegistered
Produced when trying to unlock a non-page-locked memory.
Definition: hip_runtime_api.h:274
hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t *handle, void *devPtr)
Gets an interprocess memory handle for an existing device memory allocation.
hipError_t hipMemcpyHtoD(hipDeviceptr_t dst, void *src, size_t sizeBytes)
Copy data from Host to Device.
Minor compute capability version number.
Definition: hip_runtime_api.h:347
hipError_t hipSetDeviceFlags(unsigned flags)
The current device behavior is changed according the flags passed.
hipError_t hipGraphAddMemcpyNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const hipMemcpy3DParms *pCopyParams)
Creates a memcpy node and adds it to a graph.
hipErrorInvalidDevice
DeviceID must be in range 0...#compute-devices.
Definition: hip_runtime_api.h:228
Definition: hip_runtime_api.h:329
hipError_t hipEventQuery(hipEvent_t event)
Query event status.
struct hipDeviceProp_t hipDeviceProp_t
hipError_t hipDeviceDisablePeerAccess(int peerDeviceId)
Disable direct access from current device's virtual address space to memory allocations physically lo...
hipErrorInvalidContext
Produced when input context is invalid.
Definition: hip_runtime_api.h:230
hipError_t hipGraphAddMemsetNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const hipMemsetParams *pMemsetParams)
Creates a memset node and adds it to a graph.
int pciBusID
PCI Bus ID.
Definition: hip_runtime_api.h:112
Definition: hip_runtime_api.h:377
hipErrorCapturedEvent
Definition: hip_runtime_api.h:299
hipError_t hipExtStreamGetCUMask(hipStream_t stream, uint32_t cuMaskSize, uint32_t *cuMask)
Get CU mask associated with an asynchronous stream.
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.
hipErrorNotReady
Definition: hip_runtime_api.h:258
Maximum y-dimension of a grid.
Definition: hip_runtime_api.h:327
Stream is actively capturing.
Definition: hip_runtime_api.h:4168
hipErrorPeerAccessNotEnabled
Peer access was never enabled from the current device.
Definition: hip_runtime_api.h:267
hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig)
Set L1/Shared cache partition.
Definition: hip_runtime_api.h:158
#define hipArrayDefault
Default HIP array allocation flag.
Definition: hip_runtime_api.h:550
Restores cache coherency policy back to fine-grain.
Definition: hip_runtime_api.h:590
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.
HIP will not write to this registered resource.
Definition: hip_runtime_api.h:799
struct hipPointerAttribute_t hipPointerAttribute_t
hipError_t hipCtxPushCurrent(hipCtx_t ctx)
Push the context to be set as current/ default context.
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 HIP.
Multiple GPU devices.
Definition: hip_runtime_api.h:354
hipError_t __hipPopCallConfiguration(dim3 *gridDim, dim3 *blockDim, size_t *sharedMem, hipStream_t *stream)
Pop configuration of a kernel launch.
int tccDriver
1:If device is Tesla device using TCC driver, else 0
Definition: hip_runtime_api.h:133
struct hipGraphExec * hipGraphExec_t
Definition: hip_runtime_api.h:4111
Definition: hip_runtime_api.h:469
int maxThreadsPerBlock
Max work items per work group or workgroup max size.
Definition: hip_runtime_api.h:90
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.
int maxTexture1DLinear
Maximum size for 1D textures bound to linear memory.
Definition: hip_runtime_api.h:122
Maximum y-dimension of a block.
Definition: hip_runtime_api.h:324
Definition: driver_types.h:117
hipError_t hipHostMalloc(void **ptr, size_t size, unsigned int flags)
Allocate device accessible page locked host memory.
Definition: hip_runtime_api.h:379
hipError_t hipCtxGetFlags(unsigned int *flags)
Return flags used for creating default context.
size_t sharedMemPerBlock
Size of shared memory region (in bytes).
Definition: hip_runtime_api.h:87
Definition: hip_runtime_api.h:387
hipError_t hipModuleGetTexRef(textureReference **texRef, hipModule_t hmod, const char *name)
returns the handle of the texture reference with the name from the module.
Definition: texture_types.h:88
Support cooperative launch on multiple devices.
Definition: hip_runtime_api.h:357
int maxThreadsPerMultiProcessor
Maximum resident threads per multi-processor.
Definition: hip_runtime_api.h:105
hipError_t hipDeviceGetLimit(size_t *pValue, enum hipLimit_t limit)
Get Resource limits of current device.
Definition: driver_types.h:281
size_t memPitch
Maximum pitch in bytes allowed by memory copies.
Definition: hip_runtime_api.h:128
Definition: driver_types.h:82
int l2CacheSize
L2 cache size.
Definition: hip_runtime_api.h:104
hipDeviceAttribute_t
Definition: hip_runtime_api.h:321
hipError_t hipEventDestroy(hipEvent_t event)
Destroy the specified event.
hipError_t hipStreamCreateWithFlags(hipStream_t *stream, unsigned int flags)
Create an asynchronous stream.
size_t textureAlignment
Alignment requirement for textures.
Definition: hip_runtime_api.h:129
hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem __dparm(0), hipStream_t stream __dparm(0))
Configure a kernel launch.
hipError_t hipFuncGetAttribute(int *value, hipFunction_attribute attrib, hipFunction_t hfunc)
Find out a specific attribute for a given function.
hipError_t hipChooseDevice(int *device, const hipDeviceProp_t *prop)
Device which matches hipDeviceProp_t is returned.
Major compute capability version number.
Definition: hip_runtime_api.h:346
Definition: hip_runtime_api.h:678
uint32_t y
y
Definition: hip_runtime_api.h:680
Maximum number of threads per block.
Definition: hip_runtime_api.h:322
hipError_t hipGraphMemcpyNodeSetParams(hipGraphNode_t node, const hipMemcpy3DParms *pNodeParams)
Sets a memcpy node's parameters.
int gcnArch
DEPRECATED: use gcnArchName instead.
Definition: hip_runtime_api.h:117
Maximum dimensions depth of 3D images in image elements.
Definition: hip_runtime_api.h:363
hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int *apiVersion)
Returns the approximate HIP api version.
Definition: hip_runtime_api.h:703
int kernelExecTimeoutEnabled
Run time limit for kernels executed on the device.
Definition: hip_runtime_api.h:131
Node which executes an embedded graph.
Definition: hip_runtime_api.h:4117
hipDeviceArch_t arch
Architectural feature flags. New for HIP.
Definition: hip_runtime_api.h:109
void(* hipStreamCallback_t)(hipStream_t stream, hipError_t status, void *userData)
Definition: hip_runtime_api.h:1600
The update failed because the function of a kernel node changed.
Definition: hip_runtime_api.h:4153
int maxGridSize[3]
Max grid dimensions (XYZ).
Definition: hip_runtime_api.h:92
hipError_t hipDevicePrimaryCtxReset(hipDevice_t dev)
Resets the primary context on the GPU.
hipError_t hipEventCreateWithFlags(hipEvent_t *event, unsigned flags)
Create an event with the specified flags.
hipError_t hipHostAlloc(void **ptr, size_t size, unsigned int flags)
Allocate device accessible page locked host memory [Deprecated].
int computeMode
Compute mode.
Definition: hip_runtime_api.h:106
Definition: hip_runtime_api.h:598
MemcpyFromSymbol node.
Definition: hip_runtime_api.h:4122
Maximum z-dimension of a block.
Definition: hip_runtime_api.h:325
PCI Bus ID.
Definition: hip_runtime_api.h:350
hipError_t hipMallocHost(void **ptr, size_t size)
Allocate pinned host memory [Deprecated].
hipError_t hipEventElapsedTime(float *ms, hipEvent_t start, hipEvent_t stop)
Return the elapsed time between two events.
hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig)
Set L1/Shared cache partition.
hipStreamCaptureStatus
Definition: hip_runtime_api.h:4166
Memcpy 1D node.
Definition: hip_runtime_api.h:4121
Definition: hip_runtime_api.h:615
hipErrorRuntimeMemory
Definition: hip_runtime_api.h:307
hipErrorInvalidValue
Definition: hip_runtime_api.h:205
hipError_t hipDeviceCanAccessPeer(int *canAccessPeer, int deviceId, int peerDeviceId)
Determine if a device can access a peer's memory.
hipError_t hipGetDeviceCount(int *count)
Return number of compute-capable devices.
Definition: driver_types.h:74
unsigned int * hdpMemFlushCntl
Addres of HDP_MEM_COHERENCY_FLUSH_CNTL register.
Definition: hip_runtime_api.h:126
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...
Definition: driver_types.h:369
hipErrorStreamCaptureImplicit
Definition: hip_runtime_api.h:296
hipError_t hipGraphAddKernelNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const hipKernelNodeParams *pNodeParams)
Creates a kernel execution node and adds it to a graph.
hipErrorNotSupported
Produced when the hip API is not supported/implemented.
Definition: hip_runtime_api.h:282
Maximum dimension height of 2D images in image elements.
Definition: hip_runtime_api.h:360
hipError_t hipStreamDestroy(hipStream_t stream)
Destroys the specified stream.
Warp size in threads.
Definition: hip_runtime_api.h:332
hipError_t hipHostGetFlags(unsigned int *flagsPtr, void *hostPtr)
Return flags associated with host pointer.
hipError_t hipStreamSynchronize(hipStream_t stream)
Wait for all commands in stream to complete.
Definition: driver_types.h:165
hipErrorCooperativeLaunchTooLarge
Definition: hip_runtime_api.h:278
int major
Definition: hip_runtime_api.h:97
hipError_t hipMemAllocPitch(hipDeviceptr_t *dptr, size_t *pitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes)
hipError_t hipIpcOpenEventHandle(hipEvent_t *event, hipIpcEventHandle_t handle)
Opens an interprocess event handles.
hipError_t hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes)
Copy data from Device to Device.
Maximum dimensions height of 3D images in image elements.
Definition: hip_runtime_api.h:362
Peak memory clock frequency in kilohertz.
Definition: hip_runtime_api.h:338
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...
Definition: hip_runtime_api.h:344
Definition: hip_runtime_api.h:585
hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags __dparm(hipOccupancyDefault))
Returns occupancy for a device function.
Definition: hip_runtime_api.h:669
dim3 gridDim
Grid dimentions.
Definition: hip_runtime_api.h:688
no preference for shared memory or L1 (default)
Definition: hip_runtime_api.h:659
Address of the HDP_REG_COHERENCY_FLUSH_CNTL register.
Definition: hip_runtime_api.h:366
hipGraphicsRegisterFlags
Definition: hip_runtime_api.h:797
hipError_t hipCtxCreate(hipCtx_t *ctx, unsigned int flags, hipDevice_t device)
Create a context and set it as current/ default context.
External event record node.
Definition: hip_runtime_api.h:4120
Stream is not capturing.
Definition: hip_runtime_api.h:4167
hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const hipMemsetParams *pNodeParams)
Sets a memset node's parameters.
Undo the effect of hipMemAdviseSetReadMostly.
Definition: hip_runtime_api.h:577
int clockInstructionRate
Definition: hip_runtime_api.h:107
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...
int cooperativeMultiDeviceLaunch
HIP device supports cooperative launch on multiple devices.
Definition: hip_runtime_api.h:121
hipFuncAttribute
Definition: hip_runtime_api.h:650
hipError_t hipGraphMemsetNodeGetParams(hipGraphNode_t node, hipMemsetParams *pNodeParams)
Gets a memset node's parameters.
Constant memory size in bytes.
Definition: hip_runtime_api.h:331
hipError_t hipMalloc3DArray(hipArray **array, const struct hipChannelFormatDesc *desc, struct hipExtent extent, unsigned int flags)
Allocate an array on the device.
hipError_t hipMemcpyDtoHAsync(void *dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream)
Copy data from Device to Host asynchronously.
hipError_t hipCtxSynchronize(void)
Blocks until the default context has completed all preceding requested tasks.
frame
Definition: hip_runtime_api.h:786
Pitch alignment requirement for 2D texture references bound to pitched memory;.
Definition: hip_runtime_api.h:370
hipError_t hipCtxPopCurrent(hipCtx_t *ctx)
Pop the current/default context and return the popped context.
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.
void * func
Device function symbol.
Definition: hip_runtime_api.h:687
hipError_t hipDeviceSynchronize(void)
Waits on all active streams on current device.
hipSuccess
Successful completion.
Definition: hip_runtime_api.h:204
hipGLDeviceList
Definition: hip_runtime_api.h:784
hipError_t hipMemcpyDtoH(void *dst, hipDeviceptr_t src, size_t sizeBytes)
Copy data from Device to Host.
Definition: hip_runtime_api.h:4139
hipError_t hipGraphGetNodes(hipGraph_t graph, hipGraphNode_t *nodes, size_t *numNodes)
Returns graph nodes.
int warpSize
Warp size.
Definition: hip_runtime_api.h:89
hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t *extSem_out, const hipExternalSemaphoreHandleDesc *semHandleDesc)
Imports an external semaphore.
int concurrentKernels
Device can possibly execute multiple kernels concurrently.
Definition: hip_runtime_api.h:110
unsigned long long hipSurfaceObject_t
Definition: surface_types.h:33
hipError_t hipStreamWriteValue64(hipStream_t stream, void *ptr, uint64_t value, unsigned int flags)
Enqueues a write command to the stream.[BETA].
hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t *handle, hipEvent_t event)
Gets an opaque interprocess handle for an event.
hipError_t hipExtStreamCreateWithCUMask(hipStream_t *stream, uint32_t cuMaskSize, const uint32_t *cuMask)
Create an asynchronous stream with the specified CU mask.
prefetched
Definition: hip_runtime_api.h:617
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.
hipError_t hipDeviceGetName(char *name, int len, hipDevice_t device)
Returns an identifer string for the device.
hipError_t hipGetDeviceProperties(hipDeviceProp_t *prop, int deviceId)
Returns device properties.
Alignment requirement for textures.
Definition: hip_runtime_api.h:369
hipError_t hipHostRegister(void *hostPtr, size_t sizeBytes, unsigned int flags)
Register host memory so it can be accessed from the current device.
struct hipGraphNode * hipGraphNode_t
Definition: hip_runtime_api.h:4107
size_t totalGlobalMem
Size of global memory region (in bytes).
Definition: hip_runtime_api.h:86
hipError_t hipWaitExternalSemaphoresAsync(const hipExternalSemaphore_t *extSemArray, const hipExternalSemaphoreWaitParams *paramsArray, unsigned int numExtSems, hipStream_t stream)
Waits on a set of external semaphore objects.
Definition: driver_types.h:68
Host (executable) node.
Definition: hip_runtime_api.h:4116
hipError_t hipMalloc(void **ptr, size_t size)
Allocate memory on the default accelerator.
const char * hipGetErrorName(hipError_t hip_error)
Return name of the specified error code in text form.
hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *f, int blockSize, size_t dynSharedMemPerBlk)
Returns occupancy for a device function.
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.
hipError_t hipIpcCloseMemHandle(void *devPtr)
Close memory mapped with hipIpcOpenMemHandle.
Definition: driver_types.h:352
Compute mode that device is currently in.
Definition: hip_runtime_api.h:341
hipErrorLaunchOutOfResources
Out of resources error.
Definition: hip_runtime_api.h:263
hipErrorStreamCaptureUnsupported
Definition: hip_runtime_api.h:283
dim3 blockDim
Block dimentions.
Definition: hip_runtime_api.h:689
GPU kernel node.
Definition: hip_runtime_api.h:4113
hipFuncCache_t
Definition: hip_runtime_api.h:658
PCI Device ID.
Definition: hip_runtime_api.h:351
hipError_t hipGetLastError(void)
Return last error returned by any HIP runtime API call and resets the stored error code to hipSuccess...
hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags)
Make the specified compute stream wait for an event.
hipError_t hipModuleGetGlobal(hipDeviceptr_t *dptr, size_t *bytes, hipModule_t hmod, const char *name)
Returns a global pointer from a module. Returns in *dptr and *bytes the pointer and size of the globa...
hipError_t hipCtxGetCurrent(hipCtx_t *ctx)
Get the handle of the current/ default context.
Device can map host memory into device address space.
Definition: hip_runtime_api.h:372
int maxThreadsDim[3]
Max number of threads in each dimension (XYZ) of a block.
Definition: hip_runtime_api.h:91
Definition: hip_runtime_api.h:160
hipError_t hipStreamWriteValue32(hipStream_t stream, void *ptr, uint32_t value, unsigned int flags)
Enqueues a write command to the stream.[BETA].
hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int *flags)
Return flags associated with this stream.
hipError_t hipMemAdvise(const void *dev_ptr, size_t count, hipMemoryAdvise advice, int device)
Advise about the usage of a given memory range to HIP.
hipMemRangeAttribute
Definition: hip_runtime_api.h:611
hipErrorNoDevice
Call to hipGetDeviceCount returned 0 devices.
Definition: hip_runtime_api.h:227
Number of multiprocessors on the device.
Definition: hip_runtime_api.h:340
hipErrorInvalidResourceHandle
Resource handle (hipEvent_t or hipStream_t) invalid.
Definition: hip_runtime_api.h:256
hipErrorStreamCaptureWrongThread
Definition: hip_runtime_api.h:301
hipStream_t stream
Stream identifier.
Definition: hip_runtime_api.h:692
hipError_t hipMemGetInfo(size_t *free, size_t *total)
Query memory info. Return snapshot of free memory, and total allocatable memory on the device...
hipError_t __hipPushCallConfiguration(dim3 gridDim, dim3 blockDim, size_t sharedMem __dparm(0), hipStream_t stream __dparm(0))
Push configuration of a kernel launch.
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...
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...
hipError_t hipDevicePrimaryCtxRelease(hipDevice_t dev)
Release the primary context on the GPU.
int integrated
APU vs dGPU.
Definition: hip_runtime_api.h:119
hipError_t hipFree(void *ptr)
Free memory allocated by the hcc hip memory allocation API. This API performs an implicit hipDeviceSy...
uint32_t z
z
Definition: hip_runtime_api.h:681
int memoryBusWidth
Global memory bus width in bits.
Definition: hip_runtime_api.h:95
hipError_t hipDeviceGetP2PAttribute(int *value, hipDeviceP2PAttr attr, int srcDevice, int dstDevice)
Returns a value for attr of link between two devices.
hipError_t hipDeviceReset(void)
The state of current device is discarded and updated to a fresh state.
hipError_t hipInit(unsigned int flags)
Explicitly initializes the HIP runtime.
hipError_t hipMemcpy3D(const struct hipMemcpy3DParms *p)
Copies data between host and device.
hipError_t hipRuntimeGetVersion(int *runtimeVersion)
Returns the approximate HIP Runtime version.
Definition: hip_runtime_api.h:612
struct hipExternalSemaphoreWaitParams_st hipExternalSemaphoreWaitParams
hipError_t hipMemcpyHtoA(hipArray *dstArray, size_t dstOffset, const void *srcHost, size_t count)
Copies data between host and device.
Definition: hip_runtime_api.h:4127
hipError_t hipSetupArgument(const void *arg, size_t size, size_t offset)
Set a kernel argument.
hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream)
Copy data from Device to Device asynchronously.
hipErrorMemoryAllocation
Memory allocation error.
Definition: hip_runtime_api.h:209
Definition: hip_runtime_api.h:84
hipError_t hipSetDevice(int deviceId)
Set default device to be used for subsequent hip API calls from this thread.
Clear the preferred location for the data.
Definition: hip_runtime_api.h:580
hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig *pConfig)
Get Shared memory bank configuration.
hipError_t hipDeviceGet(hipDevice_t *device, int ordinal)
Returns a handle to a compute device.
hipError_t hipDeviceTotalMem(size_t *bytes, hipDevice_t device)
Returns the total amount of memory on the device.
hipError_t hipMemAllocHost(void **ptr, size_t size)
Allocate pinned host memory [Deprecated].
hipError_t hipDrvMemcpy3DAsync(const HIP_MEMCPY3D *pCopy, hipStream_t stream)
Copies data between host and device asynchronously.
hipError_t hipFuncSetCacheConfig(const void *func, hipFuncCache_t config)
Set Cache configuration for a specific function.
char gcnArchName[256]
AMD GCN Arch Name.
Definition: hip_runtime_api.h:118
The compiler selects a device-specific value for the banking.
Definition: hip_runtime_api.h:668
size_t maxSharedMemoryPerMultiProcessor
Maximum Shared Memory Per Multiprocessor.
Definition: hip_runtime_api.h:114
hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk)
Returns occupancy for a device function.
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.
int cooperativeLaunch
HIP device supports cooperative launch.
Definition: hip_runtime_api.h:120
hipErrorStreamCaptureUnmatched
The capture was not initiated in this stream.
Definition: hip_runtime_api.h:289
hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx)
Disable direct access from current context's virtual address space to memory allocations physically l...
Support cooperative launch.
Definition: hip_runtime_api.h:356
Maximum number of elements in 1D images.
Definition: hip_runtime_api.h:358
hipError_t hipExtGetLinkTypeAndHopCount(int device1, int device2, uint32_t *linktype, uint32_t *hopcount)
Returns the link type and hop count between two devices.
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 HIP.
int pciDeviceID
PCI Device ID.
Definition: hip_runtime_api.h:113
All hip devices used by current OpenGL context.
Definition: hip_runtime_api.h:785
hipError_t hipRegisterApiCallback(uint32_t id, void *fun, void *arg)
hipError_t hipGraphCreate(hipGraph_t *pGraph, unsigned int flags)
Creates a graph.
hipSharedMemConfig
Definition: hip_runtime_api.h:667
Definition: hip_runtime_api.h:583
hipError_t hipGraphAddEmptyNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies)
Creates an empty node and adds it to a graph.
hipError_t hipModuleUnload(hipModule_t module)
Frees the module.
int pciDomainID
PCI Domain ID.
Definition: hip_runtime_api.h:111
int ECCEnabled
Device has ECC support enabled.
Definition: hip_runtime_api.h:132
char name[256]
Device name.
Definition: hip_runtime_api.h:85
hipError_t hipCtxGetDevice(hipDevice_t *device)
Get the handle of the device associated with current/default context.
int managedMemory
Device supports allocating managed memory on this system.
Definition: hip_runtime_api.h:144
hipError_t hipFuncGetAttributes(struct hipFuncAttributes *attr, const void *func)
Find out attributes for a given function.
hipErrorStreamCaptureInvalidated
Definition: hip_runtime_api.h:285
hipMemoryAdvise
Definition: hip_runtime_api.h:574
The update failed because a node type changed.
Definition: hip_runtime_api.h:4152
Definition: hip_runtime_api.h:4149
The preferred location of the range.
Definition: hip_runtime_api.h:614
Definition: hip_runtime_api.h:575
hipError_t hipDeviceGetAttribute(int *pi, hipDeviceAttribute_t attr, int deviceId)
Query for a specific device attribute.
hipErrorInvalidDevicePointer
Invalid Device Pointer.
Definition: hip_runtime_api.h:221
hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, void *src, size_t sizeBytes, hipStream_t stream)
Copy data from Host to Device asynchronously.
int directManagedMemAccessFromHost
Host can directly access managed memory on the device without migration.
Definition: hip_runtime_api.h:145
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 HIP.
hipError_t hipHostUnregister(void *hostPtr)
Un-register host pointer.
Definition: hip_runtime_api.h:581
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...
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.
HIP will only write and will not read from this registered resource.
Definition: hip_runtime_api.h:800
Definition: hip_runtime_api.h:602
hipError_t hipStreamAttachMemAsync(hipStream_t stream, void *dev_ptr, size_t length __dparm(0), unsigned int flags __dparm(hipMemAttachSingle))
Attach memory to a stream asynchronously in HIP.
MemcpyToSymbol node.
Definition: hip_runtime_api.h:4123
hipError_t hipStreamCreate(hipStream_t *stream)
Create an asynchronous stream.
hipError_t hipMemcpy3DAsync(const struct hipMemcpy3DParms *p, hipStream_t stream __dparm(0))
Copies data between host and device asynchronously.
Definition: hip_runtime_api.h:45
hipError_t hipMemcpy(void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind)
Copy data from src to dst.
Definition: hip_runtime_api.h:381
hipError_t hipGraphKernelNodeGetParams(hipGraphNode_t node, hipKernelNodeParams *pNodeParams)
Gets kernel node's parameters.
hipError_t hipEventCreate(hipEvent_t *event)
Definition: driver_types.h:379
hipError_t hipCtxDestroy(hipCtx_t ctx)
Destroy a HIP context.
Definition: driver_types.h:95
Definition: hip_runtime_api.h:461
int cooperativeMultiDeviceUnmatchedSharedMem
Definition: hip_runtime_api.h:140
hipError_t hipDestroyExternalSemaphore(hipExternalSemaphore_t extSem)
Destroys an external semaphore object and releases any references to the underlying resource...
hipError_t hipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int *flags, int *active)
Get the state of the primary context.
External event wait node.
Definition: hip_runtime_api.h:4119
Definition: driver_types.h:314
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...
hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config)
The bank width of shared memory on current device is set.
hipError_t hipGetDevice(int *deviceId)
Return the default device id for the calling host thread.
hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream)
Record an event in the specified stream.
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...
HIP will perform texture gather operations on this registered resource.
Definition: hip_runtime_api.h:803
hipError_t hipFuncSetSharedMemConfig(const void *func, hipSharedMemConfig config)
Set shared memory configuation for a specific function.
int memoryClockRate
Max global memory clock frequency in khz.
Definition: hip_runtime_api.h:94
Maximum dimension width of 2D images in image elements.
Definition: hip_runtime_api.h:359
hipError_t hipMallocManaged(void **dev_ptr, size_t size, unsigned int flags __dparm(hipMemAttachGlobal))
Allocates memory that will be automatically managed by HIP.
hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config)
Set Shared memory bank configuration.
hipError_t hipGraphAddMemcpyNode1D(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, void *dst, const void *src, size_t count, hipMemcpyKind kind)
Creates a 1D memcpy node and adds it to a graph.
int pageableMemoryAccess
Definition: hip_runtime_api.h:147
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...
The update failed because the parameters changed in a way that is not supported.
Definition: hip_runtime_api.h:4155
Address of the HDP_MEM_COHERENCY_FLUSH_CNTL register.
Definition: hip_runtime_api.h:365
Definition: hip_runtime_api.h:393
hipErrorStreamCaptureMerge
Definition: hip_runtime_api.h:287
hipError_t hipDeviceGetPCIBusId(char *pciBusId, int len, int device)
Returns a PCI Bus Id string for the device, overloaded to take int device ID.
int maxTexture2D[2]
Maximum dimensions (width, height) of 2D images, in image elements.
Definition: hip_runtime_api.h:124
prefer larger shared memory and smaller L1 cache
Definition: hip_runtime_api.h:660
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.
void ** args
Arguments.
Definition: hip_runtime_api.h:690
hipErrorRuntimeOther
Definition: hip_runtime_api.h:309
Device has ECC support enabled.
Definition: hip_runtime_api.h:373
hipError_t hipStreamQuery(hipStream_t stream)
Return hipSuccess if all of the operations in the specified stream have completed, or hipErrorNotReady if not.
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
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.
hipError_t hipStreamWaitValue64(hipStream_t stream, void *ptr, uint64_t value, unsigned int flags, uint64_t mask __dparm(0xFFFFFFFFFFFFFFFF))
Enqueues a wait command to the stream.[BETA].
int cooperativeMultiDeviceUnmatchedFunc
Definition: hip_runtime_api.h:134
int cooperativeMultiDeviceUnmatchedGridDim
Definition: hip_runtime_api.h:136
Definition: hip_runtime_api.h:671
hipError_t hipPointerGetAttributes(hipPointerAttribute_t *attributes, const void *ptr)
Return attributes for the specified pointer.
hipError_t hipMemcpyParam2DAsync(const hip_Memcpy2D *pCopy, hipStream_t stream __dparm(0))
Copies memory for 2D arrays.
size_t sharedMem
Shared memory.
Definition: hip_runtime_api.h:691
hipError_t hipCtxGetCacheConfig(hipFuncCache_t *cacheConfig)
Set Cache configuration for a specific function.
The update succeeded.
Definition: hip_runtime_api.h:4148
hipError_t hipGraphDestroy(hipGraph_t graph)
Destroys a graph.
hipErrorStreamCaptureUnjoined
Definition: hip_runtime_api.h:290
hipError_t hipGetDeviceFlags(unsigned int *flags)
Gets the flags set for current device.
HIP will bind this resource to a surface.
Definition: hip_runtime_api.h:802
hipError_t hipExternalMemoryGetMappedBuffer(void **devPtr, hipExternalMemory_t extMem, const hipExternalMemoryBufferDesc *bufferDesc)
Maps a buffer onto an imported memory object.
The update failed because the topology changed.
Definition: hip_runtime_api.h:4151
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...
hipError_t hipProfilerStop()
Stop recording of profiling information. When using this API, start the profiler with profiling disab...
Definition: hip_runtime_api.h:348
Memcpy 3D node.
Definition: hip_runtime_api.h:4114
int multiProcessorCount
Number of multi-processors (compute units).
Definition: hip_runtime_api.h:103
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...
hipError_t hipDrvMemcpy2DUnaligned(const hip_Memcpy2D *pCopy)
hipError_t hipProfilerStart()
Start recording of profiling information When using this API, start the profiler with profiling disab...
hipError_t hipLaunchByPtr(const void *func)
Launch a kernel.
Definition: texture_types.h:109
Definition: hip_runtime_api.h:755