diff --git a/hipamd/include/hip/amd_detail/hip_api_trace.hpp b/hipamd/include/hip/amd_detail/hip_api_trace.hpp new file mode 100644 index 0000000000..06c41f933f --- /dev/null +++ b/hipamd/include/hip/amd_detail/hip_api_trace.hpp @@ -0,0 +1,1318 @@ +/* + Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ +#pragma once + +#include + +// HIP API interface +typedef hipError_t (*t___hipPopCallConfiguration)(dim3* gridDim, dim3* blockDim, size_t* sharedMem, + hipStream_t* stream); +typedef hipError_t (*t___hipPushCallConfiguration)(dim3 gridDim, dim3 blockDim, size_t sharedMem, + hipStream_t stream); +typedef void** (*t___hipRegisterFatBinary)(const void* data); +typedef void (*t___hipRegisterFunction)(void** modules, const void* hostFunction, + char* deviceFunction, const char* deviceName, + unsigned int threadLimit, uint3* tid, uint3* bid, + dim3* blockDim, dim3* gridDim, int* wSize); +typedef void (*t___hipRegisterManagedVar)(void* hipModule, void** pointer, void* init_value, + const char* name, size_t size, unsigned align); +typedef void (*t___hipRegisterSurface)(void** modules, void* var, char* hostVar, + char* deviceVar, int type, int ext); +typedef void (*t___hipRegisterTexture)(void** modules, void* var, char* hostVar, + char* deviceVar, int type, int norm, int ext); +typedef void (*t___hipRegisterVar)(void** modules, void* var, char* hostVar, + char* deviceVar, int ext, size_t size, int constant, int global); +typedef void (*t___hipUnregisterFatBinary)(void** modules); + +typedef const char* (*t_hipApiName)(uint32_t id); +typedef hipError_t (*t_hipArray3DCreate)(hipArray_t* array, + const HIP_ARRAY3D_DESCRIPTOR* pAllocateArray); +typedef hipError_t (*t_hipArray3DGetDescriptor)(HIP_ARRAY3D_DESCRIPTOR* pArrayDescriptor, + hipArray_t array); +typedef hipError_t (*t_hipArrayCreate)(hipArray_t* pHandle, + const HIP_ARRAY_DESCRIPTOR* pAllocateArray); +typedef hipError_t (*t_hipArrayDestroy)(hipArray_t array); +typedef hipError_t (*t_hipArrayGetDescriptor)(HIP_ARRAY_DESCRIPTOR* pArrayDescriptor, + hipArray_t array); +typedef hipError_t (*t_hipArrayGetInfo)(hipChannelFormatDesc* desc, hipExtent* extent, + unsigned int* flags, hipArray_t array); +typedef hipError_t (*t_hipBindTexture)(size_t* offset, const textureReference* tex, + const void* devPtr, const hipChannelFormatDesc* desc, + size_t size); +typedef hipError_t (*t_hipBindTexture2D)(size_t* offset, const textureReference* tex, + const void* devPtr, const hipChannelFormatDesc* desc, + size_t width, size_t height, size_t pitch); +typedef hipError_t (*t_hipBindTextureToArray)(const textureReference* tex, hipArray_const_t array, + const hipChannelFormatDesc* desc); +typedef hipError_t (*t_hipBindTextureToMipmappedArray)(const textureReference* tex, + hipMipmappedArray_const_t mipmappedArray, + const hipChannelFormatDesc* desc); +typedef hipError_t (*t_hipChooseDevice)(int* device, const hipDeviceProp_t* prop); +typedef hipError_t (*t_hipConfigureCall)(dim3 gridDim, dim3 blockDim, size_t sharedMem, + hipStream_t stream); +typedef hipError_t (*t_hipCreateSurfaceObject)(hipSurfaceObject_t* pSurfObject, + const hipResourceDesc* pResDesc); +typedef hipError_t (*t_hipCreateTextureObject)(hipTextureObject_t* pTexObject, + const hipResourceDesc* pResDesc, + const hipTextureDesc* pTexDesc, + const struct hipResourceViewDesc* pResViewDesc); +typedef hipError_t (*t_hipCtxCreate)(hipCtx_t* ctx, unsigned int flags, hipDevice_t device); +typedef hipError_t (*t_hipCtxDestroy)(hipCtx_t ctx); +typedef hipError_t (*t_hipCtxDisablePeerAccess)(hipCtx_t peerCtx); +typedef hipError_t (*t_hipCtxEnablePeerAccess)(hipCtx_t peerCtx, unsigned int flags); +typedef hipError_t (*t_hipCtxGetApiVersion)(hipCtx_t ctx, int* apiVersion); +typedef hipError_t (*t_hipCtxGetCacheConfig)(hipFuncCache_t* cacheConfig); +typedef hipError_t (*t_hipCtxGetCurrent)(hipCtx_t* ctx); +typedef hipError_t (*t_hipCtxGetDevice)(hipDevice_t* device); +typedef hipError_t (*t_hipCtxGetFlags)(unsigned int* flags); +typedef hipError_t (*t_hipCtxGetSharedMemConfig)(hipSharedMemConfig* pConfig); +typedef hipError_t (*t_hipCtxPopCurrent)(hipCtx_t* ctx); +typedef hipError_t (*t_hipCtxPushCurrent)(hipCtx_t ctx); +typedef hipError_t (*t_hipCtxSetCacheConfig)(hipFuncCache_t cacheConfig); +typedef hipError_t (*t_hipCtxSetCurrent)(hipCtx_t ctx); +typedef hipError_t (*t_hipCtxSetSharedMemConfig)(hipSharedMemConfig config); +typedef hipError_t (*t_hipCtxSynchronize)(void); +typedef hipError_t (*t_hipDestroyExternalMemory)(hipExternalMemory_t extMem); +typedef hipError_t (*t_hipDestroyExternalSemaphore)(hipExternalSemaphore_t extSem); +typedef hipError_t (*t_hipDestroySurfaceObject)(hipSurfaceObject_t surfaceObject); +typedef hipError_t (*t_hipDestroyTextureObject)(hipTextureObject_t textureObject); +typedef hipError_t (*t_hipDeviceCanAccessPeer)(int* canAccessPeer, int deviceId, int peerDeviceId); +typedef hipError_t (*t_hipDeviceComputeCapability)(int* major, int* minor, hipDevice_t device); +typedef hipError_t (*t_hipDeviceDisablePeerAccess)(int peerDeviceId); +typedef hipError_t (*t_hipDeviceEnablePeerAccess)(int peerDeviceId, unsigned int flags); +typedef hipError_t (*t_hipDeviceGet)(hipDevice_t* device, int ordinal); +typedef hipError_t (*t_hipDeviceGetAttribute)(int* pi, hipDeviceAttribute_t attr, int deviceId); +typedef hipError_t (*t_hipDeviceGetByPCIBusId)(int* device, const char* pciBusId); +typedef hipError_t (*t_hipDeviceGetCacheConfig)(hipFuncCache_t* cacheConfig); +typedef hipError_t (*t_hipDeviceGetDefaultMemPool)(hipMemPool_t* mem_pool, int device); +typedef hipError_t (*t_hipDeviceGetGraphMemAttribute)(int device, hipGraphMemAttributeType attr, + void* value); +typedef hipError_t (*t_hipDeviceGetLimit)(size_t* pValue, enum hipLimit_t limit); +typedef hipError_t (*t_hipDeviceGetMemPool)(hipMemPool_t* mem_pool, int device); +typedef hipError_t (*t_hipDeviceGetName)(char* name, int len, hipDevice_t device); +typedef hipError_t (*t_hipDeviceGetP2PAttribute)(int* value, hipDeviceP2PAttr attr, int srcDevice, + int dstDevice); +typedef hipError_t (*t_hipDeviceGetPCIBusId)(char* pciBusId, int len, int device); +typedef hipError_t (*t_hipDeviceGetSharedMemConfig)(hipSharedMemConfig* pConfig); +typedef hipError_t (*t_hipDeviceGetStreamPriorityRange)(int* leastPriority, int* greatestPriority); +typedef hipError_t (*t_hipDeviceGetUuid)(hipUUID* uuid, hipDevice_t device); +typedef hipError_t (*t_hipDeviceGraphMemTrim)(int device); +typedef hipError_t (*t_hipDevicePrimaryCtxGetState)(hipDevice_t dev, unsigned int* flags, + int* active); +typedef hipError_t (*t_hipDevicePrimaryCtxRelease)(hipDevice_t dev); +typedef hipError_t (*t_hipDevicePrimaryCtxReset)(hipDevice_t dev); +typedef hipError_t (*t_hipDevicePrimaryCtxRetain)(hipCtx_t* pctx, hipDevice_t dev); +typedef hipError_t (*t_hipDevicePrimaryCtxSetFlags)(hipDevice_t dev, unsigned int flags); +typedef hipError_t (*t_hipDeviceReset)(void); +typedef hipError_t (*t_hipDeviceSetCacheConfig)(hipFuncCache_t cacheConfig); +typedef hipError_t (*t_hipDeviceSetGraphMemAttribute)(int device, hipGraphMemAttributeType attr, + void* value); +typedef hipError_t (*t_hipDeviceSetLimit)(enum hipLimit_t limit, size_t value); +typedef hipError_t (*t_hipDeviceSetMemPool)(int device, hipMemPool_t mem_pool); +typedef hipError_t (*t_hipDeviceSetSharedMemConfig)(hipSharedMemConfig config); +typedef hipError_t (*t_hipDeviceSynchronize)(void); +typedef hipError_t (*t_hipDeviceTotalMem)(size_t* bytes, hipDevice_t device); +typedef hipError_t (*t_hipDriverGetVersion)(int* driverVersion); +typedef hipError_t (*t_hipDrvGetErrorName)(hipError_t hipError, const char** errorString); +typedef hipError_t (*t_hipDrvGetErrorString)(hipError_t hipError, const char** errorString); +typedef hipError_t (*t_hipDrvGraphAddMemcpyNode)(hipGraphNode_t* phGraphNode, hipGraph_t hGraph, + const hipGraphNode_t* dependencies, + size_t numDependencies, + const HIP_MEMCPY3D* copyParams, hipCtx_t ctx); +typedef hipError_t (*t_hipDrvMemcpy2DUnaligned)(const hip_Memcpy2D* pCopy); +typedef hipError_t (*t_hipDrvMemcpy3D)(const HIP_MEMCPY3D* pCopy); +typedef hipError_t (*t_hipDrvMemcpy3DAsync)(const HIP_MEMCPY3D* pCopy, hipStream_t stream); +typedef hipError_t (*t_hipDrvPointerGetAttributes)(unsigned int numAttributes, + hipPointer_attribute* attributes, void** data, + hipDeviceptr_t ptr); +typedef hipError_t (*t_hipEventCreate)(hipEvent_t* event); +typedef hipError_t (*t_hipEventCreateWithFlags)(hipEvent_t* event, unsigned flags); +typedef hipError_t (*t_hipEventDestroy)(hipEvent_t event); +typedef hipError_t (*t_hipEventElapsedTime)(float* ms, hipEvent_t start, hipEvent_t stop); +typedef hipError_t (*t_hipEventQuery)(hipEvent_t event); +typedef hipError_t (*t_hipEventRecord)(hipEvent_t event, hipStream_t stream); +typedef hipError_t (*t_hipEventSynchronize)(hipEvent_t event); +typedef hipError_t (*t_hipExtGetLinkTypeAndHopCount)(int device1, int device2, uint32_t* linktype, + uint32_t* hopcount); +typedef hipError_t (*t_hipExtLaunchKernel)(const void* function_address, dim3 numBlocks, + dim3 dimBlocks, void** args, size_t sharedMemBytes, + hipStream_t stream, hipEvent_t startEvent, + hipEvent_t stopEvent, int flags); +typedef hipError_t (*t_hipExtLaunchMultiKernelMultiDevice)(hipLaunchParams* launchParamsList, + int numDevices, unsigned int flags); +typedef hipError_t (*t_hipExtMallocWithFlags)(void** ptr, size_t sizeBytes, unsigned int flags); +typedef hipError_t (*t_hipExtStreamCreateWithCUMask)(hipStream_t* stream, uint32_t cuMaskSize, + const uint32_t* cuMask); +typedef hipError_t (*t_hipExtStreamGetCUMask)(hipStream_t stream, uint32_t cuMaskSize, + uint32_t* cuMask); +typedef hipError_t (*t_hipExternalMemoryGetMappedBuffer)( + void** devPtr, hipExternalMemory_t extMem, const hipExternalMemoryBufferDesc* bufferDesc); +typedef hipError_t (*t_hipFree)(void* ptr); +typedef hipError_t (*t_hipFreeArray)(hipArray_t array); +typedef hipError_t (*t_hipFreeAsync)(void* dev_ptr, hipStream_t stream); +typedef hipError_t (*t_hipFreeHost)(void* ptr); +typedef hipError_t (*t_hipFreeMipmappedArray)(hipMipmappedArray_t mipmappedArray); +typedef hipError_t (*t_hipFuncGetAttribute)(int* value, hipFunction_attribute attrib, + hipFunction_t hfunc); +typedef hipError_t (*t_hipFuncGetAttributes)(struct hipFuncAttributes* attr, const void* func); +typedef hipError_t (*t_hipFuncSetAttribute)(const void* func, hipFuncAttribute attr, int value); +typedef hipError_t (*t_hipFuncSetCacheConfig)(const void* func, hipFuncCache_t config); +typedef hipError_t (*t_hipFuncSetSharedMemConfig)(const void* func, hipSharedMemConfig config); +typedef hipError_t (*t_hipGLGetDevices)(unsigned int* pHipDeviceCount, int* pHipDevices, + unsigned int hipDeviceCount, hipGLDeviceList deviceList); +typedef hipError_t (*t_hipGetChannelDesc)(hipChannelFormatDesc* desc, hipArray_const_t array); +typedef hipError_t (*t_hipGetDevice)(int* deviceId); +typedef hipError_t (*t_hipGetDeviceCount)(int* count); +typedef hipError_t (*t_hipGetDeviceFlags)(unsigned int* flags); +typedef hipError_t (*t_hipGetDeviceProperties)(hipDeviceProp_t* prop, int deviceId); +typedef const char* (*t_hipGetErrorName)(hipError_t hip_error); +typedef const char* (*t_hipGetErrorString)(hipError_t hipError); +typedef hipError_t (*t_hipGetLastError)(void); +typedef hipError_t (*t_hipGetMipmappedArrayLevel)(hipArray_t* levelArray, + hipMipmappedArray_const_t mipmappedArray, + unsigned int level); +typedef hipError_t (*t_hipGetSymbolAddress)(void** devPtr, const void* symbol); +typedef hipError_t (*t_hipGetSymbolSize)(size_t* size, const void* symbol); +typedef hipError_t (*t_hipGetTextureAlignmentOffset)(size_t* offset, + const textureReference* texref); +typedef hipError_t (*t_hipGetTextureObjectResourceDesc)(hipResourceDesc* pResDesc, + hipTextureObject_t textureObject); +typedef hipError_t (*t_hipGetTextureObjectResourceViewDesc)( + struct hipResourceViewDesc* pResViewDesc, hipTextureObject_t textureObject); +typedef hipError_t (*t_hipGetTextureObjectTextureDesc)(hipTextureDesc* pTexDesc, + hipTextureObject_t textureObject); +typedef hipError_t (*t_hipGetTextureReference)(const textureReference** texref, const void* symbol); +typedef hipError_t (*t_hipGraphAddChildGraphNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, hipGraph_t childGraph); +typedef hipError_t (*t_hipGraphAddDependencies)(hipGraph_t graph, const hipGraphNode_t* from, + const hipGraphNode_t* to, size_t numDependencies); +typedef hipError_t (*t_hipGraphAddEmptyNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies); +typedef hipError_t (*t_hipGraphAddEventRecordNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, hipEvent_t event); +typedef hipError_t (*t_hipGraphAddEventWaitNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, hipEvent_t event); +typedef hipError_t (*t_hipGraphAddHostNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, + const hipHostNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphAddKernelNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, + const hipKernelNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphAddMemAllocNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, + hipMemAllocNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphAddMemFreeNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, void* dev_ptr); +typedef hipError_t (*t_hipGraphAddMemcpyNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, + const hipMemcpy3DParms* pCopyParams); +typedef hipError_t (*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); +typedef hipError_t (*t_hipGraphAddMemcpyNodeFromSymbol)(hipGraphNode_t* pGraphNode, + hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, void* dst, + const void* symbol, size_t count, + size_t offset, hipMemcpyKind kind); +typedef hipError_t (*t_hipGraphAddMemcpyNodeToSymbol)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, const void* symbol, + const void* src, size_t count, size_t offset, + hipMemcpyKind kind); +typedef hipError_t (*t_hipGraphAddMemsetNode)(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, + const hipMemsetParams* pMemsetParams); +typedef hipError_t (*t_hipGraphChildGraphNodeGetGraph)(hipGraphNode_t node, hipGraph_t* pGraph); +typedef hipError_t (*t_hipGraphClone)(hipGraph_t* pGraphClone, hipGraph_t originalGraph); +typedef hipError_t (*t_hipGraphCreate)(hipGraph_t* pGraph, unsigned int flags); +typedef hipError_t (*t_hipGraphDebugDotPrint)(hipGraph_t graph, const char* path, + unsigned int flags); +typedef hipError_t (*t_hipGraphDestroy)(hipGraph_t graph); +typedef hipError_t (*t_hipGraphDestroyNode)(hipGraphNode_t node); +typedef hipError_t (*t_hipGraphEventRecordNodeGetEvent)(hipGraphNode_t node, hipEvent_t* event_out); +typedef hipError_t (*t_hipGraphEventRecordNodeSetEvent)(hipGraphNode_t node, hipEvent_t event); +typedef hipError_t (*t_hipGraphEventWaitNodeGetEvent)(hipGraphNode_t node, hipEvent_t* event_out); +typedef hipError_t (*t_hipGraphEventWaitNodeSetEvent)(hipGraphNode_t node, hipEvent_t event); +typedef hipError_t (*t_hipGraphExecChildGraphNodeSetParams)(hipGraphExec_t hGraphExec, + hipGraphNode_t node, + hipGraph_t childGraph); +typedef hipError_t (*t_hipGraphExecDestroy)(hipGraphExec_t graphExec); +typedef hipError_t (*t_hipGraphExecEventRecordNodeSetEvent)(hipGraphExec_t hGraphExec, + hipGraphNode_t hNode, hipEvent_t event); +typedef hipError_t (*t_hipGraphExecEventWaitNodeSetEvent)(hipGraphExec_t hGraphExec, + hipGraphNode_t hNode, hipEvent_t event); +typedef hipError_t (*t_hipGraphExecHostNodeSetParams)(hipGraphExec_t hGraphExec, + hipGraphNode_t node, + const hipHostNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphExecKernelNodeSetParams)(hipGraphExec_t hGraphExec, + hipGraphNode_t node, + const hipKernelNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphExecMemcpyNodeSetParams)(hipGraphExec_t hGraphExec, + hipGraphNode_t node, + hipMemcpy3DParms* pNodeParams); +typedef hipError_t (*t_hipGraphExecMemcpyNodeSetParams1D)(hipGraphExec_t hGraphExec, + hipGraphNode_t node, void* dst, + const void* src, size_t count, + hipMemcpyKind kind); +typedef hipError_t (*t_hipGraphExecMemcpyNodeSetParamsFromSymbol)(hipGraphExec_t hGraphExec, + hipGraphNode_t node, void* dst, + const void* symbol, size_t count, + size_t offset, + hipMemcpyKind kind); +typedef hipError_t (*t_hipGraphExecMemcpyNodeSetParamsToSymbol)(hipGraphExec_t hGraphExec, + hipGraphNode_t node, + const void* symbol, const void* src, + size_t count, size_t offset, + hipMemcpyKind kind); +typedef hipError_t (*t_hipGraphExecMemsetNodeSetParams)(hipGraphExec_t hGraphExec, + hipGraphNode_t node, + const hipMemsetParams* pNodeParams); +typedef hipError_t (*t_hipGraphExecUpdate)(hipGraphExec_t hGraphExec, hipGraph_t hGraph, + hipGraphNode_t* hErrorNode_out, + hipGraphExecUpdateResult* updateResult_out); +typedef hipError_t (*t_hipGraphGetEdges)(hipGraph_t graph, hipGraphNode_t* from, hipGraphNode_t* to, + size_t* numEdges); +typedef hipError_t (*t_hipGraphGetNodes)(hipGraph_t graph, hipGraphNode_t* nodes, size_t* numNodes); +typedef hipError_t (*t_hipGraphGetRootNodes)(hipGraph_t graph, hipGraphNode_t* pRootNodes, + size_t* pNumRootNodes); +typedef hipError_t (*t_hipGraphHostNodeGetParams)(hipGraphNode_t node, + hipHostNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphHostNodeSetParams)(hipGraphNode_t node, + const hipHostNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphInstantiate)(hipGraphExec_t* pGraphExec, hipGraph_t graph, + hipGraphNode_t* pErrorNode, char* pLogBuffer, + size_t bufferSize); +typedef hipError_t (*t_hipGraphInstantiateWithFlags)(hipGraphExec_t* pGraphExec, hipGraph_t graph, + unsigned long long flags); +typedef hipError_t (*t_hipGraphKernelNodeCopyAttributes)(hipGraphNode_t hSrc, hipGraphNode_t hDst); +typedef hipError_t (*t_hipGraphKernelNodeGetAttribute)(hipGraphNode_t hNode, + hipKernelNodeAttrID attr, + hipKernelNodeAttrValue* value); +typedef hipError_t (*t_hipGraphKernelNodeGetParams)(hipGraphNode_t node, + hipKernelNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphKernelNodeSetAttribute)(hipGraphNode_t hNode, + hipKernelNodeAttrID attr, + const hipKernelNodeAttrValue* value); +typedef hipError_t (*t_hipGraphKernelNodeSetParams)(hipGraphNode_t node, + const hipKernelNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphLaunch)(hipGraphExec_t graphExec, hipStream_t stream); +typedef hipError_t (*t_hipGraphMemAllocNodeGetParams)(hipGraphNode_t node, + hipMemAllocNodeParams* pNodeParams); +typedef hipError_t (*t_hipGraphMemFreeNodeGetParams)(hipGraphNode_t node, void* dev_ptr); +typedef hipError_t (*t_hipGraphMemcpyNodeGetParams)(hipGraphNode_t node, + hipMemcpy3DParms* pNodeParams); +typedef hipError_t (*t_hipGraphMemcpyNodeSetParams)(hipGraphNode_t node, + const hipMemcpy3DParms* pNodeParams); +typedef hipError_t (*t_hipGraphMemcpyNodeSetParams1D)(hipGraphNode_t node, void* dst, + const void* src, size_t count, + hipMemcpyKind kind); +typedef hipError_t (*t_hipGraphMemcpyNodeSetParamsFromSymbol)(hipGraphNode_t node, void* dst, + const void* symbol, size_t count, + size_t offset, hipMemcpyKind kind); +typedef hipError_t (*t_hipGraphMemcpyNodeSetParamsToSymbol)(hipGraphNode_t node, const void* symbol, + const void* src, size_t count, + size_t offset, hipMemcpyKind kind); +typedef hipError_t (*t_hipGraphMemsetNodeGetParams)(hipGraphNode_t node, + hipMemsetParams* pNodeParams); +typedef hipError_t (*t_hipGraphMemsetNodeSetParams)(hipGraphNode_t node, + const hipMemsetParams* pNodeParams); +typedef hipError_t (*t_hipGraphNodeFindInClone)(hipGraphNode_t* pNode, hipGraphNode_t originalNode, + hipGraph_t clonedGraph); +typedef hipError_t (*t_hipGraphNodeGetDependencies)(hipGraphNode_t node, + hipGraphNode_t* pDependencies, + size_t* pNumDependencies); +typedef hipError_t (*t_hipGraphNodeGetDependentNodes)(hipGraphNode_t node, + hipGraphNode_t* pDependentNodes, + size_t* pNumDependentNodes); +typedef hipError_t (*t_hipGraphNodeGetEnabled)(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + unsigned int* isEnabled); +typedef hipError_t (*t_hipGraphNodeGetType)(hipGraphNode_t node, hipGraphNodeType* pType); +typedef hipError_t (*t_hipGraphNodeSetEnabled)(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + unsigned int isEnabled); +typedef hipError_t (*t_hipGraphReleaseUserObject)(hipGraph_t graph, hipUserObject_t object, + unsigned int count); +typedef hipError_t (*t_hipGraphRemoveDependencies)(hipGraph_t graph, const hipGraphNode_t* from, + const hipGraphNode_t* to, + size_t numDependencies); +typedef hipError_t (*t_hipGraphRetainUserObject)(hipGraph_t graph, hipUserObject_t object, + unsigned int count, unsigned int flags); +typedef hipError_t (*t_hipGraphUpload)(hipGraphExec_t graphExec, hipStream_t stream); +typedef hipError_t (*t_hipGraphicsGLRegisterBuffer)(hipGraphicsResource** resource, GLuint buffer, + unsigned int flags); +typedef hipError_t (*t_hipGraphicsGLRegisterImage)(hipGraphicsResource** resource, GLuint image, + GLenum target, unsigned int flags); +typedef hipError_t (*t_hipGraphicsMapResources)(int count, hipGraphicsResource_t* resources, + hipStream_t stream); +typedef hipError_t (*t_hipGraphicsResourceGetMappedPointer)(void** devPtr, size_t* size, + hipGraphicsResource_t resource); +typedef hipError_t (*t_hipGraphicsSubResourceGetMappedArray)(hipArray_t* array, + hipGraphicsResource_t resource, + unsigned int arrayIndex, + unsigned int mipLevel); +typedef hipError_t (*t_hipGraphicsUnmapResources)(int count, hipGraphicsResource_t* resources, + hipStream_t stream); +typedef hipError_t (*t_hipGraphicsUnregisterResource)(hipGraphicsResource_t resource); +typedef hipError_t (*t_hipHostAlloc)(void** ptr, size_t size, unsigned int flags); +typedef hipError_t (*t_hipHostFree)(void* ptr); +typedef hipError_t (*t_hipHostGetDevicePointer)(void** devPtr, void* hstPtr, unsigned int flags); +typedef hipError_t (*t_hipHostGetFlags)(unsigned int* flagsPtr, void* hostPtr); +typedef hipError_t (*t_hipHostMalloc)(void** ptr, size_t size, unsigned int flags); +typedef hipError_t (*t_hipHostRegister)(void* hostPtr, size_t sizeBytes, unsigned int flags); +typedef hipError_t (*t_hipHostUnregister)(void* hostPtr); +typedef hipError_t (*t_hipImportExternalMemory)(hipExternalMemory_t* extMem_out, + const hipExternalMemoryHandleDesc* memHandleDesc); +typedef hipError_t (*t_hipImportExternalSemaphore)( + hipExternalSemaphore_t* extSem_out, const hipExternalSemaphoreHandleDesc* semHandleDesc); +typedef hipError_t (*t_hipInit)(unsigned int flags); +typedef hipError_t (*t_hipIpcCloseMemHandle)(void* devPtr); +typedef hipError_t (*t_hipIpcGetEventHandle)(hipIpcEventHandle_t* handle, hipEvent_t event); +typedef hipError_t (*t_hipIpcGetMemHandle)(hipIpcMemHandle_t* handle, void* devPtr); +typedef hipError_t (*t_hipIpcOpenEventHandle)(hipEvent_t* event, hipIpcEventHandle_t handle); +typedef hipError_t (*t_hipIpcOpenMemHandle)(void** devPtr, hipIpcMemHandle_t handle, + unsigned int flags); +typedef const char* (*t_hipKernelNameRef)(const hipFunction_t f); +typedef const char* (*t_hipKernelNameRefByPtr)(const void* hostFunction, hipStream_t stream); +typedef hipError_t (*t_hipLaunchByPtr)(const void* func); +typedef hipError_t (*t_hipLaunchCooperativeKernel)(const void* f, dim3 gridDim, dim3 blockDimX, + void** kernelParams, unsigned int sharedMemBytes, + hipStream_t stream); +typedef hipError_t (*t_hipLaunchCooperativeKernelMultiDevice)(hipLaunchParams* launchParamsList, + int numDevices, unsigned int flags); +typedef hipError_t (*t_hipLaunchHostFunc)(hipStream_t stream, hipHostFn_t fn, void* userData); +typedef hipError_t (*t_hipLaunchKernel)(const void* function_address, dim3 numBlocks, + dim3 dimBlocks, void** args, size_t sharedMemBytes, + hipStream_t stream); +typedef hipError_t (*t_hipMalloc)(void** ptr, size_t size); +typedef hipError_t (*t_hipMalloc3D)(hipPitchedPtr* pitchedDevPtr, hipExtent extent); +typedef hipError_t (*t_hipMalloc3DArray)(hipArray_t* array, const struct hipChannelFormatDesc* desc, + struct hipExtent extent, unsigned int flags); +typedef hipError_t (*t_hipMallocArray)(hipArray_t* array, const hipChannelFormatDesc* desc, + size_t width, size_t height, unsigned int flags); +typedef hipError_t (*t_hipMallocAsync)(void** dev_ptr, size_t size, hipStream_t stream); +typedef hipError_t (*t_hipMallocFromPoolAsync)(void** dev_ptr, size_t size, hipMemPool_t mem_pool, + hipStream_t stream); +typedef hipError_t (*t_hipMallocHost)(void** ptr, size_t size); +typedef hipError_t (*t_hipMallocManaged)(void** dev_ptr, size_t size, unsigned int flags); +typedef hipError_t (*t_hipMallocMipmappedArray)(hipMipmappedArray_t* mipmappedArray, + const struct hipChannelFormatDesc* desc, + struct hipExtent extent, unsigned int numLevels, + unsigned int flags); +typedef hipError_t (*t_hipMallocPitch)(void** ptr, size_t* pitch, size_t width, size_t height); +typedef hipError_t (*t_hipMemAddressFree)(void* devPtr, size_t size); +typedef hipError_t (*t_hipMemAddressReserve)(void** ptr, size_t size, size_t alignment, void* addr, + unsigned long long flags); +typedef hipError_t (*t_hipMemAdvise)(const void* dev_ptr, size_t count, hipMemoryAdvise advice, + int device); +typedef hipError_t (*t_hipMemAllocHost)(void** ptr, size_t size); +typedef hipError_t (*t_hipMemAllocPitch)(hipDeviceptr_t* dptr, size_t* pitch, size_t widthInBytes, + size_t height, unsigned int elementSizeBytes); +typedef hipError_t (*t_hipMemCreate)(hipMemGenericAllocationHandle_t* handle, size_t size, + const hipMemAllocationProp* prop, unsigned long long flags); +typedef hipError_t (*t_hipMemExportToShareableHandle)(void* shareableHandle, + hipMemGenericAllocationHandle_t handle, + hipMemAllocationHandleType handleType, + unsigned long long flags); +typedef hipError_t (*t_hipMemGetAccess)(unsigned long long* flags, const hipMemLocation* location, + void* ptr); +typedef hipError_t (*t_hipMemGetAddressRange)(hipDeviceptr_t* pbase, size_t* psize, + hipDeviceptr_t dptr); +typedef hipError_t (*t_hipMemGetAllocationGranularity)(size_t* granularity, + const hipMemAllocationProp* prop, + hipMemAllocationGranularity_flags option); +typedef hipError_t (*t_hipMemGetAllocationPropertiesFromHandle)( + hipMemAllocationProp* prop, hipMemGenericAllocationHandle_t handle); +typedef hipError_t (*t_hipMemGetInfo)(size_t* free, size_t* total); +typedef hipError_t (*t_hipMemImportFromShareableHandle)(hipMemGenericAllocationHandle_t* handle, + void* osHandle, + hipMemAllocationHandleType shHandleType); +typedef hipError_t (*t_hipMemMap)(void* ptr, size_t size, size_t offset, + hipMemGenericAllocationHandle_t handle, unsigned long long flags); +typedef hipError_t (*t_hipMemMapArrayAsync)(hipArrayMapInfo* mapInfoList, unsigned int count, + hipStream_t stream); +typedef hipError_t (*t_hipMemPoolCreate)(hipMemPool_t* mem_pool, const hipMemPoolProps* pool_props); +typedef hipError_t (*t_hipMemPoolDestroy)(hipMemPool_t mem_pool); +typedef hipError_t (*t_hipMemPoolExportPointer)(hipMemPoolPtrExportData* export_data, + void* dev_ptr); +typedef hipError_t (*t_hipMemPoolExportToShareableHandle)(void* shared_handle, + hipMemPool_t mem_pool, + hipMemAllocationHandleType handle_type, + unsigned int flags); +typedef hipError_t (*t_hipMemPoolGetAccess)(hipMemAccessFlags* flags, hipMemPool_t mem_pool, + hipMemLocation* location); +typedef hipError_t (*t_hipMemPoolGetAttribute)(hipMemPool_t mem_pool, hipMemPoolAttr attr, + void* value); +typedef hipError_t (*t_hipMemPoolImportFromShareableHandle)(hipMemPool_t* mem_pool, + void* shared_handle, + hipMemAllocationHandleType handle_type, + unsigned int flags); +typedef hipError_t (*t_hipMemPoolImportPointer)(void** dev_ptr, hipMemPool_t mem_pool, + hipMemPoolPtrExportData* export_data); +typedef hipError_t (*t_hipMemPoolSetAccess)(hipMemPool_t mem_pool, + const hipMemAccessDesc* desc_list, size_t count); +typedef hipError_t (*t_hipMemPoolSetAttribute)(hipMemPool_t mem_pool, hipMemPoolAttr attr, + void* value); +typedef hipError_t (*t_hipMemPoolTrimTo)(hipMemPool_t mem_pool, size_t min_bytes_to_hold); +typedef hipError_t (*t_hipMemPrefetchAsync)(const void* dev_ptr, size_t count, int device, + hipStream_t stream); +typedef hipError_t (*t_hipMemPtrGetInfo)(void* ptr, size_t* size); +typedef hipError_t (*t_hipMemRangeGetAttribute)(void* data, size_t data_size, + hipMemRangeAttribute attribute, const void* dev_ptr, + size_t count); +typedef hipError_t (*t_hipMemRangeGetAttributes)(void** data, size_t* data_sizes, + hipMemRangeAttribute* attributes, + size_t num_attributes, const void* dev_ptr, + size_t count); +typedef hipError_t (*t_hipMemRelease)(hipMemGenericAllocationHandle_t handle); +typedef hipError_t (*t_hipMemRetainAllocationHandle)(hipMemGenericAllocationHandle_t* handle, + void* addr); +typedef hipError_t (*t_hipMemSetAccess)(void* ptr, size_t size, const hipMemAccessDesc* desc, + size_t count); +typedef hipError_t (*t_hipMemUnmap)(void* ptr, size_t size); +typedef hipError_t (*t_hipMemcpy)(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind); +typedef hipError_t (*t_hipMemcpy2D)(void* dst, size_t dpitch, const void* src, size_t spitch, + size_t width, size_t height, hipMemcpyKind kind); +typedef hipError_t (*t_hipMemcpy2DAsync)(void* dst, size_t dpitch, const void* src, size_t spitch, + size_t width, size_t height, hipMemcpyKind kind, + hipStream_t stream); +typedef hipError_t (*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); +typedef hipError_t (*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); +typedef hipError_t (*t_hipMemcpy2DToArray)(hipArray_t dst, size_t wOffset, size_t hOffset, + const void* src, size_t spitch, size_t width, + size_t height, hipMemcpyKind kind); +typedef hipError_t (*t_hipMemcpy2DToArrayAsync)(hipArray_t dst, size_t wOffset, size_t hOffset, + const void* src, size_t spitch, size_t width, + size_t height, hipMemcpyKind kind, + hipStream_t stream); +typedef hipError_t (*t_hipMemcpy3D)(const struct hipMemcpy3DParms* p); +typedef hipError_t (*t_hipMemcpy3DAsync)(const struct hipMemcpy3DParms* p, hipStream_t stream); +typedef hipError_t (*t_hipMemcpyAsync)(void* dst, const void* src, size_t sizeBytes, + hipMemcpyKind kind, hipStream_t stream); +typedef hipError_t (*t_hipMemcpyAtoH)(void* dst, hipArray_t srcArray, size_t srcOffset, + size_t count); +typedef hipError_t (*t_hipMemcpyDtoD)(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes); +typedef hipError_t (*t_hipMemcpyDtoDAsync)(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes, + hipStream_t stream); +typedef hipError_t (*t_hipMemcpyDtoH)(void* dst, hipDeviceptr_t src, size_t sizeBytes); +typedef hipError_t (*t_hipMemcpyDtoHAsync)(void* dst, hipDeviceptr_t src, size_t sizeBytes, + hipStream_t stream); +typedef hipError_t (*t_hipMemcpyFromArray)(void* dst, hipArray_const_t srcArray, size_t wOffset, + size_t hOffset, size_t count, hipMemcpyKind kind); +typedef hipError_t (*t_hipMemcpyFromSymbol)(void* dst, const void* symbol, size_t sizeBytes, + size_t offset, hipMemcpyKind kind); +typedef hipError_t (*t_hipMemcpyFromSymbolAsync)(void* dst, const void* symbol, size_t sizeBytes, + size_t offset, hipMemcpyKind kind, + hipStream_t stream); +typedef hipError_t (*t_hipMemcpyHtoA)(hipArray_t dstArray, size_t dstOffset, const void* srcHost, + size_t count); +typedef hipError_t (*t_hipMemcpyHtoD)(hipDeviceptr_t dst, void* src, size_t sizeBytes); +typedef hipError_t (*t_hipMemcpyHtoDAsync)(hipDeviceptr_t dst, void* src, size_t sizeBytes, + hipStream_t stream); +typedef hipError_t (*t_hipMemcpyParam2D)(const hip_Memcpy2D* pCopy); +typedef hipError_t (*t_hipMemcpyParam2DAsync)(const hip_Memcpy2D* pCopy, hipStream_t stream); +typedef hipError_t (*t_hipMemcpyPeer)(void* dst, int dstDeviceId, const void* src, int srcDeviceId, + size_t sizeBytes); +typedef hipError_t (*t_hipMemcpyPeerAsync)(void* dst, int dstDeviceId, const void* src, + int srcDevice, size_t sizeBytes, hipStream_t stream); +typedef hipError_t (*t_hipMemcpyToArray)(hipArray_t dst, size_t wOffset, size_t hOffset, + const void* src, size_t count, hipMemcpyKind kind); +typedef hipError_t (*t_hipMemcpyToSymbol)(const void* symbol, const void* src, size_t sizeBytes, + size_t offset, hipMemcpyKind kind); +typedef hipError_t (*t_hipMemcpyToSymbolAsync)(const void* symbol, const void* src, + size_t sizeBytes, size_t offset, hipMemcpyKind kind, + hipStream_t stream); +typedef hipError_t (*t_hipMemcpyWithStream)(void* dst, const void* src, size_t sizeBytes, + hipMemcpyKind kind, hipStream_t stream); +typedef hipError_t (*t_hipMemset)(void* dst, int value, size_t sizeBytes); +typedef hipError_t (*t_hipMemset2D)(void* dst, size_t pitch, int value, size_t width, + size_t height); +typedef hipError_t (*t_hipMemset2DAsync)(void* dst, size_t pitch, int value, size_t width, + size_t height, hipStream_t stream); +typedef hipError_t (*t_hipMemset3D)(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent); +typedef hipError_t (*t_hipMemset3DAsync)(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent, + hipStream_t stream); +typedef hipError_t (*t_hipMemsetAsync)(void* dst, int value, size_t sizeBytes, hipStream_t stream); +typedef hipError_t (*t_hipMemsetD16)(hipDeviceptr_t dest, unsigned short value, size_t count); +typedef hipError_t (*t_hipMemsetD16Async)(hipDeviceptr_t dest, unsigned short value, size_t count, + hipStream_t stream); +typedef hipError_t (*t_hipMemsetD32)(hipDeviceptr_t dest, int value, size_t count); +typedef hipError_t (*t_hipMemsetD32Async)(hipDeviceptr_t dst, int value, size_t count, + hipStream_t stream); +typedef hipError_t (*t_hipMemsetD8)(hipDeviceptr_t dest, unsigned char value, size_t count); +typedef hipError_t (*t_hipMemsetD8Async)(hipDeviceptr_t dest, unsigned char value, size_t count, + hipStream_t stream); +typedef hipError_t (*t_hipMipmappedArrayCreate)(hipMipmappedArray_t* pHandle, + HIP_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, + unsigned int numMipmapLevels); +typedef hipError_t (*t_hipMipmappedArrayDestroy)(hipMipmappedArray_t hMipmappedArray); +typedef hipError_t (*t_hipMipmappedArrayGetLevel)(hipArray_t* pLevelArray, + hipMipmappedArray_t hMipMappedArray, + unsigned int level); +typedef hipError_t (*t_hipModuleGetFunction)(hipFunction_t* function, hipModule_t module, + const char* kname); +typedef hipError_t (*t_hipModuleGetGlobal)(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t hmod, + const char* name); +typedef hipError_t (*t_hipModuleGetTexRef)(textureReference** texRef, hipModule_t hmod, + const char* name); +typedef hipError_t (*t_hipModuleLaunchCooperativeKernel)( + 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); +typedef hipError_t (*t_hipModuleLaunchCooperativeKernelMultiDevice)( + hipFunctionLaunchParams* launchParamsList, unsigned int numDevices, unsigned int flags); +typedef hipError_t (*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); +typedef hipError_t (*t_hipModuleLoad)(hipModule_t* module, const char* fname); +typedef hipError_t (*t_hipModuleLoadData)(hipModule_t* module, const void* image); +typedef hipError_t (*t_hipModuleLoadDataEx)(hipModule_t* module, const void* image, + unsigned int numOptions, hipJitOption* options, + void** optionValues); +typedef hipError_t (*t_hipModuleOccupancyMaxActiveBlocksPerMultiprocessor)( + int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk); +typedef hipError_t (*t_hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)( + int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags); +typedef hipError_t (*t_hipModuleOccupancyMaxPotentialBlockSize)(int* gridSize, int* blockSize, + hipFunction_t f, + size_t dynSharedMemPerBlk, + int blockSizeLimit); +typedef hipError_t (*t_hipModuleOccupancyMaxPotentialBlockSizeWithFlags)( + int* gridSize, int* blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit, + unsigned int flags); +typedef hipError_t (*t_hipModuleUnload)(hipModule_t module); +typedef hipError_t (*t_hipOccupancyMaxActiveBlocksPerMultiprocessor)(int* numBlocks, const void* f, + int blockSize, + size_t dynSharedMemPerBlk); +typedef hipError_t (*t_hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)( + int* numBlocks, const void* f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags); +typedef hipError_t (*t_hipOccupancyMaxPotentialBlockSize)(int* gridSize, int* blockSize, + const void* f, size_t dynSharedMemPerBlk, + int blockSizeLimit); +typedef hipError_t (*t_hipPeekAtLastError)(void); +typedef hipError_t (*t_hipPointerGetAttribute)(void* data, hipPointer_attribute attribute, + hipDeviceptr_t ptr); +typedef hipError_t (*t_hipPointerGetAttributes)(hipPointerAttribute_t* attributes, const void* ptr); +typedef hipError_t (*t_hipPointerSetAttribute)(const void* value, hipPointer_attribute attribute, + hipDeviceptr_t ptr); +typedef hipError_t (*t_hipProfilerStart)(); +typedef hipError_t (*t_hipProfilerStop)(); +typedef void (*t_hipRegisterTracerCallback)(const void* function); +typedef void (*t_hipRegisterTracerId)(uint64_t id); +typedef hipError_t (*t_hipRuntimeGetVersion)(int* runtimeVersion); +typedef hipError_t (*t_hipSetDevice)(int deviceId); +typedef hipError_t (*t_hipSetDeviceFlags)(unsigned flags); +typedef hipError_t (*t_hipSetupArgument)(const void* arg, size_t size, size_t offset); +typedef hipError_t (*t_hipSignalExternalSemaphoresAsync)( + const hipExternalSemaphore_t* extSemArray, const hipExternalSemaphoreSignalParams* paramsArray, + unsigned int numExtSems, hipStream_t stream); +typedef hipError_t (*t_hipStreamAddCallback)(hipStream_t stream, hipStreamCallback_t callback, + void* userData, unsigned int flags); +typedef hipError_t (*t_hipStreamAttachMemAsync)(hipStream_t stream, void* dev_ptr, size_t length, + unsigned int flags); +typedef hipError_t (*t_hipStreamBeginCapture)(hipStream_t stream, hipStreamCaptureMode mode); +typedef hipError_t (*t_hipStreamCreate)(hipStream_t* stream); +typedef hipError_t (*t_hipStreamCreateWithFlags)(hipStream_t* stream, unsigned int flags); +typedef hipError_t (*t_hipStreamCreateWithPriority)(hipStream_t* stream, unsigned int flags, + int priority); +typedef hipError_t (*t_hipStreamDestroy)(hipStream_t stream); +typedef hipError_t (*t_hipStreamEndCapture)(hipStream_t stream, hipGraph_t* pGraph); +typedef hipError_t (*t_hipStreamGetCaptureInfo)(hipStream_t stream, + hipStreamCaptureStatus* pCaptureStatus, + unsigned long long* pId); +typedef hipError_t (*t_hipStreamGetCaptureInfo_v2)( + hipStream_t stream, hipStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, + hipGraph_t* graph_out, const hipGraphNode_t** dependencies_out, size_t* numDependencies_out); +typedef hipError_t (*t_hipStreamGetDevice)(hipStream_t stream, hipDevice_t* device); +typedef hipError_t (*t_hipStreamGetFlags)(hipStream_t stream, unsigned int* flags); +typedef hipError_t (*t_hipStreamGetPriority)(hipStream_t stream, int* priority); +typedef hipError_t (*t_hipStreamIsCapturing)(hipStream_t stream, + hipStreamCaptureStatus* pCaptureStatus); +typedef hipError_t (*t_hipStreamQuery)(hipStream_t stream); +typedef hipError_t (*t_hipStreamSynchronize)(hipStream_t stream); +typedef hipError_t (*t_hipStreamUpdateCaptureDependencies)(hipStream_t stream, + hipGraphNode_t* dependencies, + size_t numDependencies, + unsigned int flags); +typedef hipError_t (*t_hipStreamWaitEvent)(hipStream_t stream, hipEvent_t event, + unsigned int flags); +typedef hipError_t (*t_hipStreamWaitValue32)(hipStream_t stream, void* ptr, uint32_t value, + unsigned int flags, uint32_t mask); +typedef hipError_t (*t_hipStreamWaitValue64)(hipStream_t stream, void* ptr, uint64_t value, + unsigned int flags, uint64_t mask); +typedef hipError_t (*t_hipStreamWriteValue32)(hipStream_t stream, void* ptr, uint32_t value, + unsigned int flags); +typedef hipError_t (*t_hipStreamWriteValue64)(hipStream_t stream, void* ptr, uint64_t value, + unsigned int flags); +typedef hipError_t (*t_hipTexObjectCreate)(hipTextureObject_t* pTexObject, + const HIP_RESOURCE_DESC* pResDesc, + const HIP_TEXTURE_DESC* pTexDesc, + const HIP_RESOURCE_VIEW_DESC* pResViewDesc); +typedef hipError_t (*t_hipTexObjectDestroy)(hipTextureObject_t texObject); +typedef hipError_t (*t_hipTexObjectGetResourceDesc)(HIP_RESOURCE_DESC* pResDesc, + hipTextureObject_t texObject); +typedef hipError_t (*t_hipTexObjectGetResourceViewDesc)(HIP_RESOURCE_VIEW_DESC* pResViewDesc, + hipTextureObject_t texObject); +typedef hipError_t (*t_hipTexObjectGetTextureDesc)(HIP_TEXTURE_DESC* pTexDesc, + hipTextureObject_t texObject); +typedef hipError_t (*t_hipTexRefGetAddress)(hipDeviceptr_t* dev_ptr, + const textureReference* texRef); +typedef hipError_t (*t_hipTexRefGetAddressMode)(enum hipTextureAddressMode* pam, + const textureReference* texRef, int dim); +typedef hipError_t (*t_hipTexRefGetFilterMode)(enum hipTextureFilterMode* pfm, + const textureReference* texRef); +typedef hipError_t (*t_hipTexRefGetFlags)(unsigned int* pFlags, const textureReference* texRef); +typedef hipError_t (*t_hipTexRefGetFormat)(hipArray_Format* pFormat, int* pNumChannels, + const textureReference* texRef); +typedef hipError_t (*t_hipTexRefGetMaxAnisotropy)(int* pmaxAnsio, const textureReference* texRef); +typedef hipError_t (*t_hipTexRefGetMipMappedArray)(hipMipmappedArray_t* pArray, + const textureReference* texRef); +typedef hipError_t (*t_hipTexRefGetMipmapFilterMode)(enum hipTextureFilterMode* pfm, + const textureReference* texRef); +typedef hipError_t (*t_hipTexRefGetMipmapLevelBias)(float* pbias, const textureReference* texRef); +typedef hipError_t (*t_hipTexRefGetMipmapLevelClamp)(float* pminMipmapLevelClamp, + float* pmaxMipmapLevelClamp, + const textureReference* texRef); +typedef hipError_t (*t_hipTexRefSetAddress)(size_t* ByteOffset, textureReference* texRef, + hipDeviceptr_t dptr, size_t bytes); +typedef hipError_t (*t_hipTexRefSetAddress2D)(textureReference* texRef, + const HIP_ARRAY_DESCRIPTOR* desc, hipDeviceptr_t dptr, + size_t Pitch); +typedef hipError_t (*t_hipTexRefSetAddressMode)(textureReference* texRef, int dim, + enum hipTextureAddressMode am); +typedef hipError_t (*t_hipTexRefSetArray)(textureReference* tex, hipArray_const_t array, + unsigned int flags); +typedef hipError_t (*t_hipTexRefSetBorderColor)(textureReference* texRef, float* pBorderColor); +typedef hipError_t (*t_hipTexRefSetFilterMode)(textureReference* texRef, + enum hipTextureFilterMode fm); +typedef hipError_t (*t_hipTexRefSetFlags)(textureReference* texRef, unsigned int Flags); +typedef hipError_t (*t_hipTexRefSetFormat)(textureReference* texRef, hipArray_Format fmt, + int NumPackedComponents); +typedef hipError_t (*t_hipTexRefSetMaxAnisotropy)(textureReference* texRef, unsigned int maxAniso); +typedef hipError_t (*t_hipTexRefSetMipmapFilterMode)(textureReference* texRef, + enum hipTextureFilterMode fm); +typedef hipError_t (*t_hipTexRefSetMipmapLevelBias)(textureReference* texRef, float bias); +typedef hipError_t (*t_hipTexRefSetMipmapLevelClamp)(textureReference* texRef, + float minMipMapLevelClamp, + float maxMipMapLevelClamp); +typedef hipError_t (*t_hipTexRefSetMipmappedArray)(textureReference* texRef, + struct hipMipmappedArray* mipmappedArray, + unsigned int Flags); +typedef hipError_t (*t_hipThreadExchangeStreamCaptureMode)(hipStreamCaptureMode* mode); +typedef hipError_t (*t_hipUnbindTexture)(const textureReference* tex); +typedef hipError_t (*t_hipUserObjectCreate)(hipUserObject_t* object_out, void* ptr, + hipHostFn_t destroy, unsigned int initialRefcount, + unsigned int flags); +typedef hipError_t (*t_hipUserObjectRelease)(hipUserObject_t object, unsigned int count); +typedef hipError_t (*t_hipUserObjectRetain)(hipUserObject_t object, unsigned int count); +typedef hipError_t (*t_hipWaitExternalSemaphoresAsync)( + const hipExternalSemaphore_t* extSemArray, const hipExternalSemaphoreWaitParams* paramsArray, + unsigned int numExtSems, hipStream_t stream); + +typedef hipError_t (*t_hipMemcpy_spt)(void* dst, const void* src, size_t sizeBytes, + hipMemcpyKind kind); + +typedef hipError_t (*t_hipMemcpyToSymbol_spt)(const void* symbol, const void* src, size_t sizeBytes, + size_t offset, hipMemcpyKind kind); + +typedef hipError_t (*t_hipMemcpyFromSymbol_spt)(void* dst, const void* symbol, size_t sizeBytes, + size_t offset, hipMemcpyKind kind); + +typedef hipError_t (*t_hipMemcpy2D_spt)(void* dst, size_t dpitch, const void* src, size_t spitch, + size_t width, size_t height, hipMemcpyKind kind); + +typedef hipError_t (*t_hipMemcpy2DFromArray_spt)(void* dst, size_t dpitch, hipArray_const_t src, + size_t wOffset, size_t hOffset, size_t width, + size_t height, hipMemcpyKind kind); + +typedef hipError_t (*t_hipMemcpy3D_spt)(const struct hipMemcpy3DParms* p); + +typedef hipError_t (*t_hipMemset_spt)(void* dst, int value, size_t sizeBytes); + +typedef hipError_t (*t_hipMemsetAsync_spt)(void* dst, int value, size_t sizeBytes, + hipStream_t stream); + +typedef hipError_t (*t_hipMemset2D_spt)(void* dst, size_t pitch, int value, size_t width, + size_t height); + +typedef hipError_t (*t_hipMemset2DAsync_spt)(void* dst, size_t pitch, int value, size_t width, + size_t height, hipStream_t stream); + +typedef hipError_t (*t_hipMemset3DAsync_spt)(hipPitchedPtr pitchedDevPtr, int value, + hipExtent extent, hipStream_t stream); + +typedef hipError_t (*t_hipMemset3D_spt)(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent); + +typedef hipError_t (*t_hipMemcpyAsync_spt)(void* dst, const void* src, size_t sizeBytes, + hipMemcpyKind kind, hipStream_t stream); + +typedef hipError_t (*t_hipMemcpy3DAsync_spt)(const hipMemcpy3DParms* p, hipStream_t stream); + +typedef hipError_t (*t_hipMemcpy2DAsync_spt)(void* dst, size_t dpitch, const void* src, + size_t spitch, size_t width, size_t height, + hipMemcpyKind kind, hipStream_t stream); + +typedef hipError_t (*t_hipMemcpyFromSymbolAsync_spt)(void* dst, const void* symbol, + size_t sizeBytes, size_t offset, + hipMemcpyKind kind, hipStream_t stream); + +typedef hipError_t (*t_hipMemcpyToSymbolAsync_spt)(const void* symbol, const void* src, + size_t sizeBytes, size_t offset, + hipMemcpyKind kind, hipStream_t stream); + +typedef hipError_t (*t_hipMemcpyFromArray_spt)(void* dst, hipArray_const_t src, size_t wOffsetSrc, + size_t hOffset, size_t count, hipMemcpyKind kind); + +typedef hipError_t (*t_hipMemcpy2DToArray_spt)(hipArray_t dst, size_t wOffset, size_t hOffset, + const void* src, size_t spitch, size_t width, + size_t height, hipMemcpyKind kind); + +typedef hipError_t (*t_hipMemcpy2DFromArrayAsync_spt)(void* dst, size_t dpitch, + hipArray_const_t src, size_t wOffsetSrc, + size_t hOffsetSrc, size_t width, + size_t height, hipMemcpyKind kind, + hipStream_t stream); + +typedef hipError_t (*t_hipMemcpy2DToArrayAsync_spt)(hipArray_t dst, size_t wOffset, size_t hOffset, + const void* src, size_t spitch, size_t width, + size_t height, hipMemcpyKind kind, + hipStream_t stream); + +typedef hipError_t (*t_hipStreamQuery_spt)(hipStream_t stream); + +typedef hipError_t (*t_hipStreamSynchronize_spt)(hipStream_t stream); + +typedef hipError_t (*t_hipStreamGetPriority_spt)(hipStream_t stream, int* priority); + +typedef hipError_t (*t_hipStreamWaitEvent_spt)(hipStream_t stream, hipEvent_t event, + unsigned int flags); + +typedef hipError_t (*t_hipStreamGetFlags_spt)(hipStream_t stream, unsigned int* flags); + +typedef hipError_t (*t_hipStreamAddCallback_spt)(hipStream_t stream, hipStreamCallback_t callback, + void* userData, unsigned int flags); +typedef hipError_t (*t_hipEventRecord_spt)(hipEvent_t event, hipStream_t stream); +typedef hipError_t (*t_hipLaunchCooperativeKernel_spt)(const void* f, dim3 gridDim, dim3 blockDim, + void** kernelParams, uint32_t sharedMemBytes, + hipStream_t hStream); + +typedef hipError_t (*t_hipLaunchKernel_spt)(const void* function_address, dim3 numBlocks, + dim3 dimBlocks, void** args, size_t sharedMemBytes, + hipStream_t stream); + +typedef hipError_t (*t_hipGraphLaunch_spt)(hipGraphExec_t graphExec, hipStream_t stream); +typedef hipError_t (*t_hipStreamBeginCapture_spt)(hipStream_t stream, hipStreamCaptureMode mode); +typedef hipError_t (*t_hipStreamEndCapture_spt)(hipStream_t stream, hipGraph_t* pGraph); +typedef hipError_t (*t_hipStreamIsCapturing_spt)(hipStream_t stream, + hipStreamCaptureStatus* pCaptureStatus); +typedef hipError_t (*t_hipStreamGetCaptureInfo_spt)(hipStream_t stream, + hipStreamCaptureStatus* pCaptureStatus, + unsigned long long* pId); +typedef hipError_t (*t_hipStreamGetCaptureInfo_v2_spt)( + hipStream_t stream, hipStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, + hipGraph_t* graph_out, const hipGraphNode_t** dependencies_out, size_t* numDependencies_out); +typedef hipError_t (*t_hipLaunchHostFunc_spt)(hipStream_t stream, hipHostFn_t fn, void* userData); +typedef hipChannelFormatDesc (*t_hipCreateChannelDesc)(int x, int y, int z, int w, + hipChannelFormatKind f); +typedef hipError_t (*t_hipExtModuleLaunchKernel)(hipFunction_t f, uint32_t globalWorkSizeX, + uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, + uint32_t localWorkSizeX, uint32_t localWorkSizeY, + uint32_t localWorkSizeZ, size_t sharedMemBytes, + hipStream_t hStream, void** kernelParams, + void** extra, hipEvent_t startEvent, + hipEvent_t stopEvent, uint32_t flags); +typedef hipError_t (*t_hipHccModuleLaunchKernel)(hipFunction_t f, uint32_t globalWorkSizeX, + uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, + uint32_t localWorkSizeX, uint32_t localWorkSizeY, + uint32_t localWorkSizeZ, size_t sharedMemBytes, + hipStream_t hStream, void** kernelParams, + void** extra, hipEvent_t startEvent, + hipEvent_t stopEvent); +typedef int (*t_hipGetStreamDeviceId)(hipStream_t stream); + +// HIP Compiler dispatch table +struct HipCompilerDispatchTable { + size_t size; + t___hipPopCallConfiguration __hipPopCallConfiguration_fn; + t___hipPushCallConfiguration __hipPushCallConfiguration_fn; + t___hipRegisterFatBinary __hipRegisterFatBinary_fn; + t___hipRegisterFunction __hipRegisterFunction_fn; + t___hipRegisterManagedVar __hipRegisterManagedVar_fn; + t___hipRegisterSurface __hipRegisterSurface_fn; + t___hipRegisterTexture __hipRegisterTexture_fn; + t___hipRegisterVar __hipRegisterVar_fn; + t___hipUnregisterFatBinary __hipUnregisterFatBinary_fn; +}; + +// HIP API dispatch table +struct HipDispatchTable { + size_t size; + t_hipApiName hipApiName_fn; + t_hipArray3DCreate hipArray3DCreate_fn; + t_hipArray3DGetDescriptor hipArray3DGetDescriptor_fn; + t_hipArrayCreate hipArrayCreate_fn; + t_hipArrayDestroy hipArrayDestroy_fn; + t_hipArrayGetDescriptor hipArrayGetDescriptor_fn; + t_hipArrayGetInfo hipArrayGetInfo_fn; + t_hipBindTexture hipBindTexture_fn; + t_hipBindTexture2D hipBindTexture2D_fn; + t_hipBindTextureToArray hipBindTextureToArray_fn; + t_hipBindTextureToMipmappedArray hipBindTextureToMipmappedArray_fn; + t_hipChooseDevice hipChooseDevice_fn; + t_hipConfigureCall hipConfigureCall_fn; + t_hipCreateSurfaceObject hipCreateSurfaceObject_fn; + t_hipCreateTextureObject hipCreateTextureObject_fn; + t_hipCtxCreate hipCtxCreate_fn; + t_hipCtxDestroy hipCtxDestroy_fn; + t_hipCtxDisablePeerAccess hipCtxDisablePeerAccess_fn; + t_hipCtxEnablePeerAccess hipCtxEnablePeerAccess_fn; + t_hipCtxGetApiVersion hipCtxGetApiVersion_fn; + t_hipCtxGetCacheConfig hipCtxGetCacheConfig_fn; + t_hipCtxGetCurrent hipCtxGetCurrent_fn; + t_hipCtxGetDevice hipCtxGetDevice_fn; + t_hipCtxGetFlags hipCtxGetFlags_fn; + t_hipCtxGetSharedMemConfig hipCtxGetSharedMemConfig_fn; + t_hipCtxPopCurrent hipCtxPopCurrent_fn; + t_hipCtxPushCurrent hipCtxPushCurrent_fn; + t_hipCtxSetCacheConfig hipCtxSetCacheConfig_fn; + t_hipCtxSetCurrent hipCtxSetCurrent_fn; + t_hipCtxSetSharedMemConfig hipCtxSetSharedMemConfig_fn; + t_hipCtxSynchronize hipCtxSynchronize_fn; + t_hipDestroyExternalMemory hipDestroyExternalMemory_fn; + t_hipDestroyExternalSemaphore hipDestroyExternalSemaphore_fn; + t_hipDestroySurfaceObject hipDestroySurfaceObject_fn; + t_hipDestroyTextureObject hipDestroyTextureObject_fn; + t_hipDeviceCanAccessPeer hipDeviceCanAccessPeer_fn; + t_hipDeviceComputeCapability hipDeviceComputeCapability_fn; + t_hipDeviceDisablePeerAccess hipDeviceDisablePeerAccess_fn; + t_hipDeviceEnablePeerAccess hipDeviceEnablePeerAccess_fn; + t_hipDeviceGet hipDeviceGet_fn; + t_hipDeviceGetAttribute hipDeviceGetAttribute_fn; + t_hipDeviceGetByPCIBusId hipDeviceGetByPCIBusId_fn; + t_hipDeviceGetCacheConfig hipDeviceGetCacheConfig_fn; + t_hipDeviceGetDefaultMemPool hipDeviceGetDefaultMemPool_fn; + t_hipDeviceGetGraphMemAttribute hipDeviceGetGraphMemAttribute_fn; + t_hipDeviceGetLimit hipDeviceGetLimit_fn; + t_hipDeviceGetMemPool hipDeviceGetMemPool_fn; + t_hipDeviceGetName hipDeviceGetName_fn; + t_hipDeviceGetP2PAttribute hipDeviceGetP2PAttribute_fn; + t_hipDeviceGetPCIBusId hipDeviceGetPCIBusId_fn; + t_hipDeviceGetSharedMemConfig hipDeviceGetSharedMemConfig_fn; + t_hipDeviceGetStreamPriorityRange hipDeviceGetStreamPriorityRange_fn; + t_hipDeviceGetUuid hipDeviceGetUuid_fn; + t_hipDeviceGraphMemTrim hipDeviceGraphMemTrim_fn; + t_hipDevicePrimaryCtxGetState hipDevicePrimaryCtxGetState_fn; + t_hipDevicePrimaryCtxRelease hipDevicePrimaryCtxRelease_fn; + t_hipDevicePrimaryCtxReset hipDevicePrimaryCtxReset_fn; + t_hipDevicePrimaryCtxRetain hipDevicePrimaryCtxRetain_fn; + t_hipDevicePrimaryCtxSetFlags hipDevicePrimaryCtxSetFlags_fn; + t_hipDeviceReset hipDeviceReset_fn; + t_hipDeviceSetCacheConfig hipDeviceSetCacheConfig_fn; + t_hipDeviceSetGraphMemAttribute hipDeviceSetGraphMemAttribute_fn; + t_hipDeviceSetLimit hipDeviceSetLimit_fn; + t_hipDeviceSetMemPool hipDeviceSetMemPool_fn; + t_hipDeviceSetSharedMemConfig hipDeviceSetSharedMemConfig_fn; + t_hipDeviceSynchronize hipDeviceSynchronize_fn; + t_hipDeviceTotalMem hipDeviceTotalMem_fn; + t_hipDriverGetVersion hipDriverGetVersion_fn; + t_hipDrvGetErrorName hipDrvGetErrorName_fn; + t_hipDrvGetErrorString hipDrvGetErrorString_fn; + t_hipDrvGraphAddMemcpyNode hipDrvGraphAddMemcpyNode_fn; + t_hipDrvMemcpy2DUnaligned hipDrvMemcpy2DUnaligned_fn; + t_hipDrvMemcpy3D hipDrvMemcpy3D_fn; + t_hipDrvMemcpy3DAsync hipDrvMemcpy3DAsync_fn; + t_hipDrvPointerGetAttributes hipDrvPointerGetAttributes_fn; + t_hipEventCreate hipEventCreate_fn; + t_hipEventCreateWithFlags hipEventCreateWithFlags_fn; + t_hipEventDestroy hipEventDestroy_fn; + t_hipEventElapsedTime hipEventElapsedTime_fn; + t_hipEventQuery hipEventQuery_fn; + t_hipEventRecord hipEventRecord_fn; + t_hipEventSynchronize hipEventSynchronize_fn; + t_hipExtGetLinkTypeAndHopCount hipExtGetLinkTypeAndHopCount_fn; + t_hipExtLaunchKernel hipExtLaunchKernel_fn; + t_hipExtLaunchMultiKernelMultiDevice hipExtLaunchMultiKernelMultiDevice_fn; + t_hipExtMallocWithFlags hipExtMallocWithFlags_fn; + t_hipExtStreamCreateWithCUMask hipExtStreamCreateWithCUMask_fn; + t_hipExtStreamGetCUMask hipExtStreamGetCUMask_fn; + t_hipExternalMemoryGetMappedBuffer hipExternalMemoryGetMappedBuffer_fn; + t_hipFree hipFree_fn; + t_hipFreeArray hipFreeArray_fn; + t_hipFreeAsync hipFreeAsync_fn; + t_hipFreeHost hipFreeHost_fn; + t_hipFreeMipmappedArray hipFreeMipmappedArray_fn; + t_hipFuncGetAttribute hipFuncGetAttribute_fn; + t_hipFuncGetAttributes hipFuncGetAttributes_fn; + t_hipFuncSetAttribute hipFuncSetAttribute_fn; + t_hipFuncSetCacheConfig hipFuncSetCacheConfig_fn; + t_hipFuncSetSharedMemConfig hipFuncSetSharedMemConfig_fn; + t_hipGLGetDevices hipGLGetDevices_fn; + t_hipGetChannelDesc hipGetChannelDesc_fn; + t_hipGetDevice hipGetDevice_fn; + t_hipGetDeviceCount hipGetDeviceCount_fn; + t_hipGetDeviceFlags hipGetDeviceFlags_fn; + t_hipGetDeviceProperties hipGetDeviceProperties_fn; + t_hipGetErrorName hipGetErrorName_fn; + t_hipGetErrorString hipGetErrorString_fn; + t_hipGetLastError hipGetLastError_fn; + t_hipGetMipmappedArrayLevel hipGetMipmappedArrayLevel_fn; + t_hipGetSymbolAddress hipGetSymbolAddress_fn; + t_hipGetSymbolSize hipGetSymbolSize_fn; + t_hipGetTextureAlignmentOffset hipGetTextureAlignmentOffset_fn; + t_hipGetTextureObjectResourceDesc hipGetTextureObjectResourceDesc_fn; + t_hipGetTextureObjectResourceViewDesc hipGetTextureObjectResourceViewDesc_fn; + t_hipGetTextureObjectTextureDesc hipGetTextureObjectTextureDesc_fn; + t_hipGetTextureReference hipGetTextureReference_fn; + t_hipGraphAddChildGraphNode hipGraphAddChildGraphNode_fn; + t_hipGraphAddDependencies hipGraphAddDependencies_fn; + t_hipGraphAddEmptyNode hipGraphAddEmptyNode_fn; + t_hipGraphAddEventRecordNode hipGraphAddEventRecordNode_fn; + t_hipGraphAddEventWaitNode hipGraphAddEventWaitNode_fn; + t_hipGraphAddHostNode hipGraphAddHostNode_fn; + t_hipGraphAddKernelNode hipGraphAddKernelNode_fn; + t_hipGraphAddMemAllocNode hipGraphAddMemAllocNode_fn; + t_hipGraphAddMemFreeNode hipGraphAddMemFreeNode_fn; + t_hipGraphAddMemcpyNode hipGraphAddMemcpyNode_fn; + t_hipGraphAddMemcpyNode1D hipGraphAddMemcpyNode1D_fn; + t_hipGraphAddMemcpyNodeFromSymbol hipGraphAddMemcpyNodeFromSymbol_fn; + t_hipGraphAddMemcpyNodeToSymbol hipGraphAddMemcpyNodeToSymbol_fn; + t_hipGraphAddMemsetNode hipGraphAddMemsetNode_fn; + t_hipGraphChildGraphNodeGetGraph hipGraphChildGraphNodeGetGraph_fn; + t_hipGraphClone hipGraphClone_fn; + t_hipGraphCreate hipGraphCreate_fn; + t_hipGraphDebugDotPrint hipGraphDebugDotPrint_fn; + t_hipGraphDestroy hipGraphDestroy_fn; + t_hipGraphDestroyNode hipGraphDestroyNode_fn; + t_hipGraphEventRecordNodeGetEvent hipGraphEventRecordNodeGetEvent_fn; + t_hipGraphEventRecordNodeSetEvent hipGraphEventRecordNodeSetEvent_fn; + t_hipGraphEventWaitNodeGetEvent hipGraphEventWaitNodeGetEvent_fn; + t_hipGraphEventWaitNodeSetEvent hipGraphEventWaitNodeSetEvent_fn; + t_hipGraphExecChildGraphNodeSetParams hipGraphExecChildGraphNodeSetParams_fn; + t_hipGraphExecDestroy hipGraphExecDestroy_fn; + t_hipGraphExecEventRecordNodeSetEvent hipGraphExecEventRecordNodeSetEvent_fn; + t_hipGraphExecEventWaitNodeSetEvent hipGraphExecEventWaitNodeSetEvent_fn; + t_hipGraphExecHostNodeSetParams hipGraphExecHostNodeSetParams_fn; + t_hipGraphExecKernelNodeSetParams hipGraphExecKernelNodeSetParams_fn; + t_hipGraphExecMemcpyNodeSetParams hipGraphExecMemcpyNodeSetParams_fn; + t_hipGraphExecMemcpyNodeSetParams1D hipGraphExecMemcpyNodeSetParams1D_fn; + t_hipGraphExecMemcpyNodeSetParamsFromSymbol hipGraphExecMemcpyNodeSetParamsFromSymbol_fn; + t_hipGraphExecMemcpyNodeSetParamsToSymbol hipGraphExecMemcpyNodeSetParamsToSymbol_fn; + t_hipGraphExecMemsetNodeSetParams hipGraphExecMemsetNodeSetParams_fn; + t_hipGraphExecUpdate hipGraphExecUpdate_fn; + t_hipGraphGetEdges hipGraphGetEdges_fn; + t_hipGraphGetNodes hipGraphGetNodes_fn; + t_hipGraphGetRootNodes hipGraphGetRootNodes_fn; + t_hipGraphHostNodeGetParams hipGraphHostNodeGetParams_fn; + t_hipGraphHostNodeSetParams hipGraphHostNodeSetParams_fn; + t_hipGraphInstantiate hipGraphInstantiate_fn; + t_hipGraphInstantiateWithFlags hipGraphInstantiateWithFlags_fn; + t_hipGraphKernelNodeCopyAttributes hipGraphKernelNodeCopyAttributes_fn; + t_hipGraphKernelNodeGetAttribute hipGraphKernelNodeGetAttribute_fn; + t_hipGraphKernelNodeGetParams hipGraphKernelNodeGetParams_fn; + t_hipGraphKernelNodeSetAttribute hipGraphKernelNodeSetAttribute_fn; + t_hipGraphKernelNodeSetParams hipGraphKernelNodeSetParams_fn; + t_hipGraphLaunch hipGraphLaunch_fn; + t_hipGraphMemAllocNodeGetParams hipGraphMemAllocNodeGetParams_fn; + t_hipGraphMemFreeNodeGetParams hipGraphMemFreeNodeGetParams_fn; + t_hipGraphMemcpyNodeGetParams hipGraphMemcpyNodeGetParams_fn; + t_hipGraphMemcpyNodeSetParams hipGraphMemcpyNodeSetParams_fn; + t_hipGraphMemcpyNodeSetParams1D hipGraphMemcpyNodeSetParams1D_fn; + t_hipGraphMemcpyNodeSetParamsFromSymbol hipGraphMemcpyNodeSetParamsFromSymbol_fn; + t_hipGraphMemcpyNodeSetParamsToSymbol hipGraphMemcpyNodeSetParamsToSymbol_fn; + t_hipGraphMemsetNodeGetParams hipGraphMemsetNodeGetParams_fn; + t_hipGraphMemsetNodeSetParams hipGraphMemsetNodeSetParams_fn; + t_hipGraphNodeFindInClone hipGraphNodeFindInClone_fn; + t_hipGraphNodeGetDependencies hipGraphNodeGetDependencies_fn; + t_hipGraphNodeGetDependentNodes hipGraphNodeGetDependentNodes_fn; + t_hipGraphNodeGetEnabled hipGraphNodeGetEnabled_fn; + t_hipGraphNodeGetType hipGraphNodeGetType_fn; + t_hipGraphNodeSetEnabled hipGraphNodeSetEnabled_fn; + t_hipGraphReleaseUserObject hipGraphReleaseUserObject_fn; + t_hipGraphRemoveDependencies hipGraphRemoveDependencies_fn; + t_hipGraphRetainUserObject hipGraphRetainUserObject_fn; + t_hipGraphUpload hipGraphUpload_fn; + t_hipGraphicsGLRegisterBuffer hipGraphicsGLRegisterBuffer_fn; + t_hipGraphicsGLRegisterImage hipGraphicsGLRegisterImage_fn; + t_hipGraphicsMapResources hipGraphicsMapResources_fn; + t_hipGraphicsResourceGetMappedPointer hipGraphicsResourceGetMappedPointer_fn; + t_hipGraphicsSubResourceGetMappedArray hipGraphicsSubResourceGetMappedArray_fn; + t_hipGraphicsUnmapResources hipGraphicsUnmapResources_fn; + t_hipGraphicsUnregisterResource hipGraphicsUnregisterResource_fn; + t_hipHostAlloc hipHostAlloc_fn; + t_hipHostFree hipHostFree_fn; + t_hipHostGetDevicePointer hipHostGetDevicePointer_fn; + t_hipHostGetFlags hipHostGetFlags_fn; + t_hipHostMalloc hipHostMalloc_fn; + t_hipHostRegister hipHostRegister_fn; + t_hipHostUnregister hipHostUnregister_fn; + t_hipImportExternalMemory hipImportExternalMemory_fn; + t_hipImportExternalSemaphore hipImportExternalSemaphore_fn; + t_hipInit hipInit_fn; + t_hipIpcCloseMemHandle hipIpcCloseMemHandle_fn; + t_hipIpcGetEventHandle hipIpcGetEventHandle_fn; + t_hipIpcGetMemHandle hipIpcGetMemHandle_fn; + t_hipIpcOpenEventHandle hipIpcOpenEventHandle_fn; + t_hipIpcOpenMemHandle hipIpcOpenMemHandle_fn; + t_hipKernelNameRef hipKernelNameRef_fn; + t_hipKernelNameRefByPtr hipKernelNameRefByPtr_fn; + t_hipLaunchByPtr hipLaunchByPtr_fn; + t_hipLaunchCooperativeKernel hipLaunchCooperativeKernel_fn; + t_hipLaunchCooperativeKernelMultiDevice hipLaunchCooperativeKernelMultiDevice_fn; + t_hipLaunchHostFunc hipLaunchHostFunc_fn; + t_hipLaunchKernel hipLaunchKernel_fn; + t_hipMalloc hipMalloc_fn; + t_hipMalloc3D hipMalloc3D_fn; + t_hipMalloc3DArray hipMalloc3DArray_fn; + t_hipMallocArray hipMallocArray_fn; + t_hipMallocAsync hipMallocAsync_fn; + t_hipMallocFromPoolAsync hipMallocFromPoolAsync_fn; + t_hipMallocHost hipMallocHost_fn; + t_hipMallocManaged hipMallocManaged_fn; + t_hipMallocMipmappedArray hipMallocMipmappedArray_fn; + t_hipMallocPitch hipMallocPitch_fn; + t_hipMemAddressFree hipMemAddressFree_fn; + t_hipMemAddressReserve hipMemAddressReserve_fn; + t_hipMemAdvise hipMemAdvise_fn; + t_hipMemAllocHost hipMemAllocHost_fn; + t_hipMemAllocPitch hipMemAllocPitch_fn; + t_hipMemCreate hipMemCreate_fn; + t_hipMemExportToShareableHandle hipMemExportToShareableHandle_fn; + t_hipMemGetAccess hipMemGetAccess_fn; + t_hipMemGetAddressRange hipMemGetAddressRange_fn; + t_hipMemGetAllocationGranularity hipMemGetAllocationGranularity_fn; + t_hipMemGetAllocationPropertiesFromHandle hipMemGetAllocationPropertiesFromHandle_fn; + t_hipMemGetInfo hipMemGetInfo_fn; + t_hipMemImportFromShareableHandle hipMemImportFromShareableHandle_fn; + t_hipMemMap hipMemMap_fn; + t_hipMemMapArrayAsync hipMemMapArrayAsync_fn; + t_hipMemPoolCreate hipMemPoolCreate_fn; + t_hipMemPoolDestroy hipMemPoolDestroy_fn; + t_hipMemPoolExportPointer hipMemPoolExportPointer_fn; + t_hipMemPoolExportToShareableHandle hipMemPoolExportToShareableHandle_fn; + t_hipMemPoolGetAccess hipMemPoolGetAccess_fn; + t_hipMemPoolGetAttribute hipMemPoolGetAttribute_fn; + t_hipMemPoolImportFromShareableHandle hipMemPoolImportFromShareableHandle_fn; + t_hipMemPoolImportPointer hipMemPoolImportPointer_fn; + t_hipMemPoolSetAccess hipMemPoolSetAccess_fn; + t_hipMemPoolSetAttribute hipMemPoolSetAttribute_fn; + t_hipMemPoolTrimTo hipMemPoolTrimTo_fn; + t_hipMemPrefetchAsync hipMemPrefetchAsync_fn; + t_hipMemPtrGetInfo hipMemPtrGetInfo_fn; + t_hipMemRangeGetAttribute hipMemRangeGetAttribute_fn; + t_hipMemRangeGetAttributes hipMemRangeGetAttributes_fn; + t_hipMemRelease hipMemRelease_fn; + t_hipMemRetainAllocationHandle hipMemRetainAllocationHandle_fn; + t_hipMemSetAccess hipMemSetAccess_fn; + t_hipMemUnmap hipMemUnmap_fn; + t_hipMemcpy hipMemcpy_fn; + t_hipMemcpy2D hipMemcpy2D_fn; + t_hipMemcpy2DAsync hipMemcpy2DAsync_fn; + t_hipMemcpy2DFromArray hipMemcpy2DFromArray_fn; + t_hipMemcpy2DFromArrayAsync hipMemcpy2DFromArrayAsync_fn; + t_hipMemcpy2DToArray hipMemcpy2DToArray_fn; + t_hipMemcpy2DToArrayAsync hipMemcpy2DToArrayAsync_fn; + t_hipMemcpy3D hipMemcpy3D_fn; + t_hipMemcpy3DAsync hipMemcpy3DAsync_fn; + t_hipMemcpyAsync hipMemcpyAsync_fn; + t_hipMemcpyAtoH hipMemcpyAtoH_fn; + t_hipMemcpyDtoD hipMemcpyDtoD_fn; + t_hipMemcpyDtoDAsync hipMemcpyDtoDAsync_fn; + t_hipMemcpyDtoH hipMemcpyDtoH_fn; + t_hipMemcpyDtoHAsync hipMemcpyDtoHAsync_fn; + t_hipMemcpyFromArray hipMemcpyFromArray_fn; + t_hipMemcpyFromSymbol hipMemcpyFromSymbol_fn; + t_hipMemcpyFromSymbolAsync hipMemcpyFromSymbolAsync_fn; + t_hipMemcpyHtoA hipMemcpyHtoA_fn; + t_hipMemcpyHtoD hipMemcpyHtoD_fn; + t_hipMemcpyHtoDAsync hipMemcpyHtoDAsync_fn; + t_hipMemcpyParam2D hipMemcpyParam2D_fn; + t_hipMemcpyParam2DAsync hipMemcpyParam2DAsync_fn; + t_hipMemcpyPeer hipMemcpyPeer_fn; + t_hipMemcpyPeerAsync hipMemcpyPeerAsync_fn; + t_hipMemcpyToArray hipMemcpyToArray_fn; + t_hipMemcpyToSymbol hipMemcpyToSymbol_fn; + t_hipMemcpyToSymbolAsync hipMemcpyToSymbolAsync_fn; + t_hipMemcpyWithStream hipMemcpyWithStream_fn; + t_hipMemset hipMemset_fn; + t_hipMemset2D hipMemset2D_fn; + t_hipMemset2DAsync hipMemset2DAsync_fn; + t_hipMemset3D hipMemset3D_fn; + t_hipMemset3DAsync hipMemset3DAsync_fn; + t_hipMemsetAsync hipMemsetAsync_fn; + t_hipMemsetD16 hipMemsetD16_fn; + t_hipMemsetD16Async hipMemsetD16Async_fn; + t_hipMemsetD32 hipMemsetD32_fn; + t_hipMemsetD32Async hipMemsetD32Async_fn; + t_hipMemsetD8 hipMemsetD8_fn; + t_hipMemsetD8Async hipMemsetD8Async_fn; + t_hipMipmappedArrayCreate hipMipmappedArrayCreate_fn; + t_hipMipmappedArrayDestroy hipMipmappedArrayDestroy_fn; + t_hipMipmappedArrayGetLevel hipMipmappedArrayGetLevel_fn; + t_hipModuleGetFunction hipModuleGetFunction_fn; + t_hipModuleGetGlobal hipModuleGetGlobal_fn; + t_hipModuleGetTexRef hipModuleGetTexRef_fn; + t_hipModuleLaunchCooperativeKernel hipModuleLaunchCooperativeKernel_fn; + t_hipModuleLaunchCooperativeKernelMultiDevice hipModuleLaunchCooperativeKernelMultiDevice_fn; + t_hipModuleLaunchKernel hipModuleLaunchKernel_fn; + t_hipModuleLoad hipModuleLoad_fn; + t_hipModuleLoadData hipModuleLoadData_fn; + t_hipModuleLoadDataEx hipModuleLoadDataEx_fn; + t_hipModuleOccupancyMaxActiveBlocksPerMultiprocessor + hipModuleOccupancyMaxActiveBlocksPerMultiprocessor_fn; + t_hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_fn; + t_hipModuleOccupancyMaxPotentialBlockSize hipModuleOccupancyMaxPotentialBlockSize_fn; + t_hipModuleOccupancyMaxPotentialBlockSizeWithFlags + hipModuleOccupancyMaxPotentialBlockSizeWithFlags_fn; + t_hipModuleUnload hipModuleUnload_fn; + t_hipOccupancyMaxActiveBlocksPerMultiprocessor hipOccupancyMaxActiveBlocksPerMultiprocessor_fn; + t_hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_fn; + t_hipOccupancyMaxPotentialBlockSize hipOccupancyMaxPotentialBlockSize_fn; + t_hipPeekAtLastError hipPeekAtLastError_fn; + t_hipPointerGetAttribute hipPointerGetAttribute_fn; + t_hipPointerGetAttributes hipPointerGetAttributes_fn; + t_hipPointerSetAttribute hipPointerSetAttribute_fn; + t_hipProfilerStart hipProfilerStart_fn; + t_hipProfilerStop hipProfilerStop_fn; + t_hipRegisterTracerCallback hipRegisterTracerCallback_fn; + t_hipRuntimeGetVersion hipRuntimeGetVersion_fn; + t_hipSetDevice hipSetDevice_fn; + t_hipSetDeviceFlags hipSetDeviceFlags_fn; + t_hipSetupArgument hipSetupArgument_fn; + t_hipSignalExternalSemaphoresAsync hipSignalExternalSemaphoresAsync_fn; + t_hipStreamAddCallback hipStreamAddCallback_fn; + t_hipStreamAttachMemAsync hipStreamAttachMemAsync_fn; + t_hipStreamBeginCapture hipStreamBeginCapture_fn; + t_hipStreamCreate hipStreamCreate_fn; + t_hipStreamCreateWithFlags hipStreamCreateWithFlags_fn; + t_hipStreamCreateWithPriority hipStreamCreateWithPriority_fn; + t_hipStreamDestroy hipStreamDestroy_fn; + t_hipStreamEndCapture hipStreamEndCapture_fn; + t_hipStreamGetCaptureInfo hipStreamGetCaptureInfo_fn; + t_hipStreamGetCaptureInfo_v2 hipStreamGetCaptureInfo_v2_fn; + t_hipStreamGetDevice hipStreamGetDevice_fn; + t_hipStreamGetFlags hipStreamGetFlags_fn; + t_hipStreamGetPriority hipStreamGetPriority_fn; + t_hipStreamIsCapturing hipStreamIsCapturing_fn; + t_hipStreamQuery hipStreamQuery_fn; + t_hipStreamSynchronize hipStreamSynchronize_fn; + t_hipStreamUpdateCaptureDependencies hipStreamUpdateCaptureDependencies_fn; + t_hipStreamWaitEvent hipStreamWaitEvent_fn; + t_hipStreamWaitValue32 hipStreamWaitValue32_fn; + t_hipStreamWaitValue64 hipStreamWaitValue64_fn; + t_hipStreamWriteValue32 hipStreamWriteValue32_fn; + t_hipStreamWriteValue64 hipStreamWriteValue64_fn; + t_hipTexObjectCreate hipTexObjectCreate_fn; + t_hipTexObjectDestroy hipTexObjectDestroy_fn; + t_hipTexObjectGetResourceDesc hipTexObjectGetResourceDesc_fn; + t_hipTexObjectGetResourceViewDesc hipTexObjectGetResourceViewDesc_fn; + t_hipTexObjectGetTextureDesc hipTexObjectGetTextureDesc_fn; + t_hipTexRefGetAddress hipTexRefGetAddress_fn; + t_hipTexRefGetAddressMode hipTexRefGetAddressMode_fn; + t_hipTexRefGetFilterMode hipTexRefGetFilterMode_fn; + t_hipTexRefGetFlags hipTexRefGetFlags_fn; + t_hipTexRefGetFormat hipTexRefGetFormat_fn; + t_hipTexRefGetMaxAnisotropy hipTexRefGetMaxAnisotropy_fn; + t_hipTexRefGetMipMappedArray hipTexRefGetMipMappedArray_fn; + t_hipTexRefGetMipmapFilterMode hipTexRefGetMipmapFilterMode_fn; + t_hipTexRefGetMipmapLevelBias hipTexRefGetMipmapLevelBias_fn; + t_hipTexRefGetMipmapLevelClamp hipTexRefGetMipmapLevelClamp_fn; + t_hipTexRefSetAddress hipTexRefSetAddress_fn; + t_hipTexRefSetAddress2D hipTexRefSetAddress2D_fn; + t_hipTexRefSetAddressMode hipTexRefSetAddressMode_fn; + t_hipTexRefSetArray hipTexRefSetArray_fn; + t_hipTexRefSetBorderColor hipTexRefSetBorderColor_fn; + t_hipTexRefSetFilterMode hipTexRefSetFilterMode_fn; + t_hipTexRefSetFlags hipTexRefSetFlags_fn; + t_hipTexRefSetFormat hipTexRefSetFormat_fn; + t_hipTexRefSetMaxAnisotropy hipTexRefSetMaxAnisotropy_fn; + t_hipTexRefSetMipmapFilterMode hipTexRefSetMipmapFilterMode_fn; + t_hipTexRefSetMipmapLevelBias hipTexRefSetMipmapLevelBias_fn; + t_hipTexRefSetMipmapLevelClamp hipTexRefSetMipmapLevelClamp_fn; + t_hipTexRefSetMipmappedArray hipTexRefSetMipmappedArray_fn; + t_hipThreadExchangeStreamCaptureMode hipThreadExchangeStreamCaptureMode_fn; + t_hipUnbindTexture hipUnbindTexture_fn; + t_hipUserObjectCreate hipUserObjectCreate_fn; + t_hipUserObjectRelease hipUserObjectRelease_fn; + t_hipUserObjectRetain hipUserObjectRetain_fn; + t_hipWaitExternalSemaphoresAsync hipWaitExternalSemaphoresAsync_fn; + t_hipCreateChannelDesc hipCreateChannelDesc_fn; + t_hipExtModuleLaunchKernel hipExtModuleLaunchKernel_fn; + t_hipHccModuleLaunchKernel hipHccModuleLaunchKernel_fn; + t_hipMemcpy_spt hipMemcpy_spt_fn; + t_hipMemcpyToSymbol_spt hipMemcpyToSymbol_spt_fn; + t_hipMemcpyFromSymbol_spt hipMemcpyFromSymbol_spt_fn; + t_hipMemcpy2D_spt hipMemcpy2D_spt_fn; + t_hipMemcpy2DFromArray_spt hipMemcpy2DFromArray_spt_fn; + t_hipMemcpy3D_spt hipMemcpy3D_spt_fn; + t_hipMemset_spt hipMemset_spt_fn; + t_hipMemsetAsync_spt hipMemsetAsync_spt_fn; + t_hipMemset2D_spt hipMemset2D_spt_fn; + t_hipMemset2DAsync_spt hipMemset2DAsync_spt_fn; + t_hipMemset3DAsync_spt hipMemset3DAsync_spt_fn; + t_hipMemset3D_spt hipMemset3D_spt_fn; + t_hipMemcpyAsync_spt hipMemcpyAsync_spt_fn; + t_hipMemcpy3DAsync_spt hipMemcpy3DAsync_spt_fn; + t_hipMemcpy2DAsync_spt hipMemcpy2DAsync_spt_fn; + t_hipMemcpyFromSymbolAsync_spt hipMemcpyFromSymbolAsync_spt_fn; + t_hipMemcpyToSymbolAsync_spt hipMemcpyToSymbolAsync_spt_fn; + t_hipMemcpyFromArray_spt hipMemcpyFromArray_spt_fn; + t_hipMemcpy2DToArray_spt hipMemcpy2DToArray_spt_fn; + t_hipMemcpy2DFromArrayAsync_spt hipMemcpy2DFromArrayAsync_spt_fn; + t_hipMemcpy2DToArrayAsync_spt hipMemcpy2DToArrayAsync_spt_fn; + t_hipStreamQuery_spt hipStreamQuery_spt_fn; + t_hipStreamSynchronize_spt hipStreamSynchronize_spt_fn; + t_hipStreamGetPriority_spt hipStreamGetPriority_spt_fn; + t_hipStreamWaitEvent_spt hipStreamWaitEvent_spt_fn; + t_hipStreamGetFlags_spt hipStreamGetFlags_spt_fn; + t_hipStreamAddCallback_spt hipStreamAddCallback_spt_fn; + t_hipEventRecord_spt hipEventRecord_spt_fn; + t_hipLaunchCooperativeKernel_spt hipLaunchCooperativeKernel_spt_fn; + t_hipLaunchKernel_spt hipLaunchKernel_spt_fn; + t_hipGraphLaunch_spt hipGraphLaunch_spt_fn; + t_hipStreamBeginCapture_spt hipStreamBeginCapture_spt_fn; + t_hipStreamEndCapture_spt hipStreamEndCapture_spt_fn; + t_hipStreamIsCapturing_spt hipStreamIsCapturing_spt_fn; + t_hipStreamGetCaptureInfo_spt hipStreamGetCaptureInfo_spt_fn; + t_hipStreamGetCaptureInfo_v2_spt hipStreamGetCaptureInfo_v2_spt_fn; + t_hipLaunchHostFunc_spt hipLaunchHostFunc_spt_fn; + t_hipGetStreamDeviceId hipGetStreamDeviceId_fn; +}; diff --git a/hipamd/src/CMakeLists.txt b/hipamd/src/CMakeLists.txt index 6f727ba035..2275fa342d 100644 --- a/hipamd/src/CMakeLists.txt +++ b/hipamd/src/CMakeLists.txt @@ -122,7 +122,9 @@ target_sources(amdhip64 PRIVATE hip_surface.cpp hip_texture.cpp hip_gl.cpp - hip_vm.cpp) + hip_vm.cpp + hip_api_trace.cpp + hip_table_interface.cpp) if(WIN32) target_sources(amdhip64 PRIVATE diff --git a/hipamd/src/amdhip.def b/hipamd/src/amdhip.def index a3bbd32766..c0e5a41b35 100644 --- a/hipamd/src/amdhip.def +++ b/hipamd/src/amdhip.def @@ -240,7 +240,7 @@ hipTexRefGetMaxAnisotropy hipTexRefGetMipmapFilterMode hipTexRefGetMipmapLevelBias hipTexRefGetMipmapLevelClamp -hipTexRefGetMipmappedArray +hipTexRefGetMipMappedArray hipTexRefSetAddress hipTexRefSetAddress2D hipTexRefSetAddressMode diff --git a/hipamd/src/hip_api_trace.cpp b/hipamd/src/hip_api_trace.cpp new file mode 100644 index 0000000000..b77dad3f56 --- /dev/null +++ b/hipamd/src/hip_api_trace.cpp @@ -0,0 +1,1260 @@ +/* + Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +// #include "hip_api_trace.hpp" +#include + +#include "hip_internal.hpp" +namespace hip { +// HIP Internal APIs +hipError_t __hipPopCallConfiguration(dim3* gridDim, dim3* blockDim, size_t* sharedMem, + hipStream_t* stream); +hipError_t __hipPushCallConfiguration(dim3 gridDim, dim3 blockDim, size_t sharedMem, + hipStream_t stream); +void** __hipRegisterFatBinary(const void* data); +void __hipRegisterFunction(void** modules, const void* hostFunction, char* deviceFunction, + const char* deviceName, unsigned int threadLimit, uint3* tid, uint3* bid, + dim3* blockDim, dim3* gridDim, int* wSize); +void __hipRegisterManagedVar(void* hipModule, void** pointer, void* init_value, const char* name, + size_t size, unsigned align); +void __hipRegisterSurface(void** modules, void* var, char* hostVar, char* deviceVar, int type, + int ext); +void __hipRegisterTexture(void** modules, void* var, char* hostVar, char* deviceVar, int type, + int norm, int ext); +void __hipRegisterVar(void** modules, void* var, char* hostVar, char* deviceVar, int ext, + size_t size, int constant, int global); +void __hipUnregisterFatBinary(void** modules); +const char* hipApiName(uint32_t id); +hipError_t hipArray3DCreate(hipArray_t* array, const HIP_ARRAY3D_DESCRIPTOR* pAllocateArray); +hipError_t hipArray3DGetDescriptor(HIP_ARRAY3D_DESCRIPTOR* pArrayDescriptor, hipArray_t array); +hipError_t hipArrayCreate(hipArray_t* pHandle, const HIP_ARRAY_DESCRIPTOR* pAllocateArray); +hipError_t hipArrayDestroy(hipArray_t array); +hipError_t hipArrayGetDescriptor(HIP_ARRAY_DESCRIPTOR* pArrayDescriptor, hipArray_t array); +hipError_t hipArrayGetInfo(hipChannelFormatDesc* desc, hipExtent* extent, unsigned int* flags, + hipArray_t array); +hipError_t hipBindTexture(size_t* offset, const textureReference* tex, const void* devPtr, + const hipChannelFormatDesc* desc, size_t size); +hipError_t hipBindTexture2D(size_t* offset, const textureReference* tex, const void* devPtr, + const hipChannelFormatDesc* desc, size_t width, size_t height, + size_t pitch); +hipError_t hipBindTextureToArray(const textureReference* tex, hipArray_const_t array, + const hipChannelFormatDesc* desc); +hipError_t hipBindTextureToMipmappedArray(const textureReference* tex, + hipMipmappedArray_const_t mipmappedArray, + const hipChannelFormatDesc* desc); +hipError_t hipChooseDevice(int* device, const hipDeviceProp_t* prop); +hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem, hipStream_t stream); +hipError_t hipCreateTextureObject(hipTextureObject_t* pTexObject, const hipResourceDesc* pResDesc, + const hipTextureDesc* pTexDesc, + const struct hipResourceViewDesc* pResViewDesc); +hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device); +hipError_t hipCtxDestroy(hipCtx_t ctx); +hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx); +hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags); +hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion); +hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig); +hipError_t hipCtxGetCurrent(hipCtx_t* ctx); +hipError_t hipCtxGetDevice(hipDevice_t* device); +hipError_t hipCtxGetFlags(unsigned int* flags); +hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig); +hipError_t hipCtxPopCurrent(hipCtx_t* ctx); +hipError_t hipCtxPushCurrent(hipCtx_t ctx); +hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig); +hipError_t hipCtxSetCurrent(hipCtx_t ctx); +hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config); +hipError_t hipCtxSynchronize(void); +hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem); +hipError_t hipDestroyExternalSemaphore(hipExternalSemaphore_t extSem); +hipError_t hipDestroySurfaceObject(hipSurfaceObject_t surfaceObject); +hipError_t hipDestroyTextureObject(hipTextureObject_t textureObject); +hipError_t hipDeviceCanAccessPeer(int* canAccessPeer, int deviceId, int peerDeviceId); +hipError_t hipDeviceComputeCapability(int* major, int* minor, hipDevice_t device); +hipError_t hipDeviceDisablePeerAccess(int peerDeviceId); +hipError_t hipDeviceEnablePeerAccess(int peerDeviceId, unsigned int flags); +hipError_t hipDeviceGet(hipDevice_t* device, int ordinal); +hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int deviceId); +hipError_t hipDeviceGetByPCIBusId(int* device, const char* pciBusId); +hipError_t hipDeviceGetCacheConfig(hipFuncCache_t* cacheConfig); +hipError_t hipDeviceGetDefaultMemPool(hipMemPool_t* mem_pool, int device); +hipError_t hipDeviceGetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value); +hipError_t hipDeviceGetLimit(size_t* pValue, enum hipLimit_t limit); +hipError_t hipDeviceGetMemPool(hipMemPool_t* mem_pool, int device); +hipError_t hipDeviceGetName(char* name, int len, hipDevice_t device); +hipError_t hipDeviceGetP2PAttribute(int* value, hipDeviceP2PAttr attr, int srcDevice, + int dstDevice); +hipError_t hipDeviceGetPCIBusId(char* pciBusId, int len, int device); +hipError_t hipDeviceGetSharedMemConfig(hipSharedMemConfig* pConfig); +hipError_t hipDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority); +hipError_t hipDeviceGetUuid(hipUUID* uuid, hipDevice_t device); +hipError_t hipDeviceGraphMemTrim(int device); +hipError_t hipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int* flags, int* active); +hipError_t hipDevicePrimaryCtxRelease(hipDevice_t dev); +hipError_t hipDevicePrimaryCtxReset(hipDevice_t dev); +hipError_t hipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev); +hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags); +hipError_t hipDeviceReset(void); +hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig); +hipError_t hipDeviceSetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value); +hipError_t hipDeviceSetLimit(enum hipLimit_t limit, size_t value); +hipError_t hipDeviceSetMemPool(int device, hipMemPool_t mem_pool); +hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config); +hipError_t hipDeviceSynchronize(void); +hipError_t hipDeviceTotalMem(size_t* bytes, hipDevice_t device); +hipError_t hipDriverGetVersion(int* driverVersion); +hipError_t hipDrvGetErrorName(hipError_t hipError, const char** errorString); +hipError_t hipDrvGetErrorString(hipError_t hipError, const char** errorString); +hipError_t hipDrvMemcpy2DUnaligned(const hip_Memcpy2D* pCopy); +hipError_t hipDrvMemcpy3D(const HIP_MEMCPY3D* pCopy); +hipError_t hipDrvMemcpy3DAsync(const HIP_MEMCPY3D* pCopy, hipStream_t stream); +hipError_t hipDrvPointerGetAttributes(unsigned int numAttributes, hipPointer_attribute* attributes, + void** data, hipDeviceptr_t ptr); +hipError_t hipEventCreate(hipEvent_t* event); +hipError_t hipEventCreateWithFlags(hipEvent_t* event, unsigned flags); +hipError_t hipEventDestroy(hipEvent_t event); +hipError_t hipEventElapsedTime(float* ms, hipEvent_t start, hipEvent_t stop); +hipError_t hipEventQuery(hipEvent_t event); +hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream); +hipError_t hipEventSynchronize(hipEvent_t event); +hipError_t hipExtGetLinkTypeAndHopCount(int device1, int device2, uint32_t* linktype, + uint32_t* hopcount); +hipError_t hipExtLaunchKernel(const void* function_address, dim3 numBlocks, dim3 dimBlocks, + void** args, size_t sharedMemBytes, hipStream_t stream, + hipEvent_t startEvent, hipEvent_t stopEvent, int flags); +hipError_t hipExtLaunchMultiKernelMultiDevice(hipLaunchParams* launchParamsList, int numDevices, + unsigned int flags); +hipError_t hipExtMallocWithFlags(void** ptr, size_t sizeBytes, unsigned int flags); +hipError_t hipExtStreamCreateWithCUMask(hipStream_t* stream, uint32_t cuMaskSize, + const uint32_t* cuMask); +hipError_t hipExtStreamGetCUMask(hipStream_t stream, uint32_t cuMaskSize, uint32_t* cuMask); +hipError_t hipExternalMemoryGetMappedBuffer(void** devPtr, hipExternalMemory_t extMem, + const hipExternalMemoryBufferDesc* bufferDesc); +hipError_t hipFree(void* ptr); +hipError_t hipFreeArray(hipArray_t array); +hipError_t hipFreeAsync(void* dev_ptr, hipStream_t stream); +hipError_t hipFreeHost(void* ptr); +hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray); +hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc); +hipError_t hipFuncGetAttributes(struct hipFuncAttributes* attr, const void* func); +hipError_t hipFuncSetAttribute(const void* func, hipFuncAttribute attr, int value); +hipError_t hipFuncSetCacheConfig(const void* func, hipFuncCache_t config); +hipError_t hipFuncSetSharedMemConfig(const void* func, hipSharedMemConfig config); +hipError_t hipGLGetDevices(unsigned int* pHipDeviceCount, int* pHipDevices, + unsigned int hipDeviceCount, hipGLDeviceList deviceList); +hipError_t hipGetChannelDesc(hipChannelFormatDesc* desc, hipArray_const_t array); +hipError_t hipGetDevice(int* deviceId); +hipError_t hipGetDeviceCount(int* count); +hipError_t hipGetDeviceFlags(unsigned int* flags); +hipError_t hipGetDeviceProperties(hipDeviceProp_t* prop, int deviceId); +const char* hipGetErrorName(hipError_t hip_error); +const char* hipGetErrorString(hipError_t hipError); +hipError_t hipGetLastError(void); +hipError_t hipGetMipmappedArrayLevel(hipArray_t* levelArray, + hipMipmappedArray_const_t mipmappedArray, unsigned int level); +hipError_t hipGetSymbolAddress(void** devPtr, const void* symbol); +hipError_t hipGetSymbolSize(size_t* size, const void* symbol); +hipError_t hipGetTextureAlignmentOffset(size_t* offset, const textureReference* texref); +hipError_t hipGetTextureObjectResourceDesc(hipResourceDesc* pResDesc, + hipTextureObject_t textureObject); +hipError_t hipGetTextureObjectResourceViewDesc(struct hipResourceViewDesc* pResViewDesc, + hipTextureObject_t textureObject); +hipError_t hipGetTextureObjectTextureDesc(hipTextureDesc* pTexDesc, + hipTextureObject_t textureObject); +hipError_t hipGraphAddChildGraphNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + hipGraph_t childGraph); +hipError_t hipGraphAddDependencies(hipGraph_t graph, const hipGraphNode_t* from, + const hipGraphNode_t* to, size_t numDependencies); +hipError_t hipGraphAddEmptyNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies); +hipError_t hipGraphAddEventRecordNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + hipEvent_t event); +hipError_t hipGraphAddEventWaitNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + hipEvent_t event); +hipError_t hipGraphAddHostNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + const hipHostNodeParams* pNodeParams); +hipError_t hipGraphAddKernelNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + const hipKernelNodeParams* pNodeParams); +hipError_t hipGraphAddMemAllocNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + hipMemAllocNodeParams* pNodeParams); +hipError_t hipGraphAddMemFreeNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + void* dev_ptr); +hipError_t hipGraphAddMemcpyNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + const hipMemcpy3DParms* pCopyParams); +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); +hipError_t hipGraphAddMemcpyNodeFromSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, void* dst, const void* symbol, + size_t count, size_t offset, hipMemcpyKind kind); +hipError_t hipGraphAddMemcpyNodeToSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, const void* symbol, + const void* src, size_t count, size_t offset, + hipMemcpyKind kind); +hipError_t hipGraphAddMemsetNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + const hipMemsetParams* pMemsetParams); +hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t* pGraph); +hipError_t hipGraphClone(hipGraph_t* pGraphClone, hipGraph_t originalGraph); +hipError_t hipGraphCreate(hipGraph_t* pGraph, unsigned int flags); +hipError_t hipGraphDebugDotPrint(hipGraph_t graph, const char* path, unsigned int flags); +hipError_t hipGraphDestroy(hipGraph_t graph); +hipError_t hipGraphDestroyNode(hipGraphNode_t node); +hipError_t hipGraphEventRecordNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out); +hipError_t hipGraphEventRecordNodeSetEvent(hipGraphNode_t node, hipEvent_t event); +hipError_t hipGraphEventWaitNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out); +hipError_t hipGraphEventWaitNodeSetEvent(hipGraphNode_t node, hipEvent_t event); +hipError_t hipGraphExecChildGraphNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + hipGraph_t childGraph); +hipError_t hipGraphExecDestroy(hipGraphExec_t graphExec); +hipError_t hipGraphExecEventRecordNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + hipEvent_t event); +hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + hipEvent_t event); +hipError_t hipGraphExecHostNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + const hipHostNodeParams* pNodeParams); +hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + const hipKernelNodeParams* pNodeParams); +hipError_t hipGraphExecMemcpyNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + hipMemcpy3DParms* pNodeParams); +hipError_t hipGraphExecMemcpyNodeSetParams1D(hipGraphExec_t hGraphExec, hipGraphNode_t node, + void* dst, const void* src, size_t count, + hipMemcpyKind kind); +hipError_t hipGraphExecMemcpyNodeSetParamsFromSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, + void* dst, const void* symbol, size_t count, + size_t offset, hipMemcpyKind kind); +hipError_t hipGraphExecMemcpyNodeSetParamsToSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, + const void* symbol, const void* src, + size_t count, size_t offset, hipMemcpyKind kind); +hipError_t hipGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + const hipMemsetParams* pNodeParams); +hipError_t hipGraphExecUpdate(hipGraphExec_t hGraphExec, hipGraph_t hGraph, + hipGraphNode_t* hErrorNode_out, + hipGraphExecUpdateResult* updateResult_out); +hipError_t hipGraphGetEdges(hipGraph_t graph, hipGraphNode_t* from, hipGraphNode_t* to, + size_t* numEdges); +hipError_t hipGraphGetNodes(hipGraph_t graph, hipGraphNode_t* nodes, size_t* numNodes); +hipError_t hipGraphGetRootNodes(hipGraph_t graph, hipGraphNode_t* pRootNodes, + size_t* pNumRootNodes); +hipError_t hipGraphHostNodeGetParams(hipGraphNode_t node, hipHostNodeParams* pNodeParams); +hipError_t hipGraphHostNodeSetParams(hipGraphNode_t node, const hipHostNodeParams* pNodeParams); +hipError_t hipGraphInstantiate(hipGraphExec_t* pGraphExec, hipGraph_t graph, + hipGraphNode_t* pErrorNode, char* pLogBuffer, size_t bufferSize); +hipError_t hipGraphInstantiateWithFlags(hipGraphExec_t* pGraphExec, hipGraph_t graph, + unsigned long long flags); +hipError_t hipGraphKernelNodeCopyAttributes(hipGraphNode_t hSrc, hipGraphNode_t hDst); +hipError_t hipGraphKernelNodeGetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, + hipKernelNodeAttrValue* value); +hipError_t hipGraphKernelNodeGetParams(hipGraphNode_t node, hipKernelNodeParams* pNodeParams); +hipError_t hipGraphKernelNodeSetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, + const hipKernelNodeAttrValue* value); +hipError_t hipGraphKernelNodeSetParams(hipGraphNode_t node, const hipKernelNodeParams* pNodeParams); +hipError_t hipGraphLaunch(hipGraphExec_t graphExec, hipStream_t stream); +hipError_t hipGraphMemAllocNodeGetParams(hipGraphNode_t node, hipMemAllocNodeParams* pNodeParams); +hipError_t hipGraphMemFreeNodeGetParams(hipGraphNode_t node, void* dev_ptr); +hipError_t hipGraphMemcpyNodeGetParams(hipGraphNode_t node, hipMemcpy3DParms* pNodeParams); +hipError_t hipGraphMemcpyNodeSetParams(hipGraphNode_t node, const hipMemcpy3DParms* pNodeParams); +hipError_t hipGraphMemcpyNodeSetParams1D(hipGraphNode_t node, void* dst, const void* src, + size_t count, hipMemcpyKind kind); +hipError_t hipGraphMemcpyNodeSetParamsFromSymbol(hipGraphNode_t node, void* dst, const void* symbol, + size_t count, size_t offset, hipMemcpyKind kind); +hipError_t hipGraphMemcpyNodeSetParamsToSymbol(hipGraphNode_t node, const void* symbol, + const void* src, size_t count, size_t offset, + hipMemcpyKind kind); +hipError_t hipGraphMemsetNodeGetParams(hipGraphNode_t node, hipMemsetParams* pNodeParams); +hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const hipMemsetParams* pNodeParams); +hipError_t hipGraphNodeFindInClone(hipGraphNode_t* pNode, hipGraphNode_t originalNode, + hipGraph_t clonedGraph); +hipError_t hipGraphNodeGetDependencies(hipGraphNode_t node, hipGraphNode_t* pDependencies, + size_t* pNumDependencies); +hipError_t hipGraphNodeGetDependentNodes(hipGraphNode_t node, hipGraphNode_t* pDependentNodes, + size_t* pNumDependentNodes); +hipError_t hipGraphNodeGetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + unsigned int* isEnabled); +hipError_t hipGraphNodeGetType(hipGraphNode_t node, hipGraphNodeType* pType); +hipError_t hipGraphNodeSetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + unsigned int isEnabled); +hipError_t hipGraphReleaseUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count); +hipError_t hipGraphRemoveDependencies(hipGraph_t graph, const hipGraphNode_t* from, + const hipGraphNode_t* to, size_t numDependencies); +hipError_t hipGraphRetainUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count, + unsigned int flags); +hipError_t hipGraphUpload(hipGraphExec_t graphExec, hipStream_t stream); +hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer, + unsigned int flags); +hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource, GLuint image, GLenum target, + unsigned int flags); +hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t* resources, hipStream_t stream); +hipError_t hipGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, + hipGraphicsResource_t resource); +hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t* array, hipGraphicsResource_t resource, + unsigned int arrayIndex, unsigned int mipLevel); +hipError_t hipGraphicsUnmapResources(int count, hipGraphicsResource_t* resources, + hipStream_t stream); +hipError_t hipGraphicsUnregisterResource(hipGraphicsResource_t resource); +hipError_t hipHostAlloc(void** ptr, size_t size, unsigned int flags); +hipError_t hipHostFree(void* ptr); +hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, unsigned int flags); +hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr); +hipError_t hipHostMalloc(void** ptr, size_t size, unsigned int flags); +hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags); +hipError_t hipHostUnregister(void* hostPtr); +hipError_t hipImportExternalMemory(hipExternalMemory_t* extMem_out, + const hipExternalMemoryHandleDesc* memHandleDesc); +hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t* extSem_out, + const hipExternalSemaphoreHandleDesc* semHandleDesc); +hipError_t hipInit(unsigned int flags); +hipError_t hipIpcCloseMemHandle(void* devPtr); +hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t* handle, hipEvent_t event); +hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t* handle, void* devPtr); +hipError_t hipIpcOpenEventHandle(hipEvent_t* event, hipIpcEventHandle_t handle); +hipError_t hipIpcOpenMemHandle(void** devPtr, hipIpcMemHandle_t handle, unsigned int flags); +const char* hipKernelNameRef(const hipFunction_t f); +const char* hipKernelNameRefByPtr(const void* hostFunction, hipStream_t stream); +hipError_t hipLaunchByPtr(const void* func); +hipError_t hipLaunchCooperativeKernel(const void* f, dim3 gridDim, dim3 blockDimX, + void** kernelParams, unsigned int sharedMemBytes, + hipStream_t stream); +hipError_t hipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsList, int numDevices, + unsigned int flags); +hipError_t hipLaunchHostFunc(hipStream_t stream, hipHostFn_t fn, void* userData); +hipError_t hipLaunchKernel(const void* function_address, dim3 numBlocks, dim3 dimBlocks, + void** args, size_t sharedMemBytes, hipStream_t stream); +hipError_t hipMalloc(void** ptr, size_t size); +hipError_t hipMalloc3D(hipPitchedPtr* pitchedDevPtr, hipExtent extent); +hipError_t hipMalloc3DArray(hipArray_t* array, const struct hipChannelFormatDesc* desc, + struct hipExtent extent, unsigned int flags); +hipError_t hipMallocArray(hipArray_t* array, const hipChannelFormatDesc* desc, size_t width, + size_t height, unsigned int flags); +hipError_t hipMallocAsync(void** dev_ptr, size_t size, hipStream_t stream); +hipError_t hipMallocFromPoolAsync(void** dev_ptr, size_t size, hipMemPool_t mem_pool, + hipStream_t stream); +hipError_t hipMallocHost(void** ptr, size_t size); +hipError_t hipMallocManaged(void** dev_ptr, size_t size, unsigned int flags); +hipError_t hipMallocMipmappedArray(hipMipmappedArray_t* mipmappedArray, + const struct hipChannelFormatDesc* desc, struct hipExtent extent, + unsigned int numLevels, unsigned int flags); +hipError_t hipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t height); +hipError_t hipMemAddressFree(void* devPtr, size_t size); +hipError_t hipMemAddressReserve(void** ptr, size_t size, size_t alignment, void* addr, + unsigned long long flags); +hipError_t hipMemAdvise(const void* dev_ptr, size_t count, hipMemoryAdvise advice, int device); +hipError_t hipMemAllocHost(void** ptr, size_t size); +hipError_t hipMemAllocPitch(hipDeviceptr_t* dptr, size_t* pitch, size_t widthInBytes, size_t height, + unsigned int elementSizeBytes); +hipError_t hipMemCreate(hipMemGenericAllocationHandle_t* handle, size_t size, + const hipMemAllocationProp* prop, unsigned long long flags); +hipError_t hipMemExportToShareableHandle(void* shareableHandle, + hipMemGenericAllocationHandle_t handle, + hipMemAllocationHandleType handleType, + unsigned long long flags); +hipError_t hipMemGetAccess(unsigned long long* flags, const hipMemLocation* location, void* ptr); +hipError_t hipMemGetAddressRange(hipDeviceptr_t* pbase, size_t* psize, hipDeviceptr_t dptr); +hipError_t hipMemGetAllocationGranularity(size_t* granularity, const hipMemAllocationProp* prop, + hipMemAllocationGranularity_flags option); +hipError_t hipMemGetAllocationPropertiesFromHandle(hipMemAllocationProp* prop, + hipMemGenericAllocationHandle_t handle); +hipError_t hipMemGetInfo(size_t* free, size_t* total); +hipError_t hipMemImportFromShareableHandle(hipMemGenericAllocationHandle_t* handle, void* osHandle, + hipMemAllocationHandleType shHandleType); +hipError_t hipMemMap(void* ptr, size_t size, size_t offset, hipMemGenericAllocationHandle_t handle, + unsigned long long flags); +hipError_t hipMemMapArrayAsync(hipArrayMapInfo* mapInfoList, unsigned int count, + hipStream_t stream); +hipError_t hipMemPoolCreate(hipMemPool_t* mem_pool, const hipMemPoolProps* pool_props); +hipError_t hipMemPoolDestroy(hipMemPool_t mem_pool); +hipError_t hipMemPoolExportPointer(hipMemPoolPtrExportData* export_data, void* dev_ptr); +hipError_t hipMemPoolExportToShareableHandle(void* shared_handle, hipMemPool_t mem_pool, + hipMemAllocationHandleType handle_type, + unsigned int flags); +hipError_t hipMemPoolGetAccess(hipMemAccessFlags* flags, hipMemPool_t mem_pool, + hipMemLocation* location); +hipError_t hipMemPoolGetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value); +hipError_t hipMemPoolImportFromShareableHandle(hipMemPool_t* mem_pool, void* shared_handle, + hipMemAllocationHandleType handle_type, + unsigned int flags); +hipError_t hipMemPoolImportPointer(void** dev_ptr, hipMemPool_t mem_pool, + hipMemPoolPtrExportData* export_data); +hipError_t hipMemPoolSetAccess(hipMemPool_t mem_pool, const hipMemAccessDesc* desc_list, + size_t count); +hipError_t hipMemPoolSetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value); +hipError_t hipMemPoolTrimTo(hipMemPool_t mem_pool, size_t min_bytes_to_hold); +hipError_t hipMemPrefetchAsync(const void* dev_ptr, size_t count, int device, hipStream_t stream); +hipError_t hipMemPtrGetInfo(void* ptr, size_t* size); +hipError_t hipMemRangeGetAttribute(void* data, size_t data_size, hipMemRangeAttribute attribute, + const void* dev_ptr, size_t count); +hipError_t hipMemRangeGetAttributes(void** data, size_t* data_sizes, + hipMemRangeAttribute* attributes, size_t num_attributes, + const void* dev_ptr, size_t count); +hipError_t hipMemRelease(hipMemGenericAllocationHandle_t handle); +hipError_t hipMemRetainAllocationHandle(hipMemGenericAllocationHandle_t* handle, void* addr); +hipError_t hipMemSetAccess(void* ptr, size_t size, const hipMemAccessDesc* desc, size_t count); +hipError_t hipMemUnmap(void* ptr, size_t size); +hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind); +hipError_t hipMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, + size_t height, hipMemcpyKind kind); +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); +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); +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); +hipError_t hipMemcpy2DToArray(hipArray_t dst, size_t wOffset, size_t hOffset, const void* src, + size_t spitch, size_t width, size_t height, hipMemcpyKind kind); +hipError_t hipMemcpy2DToArrayAsync(hipArray_t dst, size_t wOffset, size_t hOffset, const void* src, + size_t spitch, size_t width, size_t height, hipMemcpyKind kind, + hipStream_t stream); +hipError_t hipMemcpy3D(const struct hipMemcpy3DParms* p); +hipError_t hipMemcpy3DAsync(const struct hipMemcpy3DParms* p, hipStream_t stream); +hipError_t hipMemcpyAsync(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind, + hipStream_t stream); +hipError_t hipMemcpyAtoH(void* dst, hipArray_t srcArray, size_t srcOffset, size_t count); +hipError_t hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes); +hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes, + hipStream_t stream); +hipError_t hipMemcpyDtoH(void* dst, hipDeviceptr_t src, size_t sizeBytes); +hipError_t hipMemcpyDtoHAsync(void* dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream); +hipError_t hipMemcpyFromArray(void* dst, hipArray_const_t srcArray, size_t wOffset, size_t hOffset, + size_t count, hipMemcpyKind kind); +hipError_t hipMemcpyFromSymbol(void* dst, const void* symbol, size_t sizeBytes, size_t offset, + hipMemcpyKind kind); +hipError_t hipMemcpyFromSymbolAsync(void* dst, const void* symbol, size_t sizeBytes, size_t offset, + hipMemcpyKind kind, hipStream_t stream); +hipError_t hipMemcpyHtoA(hipArray_t dstArray, size_t dstOffset, const void* srcHost, size_t count); +hipError_t hipMemcpyHtoD(hipDeviceptr_t dst, void* src, size_t sizeBytes); +hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, void* src, size_t sizeBytes, hipStream_t stream); +hipError_t hipMemcpyParam2D(const hip_Memcpy2D* pCopy); +hipError_t hipMemcpyParam2DAsync(const hip_Memcpy2D* pCopy, hipStream_t stream); +hipError_t hipMemcpyPeer(void* dst, int dstDeviceId, const void* src, int srcDeviceId, + size_t sizeBytes); +hipError_t hipMemcpyPeerAsync(void* dst, int dstDeviceId, const void* src, int srcDevice, + size_t sizeBytes, hipStream_t stream); +hipError_t hipMemcpyToArray(hipArray_t dst, size_t wOffset, size_t hOffset, const void* src, + size_t count, hipMemcpyKind kind); +hipError_t hipMemcpyToSymbol(const void* symbol, const void* src, size_t sizeBytes, size_t offset, + hipMemcpyKind kind); +hipError_t hipMemcpyToSymbolAsync(const void* symbol, const void* src, size_t sizeBytes, + size_t offset, hipMemcpyKind kind, hipStream_t stream); +hipError_t hipMemcpyWithStream(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind, + hipStream_t stream); +hipError_t hipMemset(void* dst, int value, size_t sizeBytes); +hipError_t hipMemset2D(void* dst, size_t pitch, int value, size_t width, size_t height); +hipError_t hipMemset2DAsync(void* dst, size_t pitch, int value, size_t width, size_t height, + hipStream_t stream); +hipError_t hipMemset3D(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent); +hipError_t hipMemset3DAsync(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent, + hipStream_t stream); +hipError_t hipMemsetAsync(void* dst, int value, size_t sizeBytes, hipStream_t stream); +hipError_t hipMemsetD16(hipDeviceptr_t dest, unsigned short value, size_t count); +hipError_t hipMemsetD16Async(hipDeviceptr_t dest, unsigned short value, size_t count, + hipStream_t stream); +hipError_t hipMemsetD32(hipDeviceptr_t dest, int value, size_t count); +hipError_t hipMemsetD32Async(hipDeviceptr_t dst, int value, size_t count, hipStream_t stream); +hipError_t hipMemsetD8(hipDeviceptr_t dest, unsigned char value, size_t count); +hipError_t hipMemsetD8Async(hipDeviceptr_t dest, unsigned char value, size_t count, + hipStream_t stream); +hipError_t hipMipmappedArrayCreate(hipMipmappedArray_t* pHandle, + HIP_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, + unsigned int numMipmapLevels); +hipError_t hipMipmappedArrayDestroy(hipMipmappedArray_t hMipmappedArray); +hipError_t hipMipmappedArrayGetLevel(hipArray_t* pLevelArray, hipMipmappedArray_t hMipMappedArray, + unsigned int level); +hipError_t hipModuleGetFunction(hipFunction_t* function, hipModule_t module, const char* kname); +hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t hmod, + const char* name); +hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const char* name); +hipError_t hipModuleLaunchCooperativeKernel(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); +hipError_t hipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams* launchParamsList, + unsigned int numDevices, unsigned int flags); +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); +hipError_t hipModuleLoad(hipModule_t* module, const char* fname); +hipError_t hipModuleLoadData(hipModule_t* module, const void* image); +hipError_t hipModuleLoadDataEx(hipModule_t* module, const void* image, unsigned int numOptions, + hipJitOption* options, void** optionValues); +hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, hipFunction_t f, + int blockSize, + size_t dynSharedMemPerBlk); +hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( + int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags); +hipError_t hipModuleOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize, hipFunction_t f, + size_t dynSharedMemPerBlk, int blockSizeLimit); +hipError_t hipModuleOccupancyMaxPotentialBlockSizeWithFlags(int* gridSize, int* blockSize, + hipFunction_t f, + size_t dynSharedMemPerBlk, + int blockSizeLimit, unsigned int flags); +hipError_t hipModuleUnload(hipModule_t module); +hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* f, + int blockSize, size_t dynSharedMemPerBlk); +hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* f, + int blockSize, + size_t dynSharedMemPerBlk, + unsigned int flags); +hipError_t hipOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize, const void* f, + size_t dynSharedMemPerBlk, int blockSizeLimit); +hipError_t hipPeekAtLastError(void); +hipError_t hipPointerGetAttribute(void* data, hipPointer_attribute attribute, hipDeviceptr_t ptr); +hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void* ptr); +hipError_t hipPointerSetAttribute(const void* value, hipPointer_attribute attribute, + hipDeviceptr_t ptr); +hipError_t hipProfilerStart(); +hipError_t hipProfilerStop(); +void hipRegisterTracerCallback(const void* function); +hipError_t hipRuntimeGetVersion(int* runtimeVersion); +hipError_t hipSetDevice(int deviceId); +hipError_t hipSetDeviceFlags(unsigned flags); +hipError_t hipSetupArgument(const void* arg, size_t size, size_t offset); +hipError_t hipSignalExternalSemaphoresAsync(const hipExternalSemaphore_t* extSemArray, + const hipExternalSemaphoreSignalParams* paramsArray, + unsigned int numExtSems, hipStream_t stream); +hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback, void* userData, + unsigned int flags); +hipError_t hipStreamAttachMemAsync(hipStream_t stream, void* dev_ptr, size_t length, + unsigned int flags); +hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode); +hipError_t hipStreamCreate(hipStream_t* stream); +hipError_t hipStreamCreateWithFlags(hipStream_t* stream, unsigned int flags); +hipError_t hipStreamCreateWithPriority(hipStream_t* stream, unsigned int flags, int priority); +hipError_t hipStreamDestroy(hipStream_t stream); +hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t* pGraph); +hipError_t hipStreamGetCaptureInfo(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus, + unsigned long long* pId); +hipError_t hipStreamGetCaptureInfo_v2(hipStream_t stream, hipStreamCaptureStatus* captureStatus_out, + unsigned long long* id_out, hipGraph_t* graph_out, + const hipGraphNode_t** dependencies_out, + size_t* numDependencies_out); +hipError_t hipStreamGetDevice(hipStream_t stream, hipDevice_t* device); +hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int* flags); +hipError_t hipStreamGetPriority(hipStream_t stream, int* priority); +hipError_t hipStreamIsCapturing(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus); +hipError_t hipStreamQuery(hipStream_t stream); +hipError_t hipStreamSynchronize(hipStream_t stream); +hipError_t hipStreamUpdateCaptureDependencies(hipStream_t stream, hipGraphNode_t* dependencies, + size_t numDependencies, unsigned int flags); +hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags); +hipError_t hipStreamWaitValue32(hipStream_t stream, void* ptr, uint32_t value, unsigned int flags, + uint32_t mask); +hipError_t hipStreamWaitValue64(hipStream_t stream, void* ptr, uint64_t value, unsigned int flags, + uint64_t mask); +hipError_t hipStreamWriteValue32(hipStream_t stream, void* ptr, uint32_t value, unsigned int flags); +hipError_t hipStreamWriteValue64(hipStream_t stream, void* ptr, uint64_t value, unsigned int flags); +hipError_t hipTexObjectCreate(hipTextureObject_t* pTexObject, const HIP_RESOURCE_DESC* pResDesc, + const HIP_TEXTURE_DESC* pTexDesc, + const HIP_RESOURCE_VIEW_DESC* pResViewDesc); +hipError_t hipTexObjectDestroy(hipTextureObject_t texObject); +hipError_t hipTexObjectGetResourceDesc(HIP_RESOURCE_DESC* pResDesc, hipTextureObject_t texObject); +hipError_t hipTexObjectGetResourceViewDesc(HIP_RESOURCE_VIEW_DESC* pResViewDesc, + hipTextureObject_t texObject); +hipError_t hipTexObjectGetTextureDesc(HIP_TEXTURE_DESC* pTexDesc, hipTextureObject_t texObject); +hipError_t hipTexRefGetAddress(hipDeviceptr_t* dev_ptr, const textureReference* texRef); +hipError_t hipTexRefGetAddressMode(enum hipTextureAddressMode* pam, const textureReference* texRef, + int dim); +hipError_t hipTexRefGetFilterMode(enum hipTextureFilterMode* pfm, const textureReference* texRef); +hipError_t hipTexRefGetFlags(unsigned int* pFlags, const textureReference* texRef); +hipError_t hipTexRefGetFormat(hipArray_Format* pFormat, int* pNumChannels, + const textureReference* texRef); +hipError_t hipTexRefGetMaxAnisotropy(int* pmaxAnsio, const textureReference* texRef); +hipError_t hipTexRefGetMipMappedArray(hipMipmappedArray_t* pArray, const textureReference* texRef); +hipError_t hipTexRefGetMipmapFilterMode(enum hipTextureFilterMode* pfm, + const textureReference* texRef); +hipError_t hipTexRefGetMipmapLevelBias(float* pbias, const textureReference* texRef); +hipError_t hipTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, + const textureReference* texRef); +hipError_t hipTexRefSetAddress(size_t* ByteOffset, textureReference* texRef, hipDeviceptr_t dptr, + size_t bytes); +hipError_t hipTexRefSetAddress2D(textureReference* texRef, const HIP_ARRAY_DESCRIPTOR* desc, + hipDeviceptr_t dptr, size_t Pitch); +hipError_t hipTexRefSetAddressMode(textureReference* texRef, int dim, + enum hipTextureAddressMode am); +hipError_t hipTexRefSetArray(textureReference* tex, hipArray_const_t array, unsigned int flags); +hipError_t hipTexRefSetBorderColor(textureReference* texRef, float* pBorderColor); +hipError_t hipTexRefSetFilterMode(textureReference* texRef, enum hipTextureFilterMode fm); +hipError_t hipTexRefSetFlags(textureReference* texRef, unsigned int Flags); +hipError_t hipTexRefSetFormat(textureReference* texRef, hipArray_Format fmt, + int NumPackedComponents); +hipError_t hipTexRefSetMaxAnisotropy(textureReference* texRef, unsigned int maxAniso); +hipError_t hipTexRefSetMipmapFilterMode(textureReference* texRef, enum hipTextureFilterMode fm); +hipError_t hipTexRefSetMipmapLevelBias(textureReference* texRef, float bias); +hipError_t hipTexRefSetMipmapLevelClamp(textureReference* texRef, float minMipMapLevelClamp, + float maxMipMapLevelClamp); +hipError_t hipTexRefSetMipmappedArray(textureReference* texRef, + struct hipMipmappedArray* mipmappedArray, unsigned int Flags); +hipError_t hipThreadExchangeStreamCaptureMode(hipStreamCaptureMode* mode); +hipError_t hipUnbindTexture(const textureReference* tex); +hipError_t hipUserObjectCreate(hipUserObject_t* object_out, void* ptr, hipHostFn_t destroy, + unsigned int initialRefcount, unsigned int flags); +hipError_t hipUserObjectRelease(hipUserObject_t object, unsigned int count); +hipError_t hipUserObjectRetain(hipUserObject_t object, unsigned int count); +hipError_t hipWaitExternalSemaphoresAsync(const hipExternalSemaphore_t* extSemArray, + const hipExternalSemaphoreWaitParams* paramsArray, + unsigned int numExtSems, hipStream_t stream); +hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w, hipChannelFormatKind f); +hipError_t hipCreateSurfaceObject(hipSurfaceObject_t* pSurfObject, const hipResourceDesc* pResDesc); +hipError_t __hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, + uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, + uint32_t localWorkSizeX, uint32_t localWorkSizeY, + uint32_t localWorkSizeZ, size_t sharedMemBytes, + hipStream_t hStream, void** kernelParams, void** extra, + hipEvent_t startEvent, hipEvent_t stopEvent, uint32_t flag); +hipError_t __hipHccModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, + uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, + uint32_t localWorkSizeX, uint32_t localWorkSizeY, + uint32_t localWorkSizeZ, size_t sharedMemBytes, + hipStream_t hStream, void** kernelParams, void** extra, + hipEvent_t startEvent, hipEvent_t stopEvent); +hipError_t hipMemcpy_spt(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind); +hipError_t hipMemcpyToSymbol_spt(const void* symbol, const void* src, size_t sizeBytes, + size_t offset, hipMemcpyKind kind); +hipError_t hipMemcpyFromSymbol_spt(void* dst, const void* symbol, size_t sizeBytes, size_t offset, + hipMemcpyKind kind); +hipError_t hipMemcpy2D_spt(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, + size_t height, hipMemcpyKind kind); +hipError_t hipMemcpy2DFromArray_spt(void* dst, size_t dpitch, hipArray_const_t src, size_t wOffset, + size_t hOffset, size_t width, size_t height, + hipMemcpyKind kind); +hipError_t hipMemcpy3D_spt(const struct hipMemcpy3DParms* p); +hipError_t hipMemset_spt(void* dst, int value, size_t sizeBytes); +hipError_t hipMemsetAsync_spt(void* dst, int value, size_t sizeBytes, hipStream_t stream); +hipError_t hipMemset2D_spt(void* dst, size_t pitch, int value, size_t width, size_t height); +hipError_t hipMemset2DAsync_spt(void* dst, size_t pitch, int value, size_t width, size_t height, + hipStream_t stream); +hipError_t hipMemset3DAsync_spt(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent, + hipStream_t stream); +hipError_t hipMemset3D_spt(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent); +hipError_t hipMemcpyAsync_spt(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind, + hipStream_t stream); +hipError_t hipMemcpy3DAsync_spt(const hipMemcpy3DParms* p, hipStream_t stream); +hipError_t hipMemcpy2DAsync_spt(void* dst, size_t dpitch, const void* src, size_t spitch, + size_t width, size_t height, hipMemcpyKind kind, + hipStream_t stream); +hipError_t hipMemcpyFromSymbolAsync_spt(void* dst, const void* symbol, size_t sizeBytes, + size_t offset, hipMemcpyKind kind, hipStream_t stream); +hipError_t hipMemcpyToSymbolAsync_spt(const void* symbol, const void* src, size_t sizeBytes, + size_t offset, hipMemcpyKind kind, hipStream_t stream); +hipError_t hipMemcpyFromArray_spt(void* dst, hipArray_const_t src, size_t wOffsetSrc, + size_t hOffset, size_t count, hipMemcpyKind kind); +hipError_t hipMemcpy2DToArray_spt(hipArray_t dst, size_t wOffset, size_t hOffset, const void* src, + size_t spitch, size_t width, size_t height, hipMemcpyKind kind); +hipError_t hipMemcpy2DFromArrayAsync_spt(void* dst, size_t dpitch, hipArray_const_t src, + size_t wOffsetSrc, size_t hOffsetSrc, size_t width, + size_t height, hipMemcpyKind kind, hipStream_t stream); +hipError_t hipMemcpy2DToArrayAsync_spt(hipArray_t dst, size_t wOffset, size_t hOffset, + const void* src, size_t spitch, size_t width, size_t height, + hipMemcpyKind kind, hipStream_t stream); +hipError_t hipStreamQuery_spt(hipStream_t stream); +hipError_t hipStreamSynchronize_spt(hipStream_t stream); +hipError_t hipStreamGetPriority_spt(hipStream_t stream, int* priority); +hipError_t hipStreamWaitEvent_spt(hipStream_t stream, hipEvent_t event, unsigned int flags); +hipError_t hipStreamGetFlags_spt(hipStream_t stream, unsigned int* flags); +hipError_t hipStreamAddCallback_spt(hipStream_t stream, hipStreamCallback_t callback, + void* userData, unsigned int flags); +hipError_t hipEventRecord_spt(hipEvent_t event, hipStream_t stream = NULL); +hipError_t hipLaunchCooperativeKernel_spt(const void* f, dim3 gridDim, dim3 blockDim, + void** kernelParams, uint32_t sharedMemBytes, + hipStream_t hStream); + +hipError_t hipLaunchKernel_spt(const void* function_address, dim3 numBlocks, dim3 dimBlocks, + void** args, size_t sharedMemBytes, hipStream_t stream); + +hipError_t hipGraphLaunch_spt(hipGraphExec_t graphExec, hipStream_t stream); +hipError_t hipStreamBeginCapture_spt(hipStream_t stream, hipStreamCaptureMode mode); +hipError_t hipStreamEndCapture_spt(hipStream_t stream, hipGraph_t* pGraph); +hipError_t hipStreamIsCapturing_spt(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus); +hipError_t hipStreamGetCaptureInfo_spt(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus, + unsigned long long* pId); +hipError_t hipStreamGetCaptureInfo_v2_spt(hipStream_t stream, + hipStreamCaptureStatus* captureStatus_out, + unsigned long long* id_out, hipGraph_t* graph_out, + const hipGraphNode_t** dependencies_out, + size_t* numDependencies_out); +hipError_t hipLaunchHostFunc_spt(hipStream_t stream, hipHostFn_t fn, void* userData); +int hipGetStreamDeviceId(hipStream_t stream); +hipError_t hipDrvGraphAddMemcpyNode(hipGraphNode_t* phGraphNode, hipGraph_t hGraph, + const hipGraphNode_t* dependencies, size_t numDependencies, + const HIP_MEMCPY3D* copyParams, hipCtx_t ctx); +hipError_t hipGetTextureReference(const textureReference** texref, const void* symbol); +hipError_t hipGraphAddExternalSemaphoresSignalNode( + hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, + size_t numDependencies, const hipExternalSemaphoreSignalNodeParams* nodeParams); +hipError_t hipGraphAddExternalSemaphoresWaitNode( + hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, + size_t numDependencies, const hipExternalSemaphoreWaitNodeParams* nodeParams); +hipError_t hipGraphExecExternalSemaphoresSignalNodeSetParams( + hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + const hipExternalSemaphoreSignalNodeParams* nodeParams); +hipError_t hipGraphExecExternalSemaphoresWaitNodeSetParams( + hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + const hipExternalSemaphoreWaitNodeParams* nodeParams); +hipError_t hipGraphExecMemcpyNodeSetParamsFromSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, + void* dst, const void* symbol, size_t count, + size_t offset, hipMemcpyKind kind); +hipError_t hipGraphExternalSemaphoresSignalNodeGetParams( + hipGraphNode_t hNode, hipExternalSemaphoreSignalNodeParams* params_out); +hipError_t hipGraphExternalSemaphoresSignalNodeSetParams( + hipGraphNode_t hNode, const hipExternalSemaphoreSignalNodeParams* nodeParams); +hipError_t hipGraphExternalSemaphoresWaitNodeGetParams( + hipGraphNode_t hNode, hipExternalSemaphoreWaitNodeParams* params_out); +hipError_t hipGraphExternalSemaphoresWaitNodeSetParams( + hipGraphNode_t hNode, const hipExternalSemaphoreWaitNodeParams* nodeParams); +hipError_t hipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams* launchParamsList, + unsigned int numDevices, unsigned int flags); +} // namespace hip + +void UpdateHipCompilerDispatchTable(HipCompilerDispatchTable* ptrCompilerDispatchTable) { + ptrCompilerDispatchTable->size = sizeof(HipCompilerDispatchTable); + ptrCompilerDispatchTable->__hipPopCallConfiguration_fn = hip::__hipPopCallConfiguration; + ptrCompilerDispatchTable->__hipPushCallConfiguration_fn = hip::__hipPushCallConfiguration; + ptrCompilerDispatchTable->__hipRegisterFatBinary_fn = hip::__hipRegisterFatBinary; + ptrCompilerDispatchTable->__hipRegisterFunction_fn = hip::__hipRegisterFunction; + ptrCompilerDispatchTable->__hipRegisterManagedVar_fn = hip::__hipRegisterManagedVar; + ptrCompilerDispatchTable->__hipRegisterSurface_fn = hip::__hipRegisterSurface; + ptrCompilerDispatchTable->__hipRegisterTexture_fn = hip::__hipRegisterTexture; + ptrCompilerDispatchTable->__hipRegisterVar_fn = hip::__hipRegisterVar; + ptrCompilerDispatchTable->__hipUnregisterFatBinary_fn = hip::__hipUnregisterFatBinary; +} + +void UpdateHipDispatchTable(HipDispatchTable* ptrDispatchTable) { + ptrDispatchTable->size = sizeof(HipDispatchTable); + ptrDispatchTable->hipApiName_fn = hip::hipApiName; + ptrDispatchTable->hipArray3DCreate_fn = hip::hipArray3DCreate; + ptrDispatchTable->hipArray3DGetDescriptor_fn = hip::hipArray3DGetDescriptor; + ptrDispatchTable->hipArrayCreate_fn = hip::hipArrayCreate; + ptrDispatchTable->hipArrayDestroy_fn = hip::hipArrayDestroy; + ptrDispatchTable->hipArrayGetDescriptor_fn = hip::hipArrayGetDescriptor; + ptrDispatchTable->hipArrayGetInfo_fn = hip::hipArrayGetInfo; + ptrDispatchTable->hipBindTexture_fn = hip::hipBindTexture; + ptrDispatchTable->hipBindTexture2D_fn = hip::hipBindTexture2D; + ptrDispatchTable->hipBindTextureToArray_fn = hip::hipBindTextureToArray; + ptrDispatchTable->hipBindTextureToMipmappedArray_fn = hip::hipBindTextureToMipmappedArray; + ptrDispatchTable->hipChooseDevice_fn = hip::hipChooseDevice; + ptrDispatchTable->hipConfigureCall_fn = hip::hipConfigureCall; + ptrDispatchTable->hipCreateSurfaceObject_fn = hip::hipCreateSurfaceObject; + ptrDispatchTable->hipCreateTextureObject_fn = hip::hipCreateTextureObject; + ptrDispatchTable->hipCtxCreate_fn = hip::hipCtxCreate; + ptrDispatchTable->hipCtxDestroy_fn = hip::hipCtxDestroy; + ptrDispatchTable->hipCtxDisablePeerAccess_fn = hip::hipCtxDisablePeerAccess; + ptrDispatchTable->hipCtxEnablePeerAccess_fn = hip::hipCtxEnablePeerAccess; + ptrDispatchTable->hipCtxGetApiVersion_fn = hip::hipCtxGetApiVersion; + ptrDispatchTable->hipCtxGetCacheConfig_fn = hip::hipCtxGetCacheConfig; + ptrDispatchTable->hipCtxGetCurrent_fn = hip::hipCtxGetCurrent; + ptrDispatchTable->hipCtxGetDevice_fn = hip::hipCtxGetDevice; + ptrDispatchTable->hipCtxGetFlags_fn = hip::hipCtxGetFlags; + ptrDispatchTable->hipCtxGetSharedMemConfig_fn = hip::hipCtxGetSharedMemConfig; + ptrDispatchTable->hipCtxPopCurrent_fn = hip::hipCtxPopCurrent; + ptrDispatchTable->hipCtxPushCurrent_fn = hip::hipCtxPushCurrent; + ptrDispatchTable->hipCtxSetCacheConfig_fn = hip::hipCtxSetCacheConfig; + ptrDispatchTable->hipCtxSetCurrent_fn = hip::hipCtxSetCurrent; + ptrDispatchTable->hipCtxSetSharedMemConfig_fn = hip::hipCtxSetSharedMemConfig; + ptrDispatchTable->hipCtxSynchronize_fn = hip::hipCtxSynchronize; + ptrDispatchTable->hipDestroySurfaceObject_fn = hip::hipDestroySurfaceObject; + ptrDispatchTable->hipDestroyTextureObject_fn = hip::hipDestroyTextureObject; + ptrDispatchTable->hipDeviceCanAccessPeer_fn = hip::hipDeviceCanAccessPeer; + ptrDispatchTable->hipDeviceComputeCapability_fn = hip::hipDeviceComputeCapability; + ptrDispatchTable->hipDeviceDisablePeerAccess_fn = hip::hipDeviceDisablePeerAccess; + ptrDispatchTable->hipDeviceEnablePeerAccess_fn = hip::hipDeviceEnablePeerAccess; + ptrDispatchTable->hipDeviceGet_fn = hip::hipDeviceGet; + ptrDispatchTable->hipDeviceGetAttribute_fn = hip::hipDeviceGetAttribute; + ptrDispatchTable->hipDeviceGetByPCIBusId_fn = hip::hipDeviceGetByPCIBusId; + ptrDispatchTable->hipDeviceGetCacheConfig_fn = hip::hipDeviceGetCacheConfig; + ptrDispatchTable->hipDeviceGetDefaultMemPool_fn = hip::hipDeviceGetDefaultMemPool; + ptrDispatchTable->hipDeviceGetGraphMemAttribute_fn = hip::hipDeviceGetGraphMemAttribute; + ptrDispatchTable->hipDeviceGetLimit_fn = hip::hipDeviceGetLimit; + ptrDispatchTable->hipDeviceGetMemPool_fn = hip::hipDeviceGetMemPool; + ptrDispatchTable->hipDeviceGetName_fn = hip::hipDeviceGetName; + ptrDispatchTable->hipDeviceGetP2PAttribute_fn = hip::hipDeviceGetP2PAttribute; + ptrDispatchTable->hipDeviceGetPCIBusId_fn = hip::hipDeviceGetPCIBusId; + ptrDispatchTable->hipDeviceGetSharedMemConfig_fn = hip::hipDeviceGetSharedMemConfig; + ptrDispatchTable->hipDeviceGetStreamPriorityRange_fn = hip::hipDeviceGetStreamPriorityRange; + ptrDispatchTable->hipDeviceGetUuid_fn = hip::hipDeviceGetUuid; + ptrDispatchTable->hipDeviceGraphMemTrim_fn = hip::hipDeviceGraphMemTrim; + ptrDispatchTable->hipDevicePrimaryCtxGetState_fn = hip::hipDevicePrimaryCtxGetState; + ptrDispatchTable->hipDevicePrimaryCtxRelease_fn = hip::hipDevicePrimaryCtxRelease; + ptrDispatchTable->hipDevicePrimaryCtxReset_fn = hip::hipDevicePrimaryCtxReset; + ptrDispatchTable->hipDevicePrimaryCtxRetain_fn = hip::hipDevicePrimaryCtxRetain; + ptrDispatchTable->hipDevicePrimaryCtxSetFlags_fn = hip::hipDevicePrimaryCtxSetFlags; + ptrDispatchTable->hipDeviceReset_fn = hip::hipDeviceReset; + ptrDispatchTable->hipDeviceSetCacheConfig_fn = hip::hipDeviceSetCacheConfig; + ptrDispatchTable->hipDeviceSetGraphMemAttribute_fn = hip::hipDeviceSetGraphMemAttribute; + ptrDispatchTable->hipDeviceSetLimit_fn = hip::hipDeviceSetLimit; + ptrDispatchTable->hipDeviceSetMemPool_fn = hip::hipDeviceSetMemPool; + ptrDispatchTable->hipDeviceSetSharedMemConfig_fn = hip::hipDeviceSetSharedMemConfig; + ptrDispatchTable->hipDeviceSynchronize_fn = hip::hipDeviceSynchronize; + ptrDispatchTable->hipDeviceTotalMem_fn = hip::hipDeviceTotalMem; + ptrDispatchTable->hipDriverGetVersion_fn = hip::hipDriverGetVersion; + ptrDispatchTable->hipDrvGetErrorName_fn = hip::hipDrvGetErrorName; + ptrDispatchTable->hipDrvGetErrorString_fn = hip::hipDrvGetErrorString; + ptrDispatchTable->hipDrvGraphAddMemcpyNode_fn = hip::hipDrvGraphAddMemcpyNode; + ptrDispatchTable->hipDrvMemcpy2DUnaligned_fn = hip::hipDrvMemcpy2DUnaligned; + ptrDispatchTable->hipDrvMemcpy3D_fn = hip::hipDrvMemcpy3D; + ptrDispatchTable->hipDrvMemcpy3DAsync_fn = hip::hipDrvMemcpy3DAsync; + ptrDispatchTable->hipDrvPointerGetAttributes_fn = hip::hipDrvPointerGetAttributes; + ptrDispatchTable->hipEventCreate_fn = hip::hipEventCreate; + ptrDispatchTable->hipEventCreateWithFlags_fn = hip::hipEventCreateWithFlags; + ptrDispatchTable->hipEventDestroy_fn = hip::hipEventDestroy; + ptrDispatchTable->hipEventElapsedTime_fn = hip::hipEventElapsedTime; + ptrDispatchTable->hipEventQuery_fn = hip::hipEventQuery; + ptrDispatchTable->hipEventRecord_fn = hip::hipEventRecord; + ptrDispatchTable->hipEventSynchronize_fn = hip::hipEventSynchronize; + ptrDispatchTable->hipExtGetLinkTypeAndHopCount_fn = hip::hipExtGetLinkTypeAndHopCount; + ptrDispatchTable->hipExtLaunchKernel_fn = hip::hipExtLaunchKernel; + ptrDispatchTable->hipExtLaunchMultiKernelMultiDevice_fn = hip::hipExtLaunchMultiKernelMultiDevice; + ptrDispatchTable->hipExtMallocWithFlags_fn = hip::hipExtMallocWithFlags; + ptrDispatchTable->hipExtStreamCreateWithCUMask_fn = hip::hipExtStreamCreateWithCUMask; + ptrDispatchTable->hipExtStreamGetCUMask_fn = hip::hipExtStreamGetCUMask; + ptrDispatchTable->hipExternalMemoryGetMappedBuffer_fn = hip::hipExternalMemoryGetMappedBuffer; + ptrDispatchTable->hipFree_fn = hip::hipFree; + ptrDispatchTable->hipFreeArray_fn = hip::hipFreeArray; + ptrDispatchTable->hipFreeAsync_fn = hip::hipFreeAsync; + ptrDispatchTable->hipFreeHost_fn = hip::hipFreeHost; + ptrDispatchTable->hipFreeMipmappedArray_fn = hip::hipFreeMipmappedArray; + ptrDispatchTable->hipFuncGetAttribute_fn = hip::hipFuncGetAttribute; + ptrDispatchTable->hipFuncGetAttributes_fn = hip::hipFuncGetAttributes; + ptrDispatchTable->hipFuncSetAttribute_fn = hip::hipFuncSetAttribute; + ptrDispatchTable->hipFuncSetCacheConfig_fn = hip::hipFuncSetCacheConfig; + ptrDispatchTable->hipFuncSetSharedMemConfig_fn = hip::hipFuncSetSharedMemConfig; + ptrDispatchTable->hipGLGetDevices_fn = hip::hipGLGetDevices; + ptrDispatchTable->hipGetChannelDesc_fn = hip::hipGetChannelDesc; + ptrDispatchTable->hipGetDevice_fn = hip::hipGetDevice; + ptrDispatchTable->hipGetDeviceCount_fn = hip::hipGetDeviceCount; + ptrDispatchTable->hipGetDeviceFlags_fn = hip::hipGetDeviceFlags; + ptrDispatchTable->hipGetDeviceProperties_fn = hip::hipGetDeviceProperties; + ptrDispatchTable->hipGetErrorName_fn = hip::hipGetErrorName; + ptrDispatchTable->hipGetErrorString_fn = hip::hipGetErrorString; + ptrDispatchTable->hipGetLastError_fn = hip::hipGetLastError; + ptrDispatchTable->hipGetMipmappedArrayLevel_fn = hip::hipGetMipmappedArrayLevel; + ptrDispatchTable->hipGetSymbolAddress_fn = hip::hipGetSymbolAddress; + ptrDispatchTable->hipGetSymbolSize_fn = hip::hipGetSymbolSize; + ptrDispatchTable->hipGetTextureAlignmentOffset_fn = hip::hipGetTextureAlignmentOffset; + ptrDispatchTable->hipGetTextureObjectResourceDesc_fn = hip::hipGetTextureObjectResourceDesc; + ptrDispatchTable->hipGetTextureObjectResourceViewDesc_fn = + hip::hipGetTextureObjectResourceViewDesc; + ptrDispatchTable->hipGetTextureObjectTextureDesc_fn = hip::hipGetTextureObjectTextureDesc; + ptrDispatchTable->hipGetTextureReference_fn = hip::hipGetTextureReference; + ptrDispatchTable->hipGraphAddChildGraphNode_fn = hip::hipGraphAddChildGraphNode; + ptrDispatchTable->hipGraphAddDependencies_fn = hip::hipGraphAddDependencies; + ptrDispatchTable->hipGraphAddEmptyNode_fn = hip::hipGraphAddEmptyNode; + ptrDispatchTable->hipGraphAddEventRecordNode_fn = hip::hipGraphAddEventRecordNode; + ptrDispatchTable->hipGraphAddEventWaitNode_fn = hip::hipGraphAddEventWaitNode; + ptrDispatchTable->hipGraphAddHostNode_fn = hip::hipGraphAddHostNode; + ptrDispatchTable->hipGraphAddKernelNode_fn = hip::hipGraphAddKernelNode; + ptrDispatchTable->hipGraphAddMemAllocNode_fn = hip::hipGraphAddMemAllocNode; + ptrDispatchTable->hipGraphAddMemFreeNode_fn = hip::hipGraphAddMemFreeNode; + ptrDispatchTable->hipGraphAddMemcpyNode_fn = hip::hipGraphAddMemcpyNode; + ptrDispatchTable->hipGraphAddMemcpyNode1D_fn = hip::hipGraphAddMemcpyNode1D; + ptrDispatchTable->hipGraphAddMemcpyNodeFromSymbol_fn = hip::hipGraphAddMemcpyNodeFromSymbol; + ptrDispatchTable->hipGraphAddMemcpyNodeToSymbol_fn = hip::hipGraphAddMemcpyNodeToSymbol; + ptrDispatchTable->hipGraphAddMemsetNode_fn = hip::hipGraphAddMemsetNode; + ptrDispatchTable->hipGraphChildGraphNodeGetGraph_fn = hip::hipGraphChildGraphNodeGetGraph; + ptrDispatchTable->hipGraphClone_fn = hip::hipGraphClone; + ptrDispatchTable->hipGraphCreate_fn = hip::hipGraphCreate; + ptrDispatchTable->hipGraphDebugDotPrint_fn = hip::hipGraphDebugDotPrint; + ptrDispatchTable->hipGraphDestroy_fn = hip::hipGraphDestroy; + ptrDispatchTable->hipGraphDestroyNode_fn = hip::hipGraphDestroyNode; + ptrDispatchTable->hipGraphEventRecordNodeGetEvent_fn = hip::hipGraphEventRecordNodeGetEvent; + ptrDispatchTable->hipGraphEventRecordNodeSetEvent_fn = hip::hipGraphEventRecordNodeSetEvent; + ptrDispatchTable->hipGraphEventWaitNodeGetEvent_fn = hip::hipGraphEventWaitNodeGetEvent; + ptrDispatchTable->hipGraphEventWaitNodeSetEvent_fn = hip::hipGraphEventWaitNodeSetEvent; + ptrDispatchTable->hipGraphExecChildGraphNodeSetParams_fn = + hip::hipGraphExecChildGraphNodeSetParams; + ptrDispatchTable->hipGraphExecDestroy_fn = hip::hipGraphExecDestroy; + ptrDispatchTable->hipGraphExecEventRecordNodeSetEvent_fn = + hip::hipGraphExecEventRecordNodeSetEvent; + ptrDispatchTable->hipGraphExecEventWaitNodeSetEvent_fn = hip::hipGraphExecEventWaitNodeSetEvent; + ptrDispatchTable->hipGraphExecHostNodeSetParams_fn = hip::hipGraphExecHostNodeSetParams; + ptrDispatchTable->hipGraphExecKernelNodeSetParams_fn = hip::hipGraphExecKernelNodeSetParams; + ptrDispatchTable->hipGraphExecMemcpyNodeSetParams_fn = hip::hipGraphExecMemcpyNodeSetParams; + ptrDispatchTable->hipGraphExecMemcpyNodeSetParams1D_fn = hip::hipGraphExecMemcpyNodeSetParams1D; + ptrDispatchTable->hipGraphExecMemcpyNodeSetParamsFromSymbol_fn = + hip::hipGraphExecMemcpyNodeSetParamsFromSymbol; + ptrDispatchTable->hipGraphExecMemcpyNodeSetParamsToSymbol_fn = + hip::hipGraphExecMemcpyNodeSetParamsToSymbol; + ptrDispatchTable->hipGraphExecMemsetNodeSetParams_fn = hip::hipGraphExecMemsetNodeSetParams; + ptrDispatchTable->hipGraphExecUpdate_fn = hip::hipGraphExecUpdate; + ptrDispatchTable->hipGraphGetEdges_fn = hip::hipGraphGetEdges; + ptrDispatchTable->hipGraphGetNodes_fn = hip::hipGraphGetNodes; + ptrDispatchTable->hipGraphGetRootNodes_fn = hip::hipGraphGetRootNodes; + ptrDispatchTable->hipGraphHostNodeGetParams_fn = hip::hipGraphHostNodeGetParams; + ptrDispatchTable->hipGraphHostNodeSetParams_fn = hip::hipGraphHostNodeSetParams; + ptrDispatchTable->hipGraphInstantiate_fn = hip::hipGraphInstantiate; + ptrDispatchTable->hipGraphInstantiateWithFlags_fn = hip::hipGraphInstantiateWithFlags; + ptrDispatchTable->hipGraphKernelNodeCopyAttributes_fn = hip::hipGraphKernelNodeCopyAttributes; + ptrDispatchTable->hipGraphKernelNodeGetAttribute_fn = hip::hipGraphKernelNodeGetAttribute; + ptrDispatchTable->hipGraphKernelNodeGetParams_fn = hip::hipGraphKernelNodeGetParams; + ptrDispatchTable->hipGraphKernelNodeSetAttribute_fn = hip::hipGraphKernelNodeSetAttribute; + ptrDispatchTable->hipGraphKernelNodeSetParams_fn = hip::hipGraphKernelNodeSetParams; + ptrDispatchTable->hipGraphLaunch_fn = hip::hipGraphLaunch; + ptrDispatchTable->hipGraphMemAllocNodeGetParams_fn = hip::hipGraphMemAllocNodeGetParams; + ptrDispatchTable->hipGraphMemFreeNodeGetParams_fn = hip::hipGraphMemFreeNodeGetParams; + ptrDispatchTable->hipGraphMemcpyNodeGetParams_fn = hip::hipGraphMemcpyNodeGetParams; + ptrDispatchTable->hipGraphMemcpyNodeSetParams_fn = hip::hipGraphMemcpyNodeSetParams; + ptrDispatchTable->hipGraphMemcpyNodeSetParams1D_fn = hip::hipGraphMemcpyNodeSetParams1D; + ptrDispatchTable->hipGraphMemcpyNodeSetParamsFromSymbol_fn = + hip::hipGraphMemcpyNodeSetParamsFromSymbol; + ptrDispatchTable->hipGraphMemcpyNodeSetParamsToSymbol_fn = + hip::hipGraphMemcpyNodeSetParamsToSymbol; + ptrDispatchTable->hipGraphMemsetNodeGetParams_fn = hip::hipGraphMemsetNodeGetParams; + ptrDispatchTable->hipGraphMemsetNodeSetParams_fn = hip::hipGraphMemsetNodeSetParams; + ptrDispatchTable->hipGraphNodeFindInClone_fn = hip::hipGraphNodeFindInClone; + ptrDispatchTable->hipGraphNodeGetDependencies_fn = hip::hipGraphNodeGetDependencies; + ptrDispatchTable->hipGraphNodeGetDependentNodes_fn = hip::hipGraphNodeGetDependentNodes; + ptrDispatchTable->hipGraphNodeGetEnabled_fn = hip::hipGraphNodeGetEnabled; + ptrDispatchTable->hipGraphNodeGetType_fn = hip::hipGraphNodeGetType; + ptrDispatchTable->hipGraphNodeSetEnabled_fn = hip::hipGraphNodeSetEnabled; + ptrDispatchTable->hipGraphReleaseUserObject_fn = hip::hipGraphReleaseUserObject; + ptrDispatchTable->hipGraphRemoveDependencies_fn = hip::hipGraphRemoveDependencies; + ptrDispatchTable->hipGraphRetainUserObject_fn = hip::hipGraphRetainUserObject; + ptrDispatchTable->hipGraphUpload_fn = hip::hipGraphUpload; + ptrDispatchTable->hipGraphicsGLRegisterBuffer_fn = hip::hipGraphicsGLRegisterBuffer; + ptrDispatchTable->hipGraphicsGLRegisterImage_fn = hip::hipGraphicsGLRegisterImage; + ptrDispatchTable->hipGraphicsMapResources_fn = hip::hipGraphicsMapResources; + ptrDispatchTable->hipGraphicsResourceGetMappedPointer_fn = + hip::hipGraphicsResourceGetMappedPointer; + ptrDispatchTable->hipGraphicsSubResourceGetMappedArray_fn = + hip::hipGraphicsSubResourceGetMappedArray; + ptrDispatchTable->hipGraphicsUnmapResources_fn = hip::hipGraphicsUnmapResources; + ptrDispatchTable->hipGraphicsUnregisterResource_fn = hip::hipGraphicsUnregisterResource; + ptrDispatchTable->hipHostAlloc_fn = hip::hipHostAlloc; + ptrDispatchTable->hipHostFree_fn = hip::hipHostFree; + ptrDispatchTable->hipHostGetDevicePointer_fn = hip::hipHostGetDevicePointer; + ptrDispatchTable->hipHostGetFlags_fn = hip::hipHostGetFlags; + ptrDispatchTable->hipHostMalloc_fn = hip::hipHostMalloc; + ptrDispatchTable->hipHostRegister_fn = hip::hipHostRegister; + ptrDispatchTable->hipHostUnregister_fn = hip::hipHostUnregister; + ptrDispatchTable->hipImportExternalMemory_fn = hip::hipImportExternalMemory; + ptrDispatchTable->hipImportExternalSemaphore_fn = hip::hipImportExternalSemaphore; + ptrDispatchTable->hipInit_fn = hip::hipInit; + ptrDispatchTable->hipIpcCloseMemHandle_fn = hip::hipIpcCloseMemHandle; + ptrDispatchTable->hipIpcGetEventHandle_fn = hip::hipIpcGetEventHandle; + ptrDispatchTable->hipIpcGetMemHandle_fn = hip::hipIpcGetMemHandle; + ptrDispatchTable->hipIpcOpenEventHandle_fn = hip::hipIpcOpenEventHandle; + ptrDispatchTable->hipIpcOpenMemHandle_fn = hip::hipIpcOpenMemHandle; + ptrDispatchTable->hipKernelNameRef_fn = hip::hipKernelNameRef; + ptrDispatchTable->hipKernelNameRefByPtr_fn = hip::hipKernelNameRefByPtr; + ptrDispatchTable->hipLaunchByPtr_fn = hip::hipLaunchByPtr; + ptrDispatchTable->hipLaunchCooperativeKernel_fn = hip::hipLaunchCooperativeKernel; + ptrDispatchTable->hipLaunchCooperativeKernelMultiDevice_fn = + hip::hipLaunchCooperativeKernelMultiDevice; + ptrDispatchTable->hipLaunchHostFunc_fn = hip::hipLaunchHostFunc; + ptrDispatchTable->hipLaunchKernel_fn = hip::hipLaunchKernel; + ptrDispatchTable->hipMalloc_fn = hip::hipMalloc; + ptrDispatchTable->hipMalloc3D_fn = hip::hipMalloc3D; + ptrDispatchTable->hipMalloc3DArray_fn = hip::hipMalloc3DArray; + ptrDispatchTable->hipMallocArray_fn = hip::hipMallocArray; + ptrDispatchTable->hipMallocAsync_fn = hip::hipMallocAsync; + ptrDispatchTable->hipMallocFromPoolAsync_fn = hip::hipMallocFromPoolAsync; + ptrDispatchTable->hipMallocHost_fn = hip::hipMallocHost; + ptrDispatchTable->hipMallocManaged_fn = hip::hipMallocManaged; + ptrDispatchTable->hipMallocMipmappedArray_fn = hip::hipMallocMipmappedArray; + ptrDispatchTable->hipMallocPitch_fn = hip::hipMallocPitch; + ptrDispatchTable->hipMemAddressFree_fn = hip::hipMemAddressFree; + ptrDispatchTable->hipMemAddressReserve_fn = hip::hipMemAddressReserve; + ptrDispatchTable->hipMemAdvise_fn = hip::hipMemAdvise; + ptrDispatchTable->hipMemAllocHost_fn = hip::hipMemAllocHost; + ptrDispatchTable->hipMemAllocPitch_fn = hip::hipMemAllocPitch; + ptrDispatchTable->hipMemCreate_fn = hip::hipMemCreate; + ptrDispatchTable->hipMemExportToShareableHandle_fn = hip::hipMemExportToShareableHandle; + ptrDispatchTable->hipMemGetAccess_fn = hip::hipMemGetAccess; + ptrDispatchTable->hipMemGetAddressRange_fn = hip::hipMemGetAddressRange; + ptrDispatchTable->hipMemGetAllocationGranularity_fn = hip::hipMemGetAllocationGranularity; + ptrDispatchTable->hipMemGetAllocationPropertiesFromHandle_fn = + hip::hipMemGetAllocationPropertiesFromHandle; + ptrDispatchTable->hipMemGetInfo_fn = hip::hipMemGetInfo; + ptrDispatchTable->hipMemImportFromShareableHandle_fn = hip::hipMemImportFromShareableHandle; + ptrDispatchTable->hipMemMap_fn = hip::hipMemMap; + ptrDispatchTable->hipMemMapArrayAsync_fn = hip::hipMemMapArrayAsync; + ptrDispatchTable->hipMemPoolCreate_fn = hip::hipMemPoolCreate; + ptrDispatchTable->hipMemPoolDestroy_fn = hip::hipMemPoolDestroy; + ptrDispatchTable->hipMemPoolExportPointer_fn = hip::hipMemPoolExportPointer; + ptrDispatchTable->hipMemPoolExportToShareableHandle_fn = hip::hipMemPoolExportToShareableHandle; + ptrDispatchTable->hipMemPoolGetAccess_fn = hip::hipMemPoolGetAccess; + ptrDispatchTable->hipMemPoolGetAttribute_fn = hip::hipMemPoolGetAttribute; + ptrDispatchTable->hipMemPoolImportFromShareableHandle_fn = + hip::hipMemPoolImportFromShareableHandle; + ptrDispatchTable->hipMemPoolImportPointer_fn = hip::hipMemPoolImportPointer; + ptrDispatchTable->hipMemPoolSetAccess_fn = hip::hipMemPoolSetAccess; + ptrDispatchTable->hipMemPoolSetAttribute_fn = hip::hipMemPoolSetAttribute; + ptrDispatchTable->hipMemPoolTrimTo_fn = hip::hipMemPoolTrimTo; + ptrDispatchTable->hipMemPrefetchAsync_fn = hip::hipMemPrefetchAsync; + ptrDispatchTable->hipMemPtrGetInfo_fn = hip::hipMemPtrGetInfo; + ptrDispatchTable->hipMemRangeGetAttribute_fn = hip::hipMemRangeGetAttribute; + ptrDispatchTable->hipMemRangeGetAttributes_fn = hip::hipMemRangeGetAttributes; + ptrDispatchTable->hipMemRelease_fn = hip::hipMemRelease; + ptrDispatchTable->hipMemRetainAllocationHandle_fn = hip::hipMemRetainAllocationHandle; + ptrDispatchTable->hipMemSetAccess_fn = hip::hipMemSetAccess; + ptrDispatchTable->hipMemUnmap_fn = hip::hipMemUnmap; + ptrDispatchTable->hipMemcpy_fn = hip::hipMemcpy; + ptrDispatchTable->hipMemcpy2D_fn = hip::hipMemcpy2D; + ptrDispatchTable->hipMemcpy2DAsync_fn = hip::hipMemcpy2DAsync; + ptrDispatchTable->hipMemcpy2DFromArray_fn = hip::hipMemcpy2DFromArray; + ptrDispatchTable->hipMemcpy2DFromArrayAsync_fn = hip::hipMemcpy2DFromArrayAsync; + ptrDispatchTable->hipMemcpy2DToArray_fn = hip::hipMemcpy2DToArray; + ptrDispatchTable->hipMemcpy2DToArrayAsync_fn = hip::hipMemcpy2DToArrayAsync; + ptrDispatchTable->hipMemcpy3D_fn = hip::hipMemcpy3D; + ptrDispatchTable->hipMemcpy3DAsync_fn = hip::hipMemcpy3DAsync; + ptrDispatchTable->hipMemcpyAsync_fn = hip::hipMemcpyAsync; + ptrDispatchTable->hipMemcpyAtoH_fn = hip::hipMemcpyAtoH; + ptrDispatchTable->hipMemcpyDtoD_fn = hip::hipMemcpyDtoD; + ptrDispatchTable->hipMemcpyDtoDAsync_fn = hip::hipMemcpyDtoDAsync; + ptrDispatchTable->hipMemcpyDtoH_fn = hip::hipMemcpyDtoH; + ptrDispatchTable->hipMemcpyDtoHAsync_fn = hip::hipMemcpyDtoHAsync; + ptrDispatchTable->hipMemcpyFromArray_fn = hip::hipMemcpyFromArray; + ptrDispatchTable->hipMemcpyFromSymbol_fn = hip::hipMemcpyFromSymbol; + ptrDispatchTable->hipMemcpyFromSymbolAsync_fn = hip::hipMemcpyFromSymbolAsync; + ptrDispatchTable->hipMemcpyHtoA_fn = hip::hipMemcpyHtoA; + ptrDispatchTable->hipMemcpyHtoD_fn = hip::hipMemcpyHtoD; + ptrDispatchTable->hipMemcpyHtoDAsync_fn = hip::hipMemcpyHtoDAsync; + ptrDispatchTable->hipMemcpyParam2D_fn = hip::hipMemcpyParam2D; + ptrDispatchTable->hipMemcpyParam2DAsync_fn = hip::hipMemcpyParam2DAsync; + ptrDispatchTable->hipMemcpyPeer_fn = hip::hipMemcpyPeer; + ptrDispatchTable->hipMemcpyPeerAsync_fn = hip::hipMemcpyPeerAsync; + ptrDispatchTable->hipMemcpyToArray_fn = hip::hipMemcpyToArray; + ptrDispatchTable->hipMemcpyToSymbol_fn = hip::hipMemcpyToSymbol; + ptrDispatchTable->hipMemcpyToSymbolAsync_fn = hip::hipMemcpyToSymbolAsync; + ptrDispatchTable->hipMemcpyWithStream_fn = hip::hipMemcpyWithStream; + ptrDispatchTable->hipMemset_fn = hip::hipMemset; + ptrDispatchTable->hipMemset2D_fn = hip::hipMemset2D; + ptrDispatchTable->hipMemset2DAsync_fn = hip::hipMemset2DAsync; + ptrDispatchTable->hipMemset3D_fn = hip::hipMemset3D; + ptrDispatchTable->hipMemset3DAsync_fn = hip::hipMemset3DAsync; + ptrDispatchTable->hipMemsetAsync_fn = hip::hipMemsetAsync; + ptrDispatchTable->hipMemsetD16_fn = hip::hipMemsetD16; + ptrDispatchTable->hipMemsetD16Async_fn = hip::hipMemsetD16Async; + ptrDispatchTable->hipMemsetD32_fn = hip::hipMemsetD32; + ptrDispatchTable->hipMemsetD32Async_fn = hip::hipMemsetD32Async; + ptrDispatchTable->hipMemsetD8_fn = hip::hipMemsetD8; + ptrDispatchTable->hipMemsetD8Async_fn = hip::hipMemsetD8Async; + ptrDispatchTable->hipMipmappedArrayCreate_fn = hip::hipMipmappedArrayCreate; + ptrDispatchTable->hipMipmappedArrayDestroy_fn = hip::hipMipmappedArrayDestroy; + ptrDispatchTable->hipMipmappedArrayGetLevel_fn = hip::hipMipmappedArrayGetLevel; + ptrDispatchTable->hipModuleGetFunction_fn = hip::hipModuleGetFunction; + ptrDispatchTable->hipModuleGetGlobal_fn = hip::hipModuleGetGlobal; + ptrDispatchTable->hipModuleGetTexRef_fn = hip::hipModuleGetTexRef; + ptrDispatchTable->hipModuleLaunchCooperativeKernel_fn = hip::hipModuleLaunchCooperativeKernel; + ptrDispatchTable->hipModuleLaunchCooperativeKernelMultiDevice_fn = + hip::hipModuleLaunchCooperativeKernelMultiDevice; + ptrDispatchTable->hipModuleLaunchKernel_fn = hip::hipModuleLaunchKernel; + ptrDispatchTable->hipModuleLoad_fn = hip::hipModuleLoad; + ptrDispatchTable->hipModuleLoadData_fn = hip::hipModuleLoadData; + ptrDispatchTable->hipModuleLoadDataEx_fn = hip::hipModuleLoadDataEx; + ptrDispatchTable->hipModuleOccupancyMaxActiveBlocksPerMultiprocessor_fn = + hip::hipModuleOccupancyMaxActiveBlocksPerMultiprocessor; + ptrDispatchTable->hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_fn = + hip::hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags; + ptrDispatchTable->hipModuleOccupancyMaxPotentialBlockSize_fn = + hip::hipModuleOccupancyMaxPotentialBlockSize; + ptrDispatchTable->hipModuleOccupancyMaxPotentialBlockSizeWithFlags_fn = + hip::hipModuleOccupancyMaxPotentialBlockSizeWithFlags; + ptrDispatchTable->hipModuleUnload_fn = hip::hipModuleUnload; + ptrDispatchTable->hipOccupancyMaxActiveBlocksPerMultiprocessor_fn = + hip::hipOccupancyMaxActiveBlocksPerMultiprocessor; + ptrDispatchTable->hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_fn = + hip::hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags; + ptrDispatchTable->hipOccupancyMaxPotentialBlockSize_fn = hip::hipOccupancyMaxPotentialBlockSize; + ptrDispatchTable->hipPeekAtLastError_fn = hip::hipPeekAtLastError; + ptrDispatchTable->hipPointerGetAttribute_fn = hip::hipPointerGetAttribute; + ptrDispatchTable->hipPointerGetAttributes_fn = hip::hipPointerGetAttributes; + ptrDispatchTable->hipPointerSetAttribute_fn = hip::hipPointerSetAttribute; + ptrDispatchTable->hipProfilerStart_fn = hip::hipProfilerStart; + ptrDispatchTable->hipProfilerStop_fn = hip::hipProfilerStop; + ptrDispatchTable->hipRegisterTracerCallback_fn = hip::hipRegisterTracerCallback; + ptrDispatchTable->hipRuntimeGetVersion_fn = hip::hipRuntimeGetVersion; + ptrDispatchTable->hipSetDevice_fn = hip::hipSetDevice; + ptrDispatchTable->hipSetDeviceFlags_fn = hip::hipSetDeviceFlags; + ptrDispatchTable->hipSetupArgument_fn = hip::hipSetupArgument; + ptrDispatchTable->hipSignalExternalSemaphoresAsync_fn = hip::hipSignalExternalSemaphoresAsync; + ptrDispatchTable->hipStreamAddCallback_fn = hip::hipStreamAddCallback; + ptrDispatchTable->hipStreamAttachMemAsync_fn = hip::hipStreamAttachMemAsync; + ptrDispatchTable->hipStreamBeginCapture_fn = hip::hipStreamBeginCapture; + ptrDispatchTable->hipStreamCreate_fn = hip::hipStreamCreate; + ptrDispatchTable->hipStreamCreateWithFlags_fn = hip::hipStreamCreateWithFlags; + ptrDispatchTable->hipStreamCreateWithPriority_fn = hip::hipStreamCreateWithPriority; + ptrDispatchTable->hipStreamDestroy_fn = hip::hipStreamDestroy; + ptrDispatchTable->hipStreamEndCapture_fn = hip::hipStreamEndCapture; + ptrDispatchTable->hipStreamGetCaptureInfo_fn = hip::hipStreamGetCaptureInfo; + ptrDispatchTable->hipStreamGetCaptureInfo_v2_fn = hip::hipStreamGetCaptureInfo_v2; + ptrDispatchTable->hipStreamGetDevice_fn = hip::hipStreamGetDevice; + ptrDispatchTable->hipStreamGetFlags_fn = hip::hipStreamGetFlags; + ptrDispatchTable->hipStreamGetPriority_fn = hip::hipStreamGetPriority; + ptrDispatchTable->hipStreamIsCapturing_fn = hip::hipStreamIsCapturing; + ptrDispatchTable->hipStreamQuery_fn = hip::hipStreamQuery; + ptrDispatchTable->hipStreamSynchronize_fn = hip::hipStreamSynchronize; + ptrDispatchTable->hipStreamUpdateCaptureDependencies_fn = hip::hipStreamUpdateCaptureDependencies; + ptrDispatchTable->hipStreamWaitEvent_fn = hip::hipStreamWaitEvent; + ptrDispatchTable->hipStreamWaitValue32_fn = hip::hipStreamWaitValue32; + ptrDispatchTable->hipStreamWaitValue64_fn = hip::hipStreamWaitValue64; + ptrDispatchTable->hipStreamWriteValue32_fn = hip::hipStreamWriteValue32; + ptrDispatchTable->hipStreamWriteValue64_fn = hip::hipStreamWriteValue64; + ptrDispatchTable->hipTexObjectCreate_fn = hip::hipTexObjectCreate; + ptrDispatchTable->hipTexObjectDestroy_fn = hip::hipTexObjectDestroy; + ptrDispatchTable->hipTexObjectGetResourceDesc_fn = hip::hipTexObjectGetResourceDesc; + ptrDispatchTable->hipTexObjectGetResourceViewDesc_fn = hip::hipTexObjectGetResourceViewDesc; + ptrDispatchTable->hipTexObjectGetTextureDesc_fn = hip::hipTexObjectGetTextureDesc; + ptrDispatchTable->hipTexRefGetAddress_fn = hip::hipTexRefGetAddress; + ptrDispatchTable->hipTexRefGetAddressMode_fn = hip::hipTexRefGetAddressMode; + ptrDispatchTable->hipTexRefGetFilterMode_fn = hip::hipTexRefGetFilterMode; + ptrDispatchTable->hipTexRefGetFlags_fn = hip::hipTexRefGetFlags; + ptrDispatchTable->hipTexRefGetFormat_fn = hip::hipTexRefGetFormat; + ptrDispatchTable->hipTexRefGetMaxAnisotropy_fn = hip::hipTexRefGetMaxAnisotropy; + ptrDispatchTable->hipTexRefGetMipMappedArray_fn = hip::hipTexRefGetMipMappedArray; + ptrDispatchTable->hipTexRefGetMipmapFilterMode_fn = hip::hipTexRefGetMipmapFilterMode; + ptrDispatchTable->hipTexRefGetMipmapLevelBias_fn = hip::hipTexRefGetMipmapLevelBias; + ptrDispatchTable->hipTexRefGetMipmapLevelClamp_fn = hip::hipTexRefGetMipmapLevelClamp; + ptrDispatchTable->hipTexRefSetAddress_fn = hip::hipTexRefSetAddress; + ptrDispatchTable->hipTexRefSetAddress2D_fn = hip::hipTexRefSetAddress2D; + ptrDispatchTable->hipTexRefSetAddressMode_fn = hip::hipTexRefSetAddressMode; + ptrDispatchTable->hipTexRefSetArray_fn = hip::hipTexRefSetArray; + ptrDispatchTable->hipTexRefSetBorderColor_fn = hip::hipTexRefSetBorderColor; + ptrDispatchTable->hipTexRefSetFilterMode_fn = hip::hipTexRefSetFilterMode; + ptrDispatchTable->hipTexRefSetFlags_fn = hip::hipTexRefSetFlags; + ptrDispatchTable->hipTexRefSetFormat_fn = hip::hipTexRefSetFormat; + ptrDispatchTable->hipTexRefSetMaxAnisotropy_fn = hip::hipTexRefSetMaxAnisotropy; + ptrDispatchTable->hipTexRefSetMipmapFilterMode_fn = hip::hipTexRefSetMipmapFilterMode; + ptrDispatchTable->hipTexRefSetMipmapLevelBias_fn = hip::hipTexRefSetMipmapLevelBias; + ptrDispatchTable->hipTexRefSetMipmapLevelClamp_fn = hip::hipTexRefSetMipmapLevelClamp; + ptrDispatchTable->hipTexRefSetMipmappedArray_fn = hip::hipTexRefSetMipmappedArray; + ptrDispatchTable->hipThreadExchangeStreamCaptureMode_fn = hip::hipThreadExchangeStreamCaptureMode; + ptrDispatchTable->hipUnbindTexture_fn = hip::hipUnbindTexture; + ptrDispatchTable->hipUserObjectCreate_fn = hip::hipUserObjectCreate; + ptrDispatchTable->hipUserObjectRelease_fn = hip::hipUserObjectRelease; + ptrDispatchTable->hipUserObjectRetain_fn = hip::hipUserObjectRetain; + ptrDispatchTable->hipWaitExternalSemaphoresAsync_fn = hip::hipWaitExternalSemaphoresAsync; + ptrDispatchTable->hipCreateChannelDesc_fn = hip::hipCreateChannelDesc; + ptrDispatchTable->hipCreateSurfaceObject_fn = hip::hipCreateSurfaceObject; + ptrDispatchTable->hipExtModuleLaunchKernel_fn = hip::__hipExtModuleLaunchKernel; + ptrDispatchTable->hipHccModuleLaunchKernel_fn = hip::__hipHccModuleLaunchKernel; + ptrDispatchTable->hipMemcpy_spt_fn = hip::hipMemcpy_spt; + ptrDispatchTable->hipMemcpyToSymbol_spt_fn = hip::hipMemcpyToSymbol_spt; + ptrDispatchTable->hipMemcpyFromSymbol_spt_fn = hip::hipMemcpyFromSymbol_spt; + ptrDispatchTable->hipMemcpy2D_spt_fn = hip::hipMemcpy2D_spt; + ptrDispatchTable->hipMemcpy2DFromArray_spt_fn = hip::hipMemcpy2DFromArray_spt; + ptrDispatchTable->hipMemcpy3D_spt_fn = hip::hipMemcpy3D_spt; + ptrDispatchTable->hipMemset_spt_fn = hip::hipMemset_spt; + ptrDispatchTable->hipMemsetAsync_spt_fn = hip::hipMemsetAsync_spt; + ptrDispatchTable->hipMemset2D_spt_fn = hip::hipMemset2D_spt; + ptrDispatchTable->hipMemset2DAsync_spt_fn = hip::hipMemset2DAsync_spt; + ptrDispatchTable->hipMemset3DAsync_spt_fn = hip::hipMemset3DAsync_spt; + ptrDispatchTable->hipMemset3D_spt_fn = hip::hipMemset3D_spt; + ptrDispatchTable->hipMemcpyAsync_spt_fn = hip::hipMemcpyAsync_spt; + ptrDispatchTable->hipMemcpy3DAsync_spt_fn = hip::hipMemcpy3DAsync_spt; + ptrDispatchTable->hipMemcpy2DAsync_spt_fn = hip::hipMemcpy2DAsync_spt; + ptrDispatchTable->hipMemcpyFromSymbolAsync_spt_fn = hip::hipMemcpyFromSymbolAsync_spt; + ptrDispatchTable->hipMemcpyToSymbolAsync_spt_fn = hip::hipMemcpyToSymbolAsync_spt; + ptrDispatchTable->hipMemcpyFromArray_spt_fn = hip::hipMemcpyFromArray_spt; + ptrDispatchTable->hipMemcpy2DToArray_spt_fn = hip::hipMemcpy2DToArray_spt; + ptrDispatchTable->hipMemcpy2DFromArrayAsync_spt_fn = hip::hipMemcpy2DFromArrayAsync_spt; + ptrDispatchTable->hipMemcpy2DToArrayAsync_spt_fn = hip::hipMemcpy2DToArrayAsync_spt; + ptrDispatchTable->hipStreamQuery_spt_fn = hip::hipStreamQuery_spt; + ptrDispatchTable->hipStreamSynchronize_spt_fn = hip::hipStreamSynchronize_spt; + ptrDispatchTable->hipStreamGetPriority_spt_fn = hip::hipStreamGetPriority_spt; + ptrDispatchTable->hipStreamWaitEvent_spt_fn = hip::hipStreamWaitEvent_spt; + ptrDispatchTable->hipStreamGetFlags_spt_fn = hip::hipStreamGetFlags_spt; + ptrDispatchTable->hipStreamAddCallback_spt_fn = hip::hipStreamAddCallback_spt; + ptrDispatchTable->hipEventRecord_spt_fn = hip::hipEventRecord_spt; + ptrDispatchTable->hipLaunchCooperativeKernel_spt_fn = hip::hipLaunchCooperativeKernel_spt; + ptrDispatchTable->hipLaunchKernel_spt_fn = hip::hipLaunchKernel_spt; + ptrDispatchTable->hipGraphLaunch_spt_fn = hip::hipGraphLaunch_spt; + ptrDispatchTable->hipStreamBeginCapture_spt_fn = hip::hipStreamBeginCapture_spt; + ptrDispatchTable->hipStreamEndCapture_spt_fn = hip::hipStreamEndCapture_spt; + ptrDispatchTable->hipStreamIsCapturing_spt_fn = hip::hipStreamIsCapturing_spt; + ptrDispatchTable->hipStreamGetCaptureInfo_spt_fn = hip::hipStreamGetCaptureInfo_spt; + ptrDispatchTable->hipStreamGetCaptureInfo_v2_spt_fn = hip::hipStreamGetCaptureInfo_v2_spt; + ptrDispatchTable->hipLaunchHostFunc_spt_fn = hip::hipLaunchHostFunc_spt; + ptrDispatchTable->hipGetStreamDeviceId_fn = hip::hipGetStreamDeviceId; +} + +namespace hip { +namespace { + +void ToolCompilerInitImpl(std::string name, HipCompilerDispatchTable* ptr) { + // implementation of tool init +} +void ToolInit(std::string name, HipCompilerDispatchTable* ptr) { + static auto _once = std::once_flag{}; + std::call_once(_once, ToolCompilerInitImpl, name, ptr); +} +HipCompilerDispatchTable& GetHipCompilerDispatchTableImpl() { + // using a static inside a function prevents static initialization fiascos + static auto _v = HipCompilerDispatchTable{}; + _v.size = sizeof(HipCompilerDispatchTable); + return _v; +} +HipCompilerDispatchTable* LoadInitialHipCompilerDispatchTable() { + auto& hip_Compiler_Dispatch_table_ = hip::GetHipCompilerDispatchTableImpl(); + + // 2. Change all the function pointers to point to the HIP runtime implementation functions + UpdateHipCompilerDispatchTable(&hip_Compiler_Dispatch_table_); + + // 3. Profiler Registration + ToolInit("HipCompilerDispatchTable", &hip_Compiler_Dispatch_table_); + return &hip_Compiler_Dispatch_table_; +} + +void ToolInitImpl(std::string name, HipDispatchTable* ptr) { + // implementation of tool init +} +void ToolInit(std::string name, HipDispatchTable* ptr) { + static auto _once = std::once_flag{}; + std::call_once(_once, ToolInitImpl, name, ptr); +} +HipDispatchTable& GetHipDispatchTableImpl() { + // using a static inside a function prevents static initialization fiascos + static auto _v = HipDispatchTable{}; + _v.size = sizeof(HipDispatchTable); + return _v; +} +HipDispatchTable* LoadInitialHipDispatchTable() { + // 1. Initialize the HIP runtime optimize later + auto& hip_dispatch_table_ = hip::GetHipDispatchTableImpl(); + + // 2. Change all the function pointers to point to the HIP runtime implementation functions + UpdateHipDispatchTable(&hip_dispatch_table_); + + // 3. Profiler Registration + ToolInit("HipDispatchTable", &hip_dispatch_table_); + return &hip_dispatch_table_; +} +} // namespace +const HipDispatchTable* GetHipDispatchTable() { + static auto _v = LoadInitialHipDispatchTable(); + return _v; +} +const HipCompilerDispatchTable* GetHipCompilerDispatchTable() { + static auto _v = LoadInitialHipCompilerDispatchTable(); + return _v; +} +} // namespace hip diff --git a/hipamd/src/hip_code_object.cpp b/hipamd/src/hip_code_object.cpp index 92130aa077..95f8ab436f 100644 --- a/hipamd/src/hip_code_object.cpp +++ b/hipamd/src/hip_code_object.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include "hip_internal.hpp" #include "platform/program.hpp" #include - +namespace hip { hipError_t ihipFree(void* ptr); // forward declaration of methods required for managed variables hipError_t ihipMallocManaged(void** ptr, size_t size, unsigned int align = 0); @@ -59,8 +59,6 @@ struct __ClangOffloadBundleHeader { }; } // namespace -namespace hip { - bool CodeObject::IsClangOffloadMagicBundle(const void* data) { std::string magic(reinterpret_cast(data), kOffloadBundleMagicStrSize - 1); return magic.compare(kOffloadBundleMagicStr) ? false : true; @@ -532,7 +530,6 @@ hipError_t CodeObject::extractCodeObjectFromFatBinary( LogPrintfError(" %s - [Unsupported]", bundleEntryId.c_str()); } } - return hipErrorNoBinaryForGpu; } } @@ -906,4 +903,4 @@ hipError_t StatCO::initStatManagedVarDevicePtr(int deviceId) { } return err; } -}; // namespace hip +} // namespace hip diff --git a/hipamd/src/hip_code_object.hpp b/hipamd/src/hip_code_object.hpp index 1c784da934..bd0361f468 100644 --- a/hipamd/src/hip_code_object.hpp +++ b/hipamd/src/hip_code_object.hpp @@ -34,11 +34,10 @@ THE SOFTWARE. #include "device/device.hpp" #include "platform/program.hpp" +namespace hip { //Forward Declaration for friend usage class PlatformState; -namespace hip { - //Code Object base class class CodeObject { public: @@ -150,7 +149,7 @@ public: //pointer to the alocated managed memory has to be copied to the address of symbol hipError_t initStatManagedVarDevicePtr(int deviceId); private: - friend class ::PlatformState; + friend class hip::PlatformState; //Populated during __hipRegisterFatBinary std::unordered_map modules_; //Populated during __hipRegisterFuncs diff --git a/hipamd/src/hip_context.cpp b/hipamd/src/hip_context.cpp index 6ee0f31d44..cab3b4babf 100644 --- a/hipamd/src/hip_context.cpp +++ b/hipamd/src/hip_context.cpp @@ -25,13 +25,14 @@ #include "utils/flags.hpp" #include "utils/versions.hpp" -std::vector g_devices; std::once_flag g_ihipInitialized; + namespace hip { +std::vector g_devices; thread_local TlsAggregator tls; amd::Context* host_context = nullptr; -//init() is only to be called from the HIP_INIT macro only once +// init() is only to be called from the HIP_INIT macro only once void init(bool* status) { amd::IS_HIP = true; GPU_NUM_MEM_DEPENDENCY = 0; @@ -78,12 +79,10 @@ void init(bool* status) { return; } -Device* getCurrentDevice() { - return tls.device_; -} +Device* getCurrentDevice() { return tls.device_; } void setCurrentDevice(unsigned int index) { - assert(indexdevices()[0]->getPreferredNumaNode(); amd::Os::setPreferredNumaNode(preferredNumaNode); @@ -134,10 +133,6 @@ hip::Stream* getNullStream() { return device ? device->NullStream() : nullptr; } -}; - -using namespace hip; - hipError_t hipInit(unsigned int flags) { HIP_INIT_API(hipInit, flags); @@ -148,7 +143,7 @@ hipError_t hipInit(unsigned int flags) { HIP_RETURN(hipSuccess); } -hipError_t hipCtxCreate(hipCtx_t *ctx, unsigned int flags, hipDevice_t device) { +hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device) { HIP_INIT_API(hipCtxCreate, ctx, flags, device); if (static_cast(device) >= g_devices.size()) { @@ -169,12 +164,12 @@ hipError_t hipCtxSetCurrent(hipCtx_t ctx) { HIP_INIT_API(hipCtxSetCurrent, ctx); if (ctx == nullptr) { - if(!tls.ctxt_stack_.empty()) { + if (!tls.ctxt_stack_.empty()) { tls.ctxt_stack_.pop(); } } else { hip::tls.device_ = reinterpret_cast(ctx); - if(!tls.ctxt_stack_.empty()) { + if (!tls.ctxt_stack_.empty()) { tls.ctxt_stack_.pop(); } tls.ctxt_stack_.push(hip::getCurrentDevice()); @@ -199,7 +194,7 @@ hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig) { HIP_RETURN(hipSuccess); } -hipError_t hipRuntimeGetVersion(int *runtimeVersion) { +hipError_t hipRuntimeGetVersion(int* runtimeVersion) { HIP_INIT_API_NO_RETURN(hipRuntimeGetVersion, runtimeVersion); if (!runtimeVersion) { @@ -399,3 +394,4 @@ hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags) { HIP_RETURN(hipErrorContextAlreadyInUse); } } +} // namespace hip diff --git a/hipamd/src/hip_device.cpp b/hipamd/src/hip_device.cpp index 32cfdaf624..e0e34d9f33 100644 --- a/hipamd/src/hip_device.cpp +++ b/hipamd/src/hip_device.cpp @@ -147,8 +147,6 @@ Device::~Device() { } } -} // namespace hip - void ihipDestroyDevice() { for (auto deviceHandle : g_devices) { delete deviceHandle; @@ -648,4 +646,5 @@ extern "C" hipError_t hipGetDeviceProperties(hipDeviceProp_t* props, hipDevice_t *props = deviceProps; return hipSuccess; -} \ No newline at end of file +} +} // namespace hip diff --git a/hipamd/src/hip_device_runtime.cpp b/hipamd/src/hip_device_runtime.cpp index a728a8f946..7ece571b4a 100644 --- a/hipamd/src/hip_device_runtime.cpp +++ b/hipamd/src/hip_device_runtime.cpp @@ -22,6 +22,8 @@ #include "hip_internal.hpp" +namespace hip { + hipError_t hipChooseDevice(int* device, const hipDeviceProp_t* properties) { HIP_INIT_API(hipChooseDevice, device, properties); @@ -689,3 +691,4 @@ hipError_t hipSetValidDevices(int* device_arr, int len) { HIP_RETURN(hipErrorNotSupported); } +} //namespace hip diff --git a/hipamd/src/hip_error.cpp b/hipamd/src/hip_error.cpp index 7ffc1ce987..48515c245a 100644 --- a/hipamd/src/hip_error.cpp +++ b/hipamd/src/hip_error.cpp @@ -22,6 +22,8 @@ #include "hip_internal.hpp" +namespace hip { + hipError_t hipGetLastError() { HIP_INIT_API(hipGetLastError); @@ -380,3 +382,4 @@ hipError_t hipDrvGetErrorString(hipError_t hip_error, const char** errStr) return hipErrorInvalidValue; } } +} //namespace hip diff --git a/hipamd/src/hip_event.cpp b/hipamd/src/hip_event.cpp index 29ba533310..00d6b83bdd 100644 --- a/hipamd/src/hip_event.cpp +++ b/hipamd/src/hip_event.cpp @@ -277,7 +277,6 @@ bool isValid(hipEvent_t event) { return true; } -} // namespace hip // ================================================================================================ hipError_t ihipEventCreateWithFlags(hipEvent_t* event, unsigned flags) { unsigned supportedFlags = hipEventDefault | hipEventBlockingSync | hipEventDisableTiming | @@ -458,3 +457,4 @@ hipError_t hipEventQuery(hipEvent_t event) { HIP_INIT_API(hipEventQuery, event); HIP_RETURN(ihipEventQuery(event)); } +} // namespace hip diff --git a/hipamd/src/hip_event.hpp b/hipamd/src/hip_event.hpp index 1927242b0c..fed8b2d959 100644 --- a/hipamd/src/hip_event.hpp +++ b/hipamd/src/hip_event.hpp @@ -25,6 +25,7 @@ #include "thread/monitor.hpp" // Internal structure for stream callback handler +namespace hip { class StreamCallback { protected: void* userData_; @@ -64,7 +65,6 @@ class LaunchHostFuncCallback : public StreamCallback { void CL_CALLBACK ihipStreamCallback(cl_event event, cl_int command_exec_status, void* user_data); -namespace hip { #define IPC_SIGNALS_PER_EVENT 32 typedef struct ihipIpcEventShmem_s { @@ -226,11 +226,11 @@ class IPCEvent : public Event { hipError_t enqueueRecordCommand(hipStream_t stream, amd::Command* command, bool record); }; -}; // namespace hip struct CallbackData { int previous_read_index; hip::ihipIpcEventShmem_t* shmem; }; +} // namespace hip #endif // HIP_EVEMT_H diff --git a/hipamd/src/hip_event_ipc.cpp b/hipamd/src/hip_event_ipc.cpp index 706b3d4448..9c68e9f669 100644 --- a/hipamd/src/hip_event_ipc.cpp +++ b/hipamd/src/hip_event_ipc.cpp @@ -28,11 +28,10 @@ #endif // ================================================================================================ +namespace hip { hipError_t ihipEventCreateWithFlags(hipEvent_t* event, unsigned flags); -namespace hip { - bool IPCEvent::createIpcEventShmemIfNeeded() { if (ipc_evt_.ipc_shmem_) { // ipc_shmem_ already created, no need to create it again @@ -219,8 +218,6 @@ hipError_t IPCEvent::OpenHandle(ihipIpcEventHandle_t* handle) { return status; } -} // namespace hip - // ================================================================================================ hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t* handle, hipEvent_t event) { @@ -248,3 +245,4 @@ hipError_t hipIpcOpenEventHandle(hipEvent_t* event, hipIpcEventHandle_t handle) ihipIpcEventHandle_t* iHandle = reinterpret_cast(&handle); HIP_RETURN(e->OpenHandle(iHandle)); } +} // namespace hip diff --git a/hipamd/src/hip_gl.cpp b/hipamd/src/hip_gl.cpp index 5094085819..07b25dfa8b 100644 --- a/hipamd/src/hip_gl.cpp +++ b/hipamd/src/hip_gl.cpp @@ -30,6 +30,8 @@ namespace amd { static std::once_flag interopOnce; } + +namespace hip { // Sets up GL context association with amd context. // NOTE: Refer to Context setup code in OCLTestImp.cpp void setupGLInteropOnce() { @@ -767,3 +769,4 @@ hipError_t hipGraphicsUnregisterResource(hipGraphicsResource_t resource) { HIP_RETURN(hipSuccess); } +} // namespace hip \ No newline at end of file diff --git a/hipamd/src/hip_graph.cpp b/hipamd/src/hip_graph.cpp index f135c3bf9b..1334949a95 100644 --- a/hipamd/src/hip_graph.cpp +++ b/hipamd/src/hip_graph.cpp @@ -26,6 +26,8 @@ #include "hip_event.hpp" #include "hip_mempool_impl.hpp" +namespace hip { + std::vector g_captureStreams; amd::Monitor g_captureStreamsLock{"StreamCaptureGlobalList"}; amd::Monitor g_streamSetLock{"StreamCaptureset"}; @@ -2477,7 +2479,7 @@ hipError_t hipGraphRetainUserObject(hipGraph_t graph, hipUserObject_t object, un HIP_RETURN(hipSuccess); } if (flags != hipGraphUserObjectMove) { - status = hipUserObjectRetain(object, count); + status = hip::hipUserObjectRetain(object, count); if (status != hipSuccess) { HIP_RETURN(status); } @@ -2505,7 +2507,7 @@ hipError_t hipGraphReleaseUserObject(hipGraph_t graph, hipUserObject_t object, u if (userObject->referenceCount() == releaseCount) { g->RemoveUserObjGraph(userObject); } - hipError_t status = hipUserObjectRelease(object, count); + hipError_t status = hip::hipUserObjectRelease(object, count); HIP_RETURN(status); } @@ -2595,3 +2597,4 @@ hipError_t hipGraphUpload(hipGraphExec_t graphExec, hipStream_t stream) { // memory for memAlloc nodes if any when support is added with mempool feature HIP_RETURN(hipSuccess); } +} // namespace hip diff --git a/hipamd/src/hip_graph_capture.hpp b/hipamd/src/hip_graph_capture.hpp index 77a27a5dcd..f1d96898e4 100644 --- a/hipamd/src/hip_graph_capture.hpp +++ b/hipamd/src/hip_graph_capture.hpp @@ -19,6 +19,7 @@ THE SOFTWARE. */ #pragma once +namespace hip { // forward declaration of capture methods hipError_t capturehipLaunchKernel(hipStream_t& stream, const void*& hostFunction, dim3& gridDim, dim3& blockDim, void**& args, size_t& sharedMemBytes); @@ -97,3 +98,4 @@ hipError_t capturehipLaunchHostFunc(hipStream_t& stream, hipHostFn_t& fn, void*& hipError_t capturehipMallocAsync(hipStream_t stream, hipMemPool_t mem_pool, size_t size, void** dev_ptr); hipError_t capturehipFreeAsync(hipStream_t stream, void* dev_ptr); +} \ No newline at end of file diff --git a/hipamd/src/hip_graph_helper.hpp b/hipamd/src/hip_graph_helper.hpp index 1b8bf34516..e77954d3d8 100644 --- a/hipamd/src/hip_graph_helper.hpp +++ b/hipamd/src/hip_graph_helper.hpp @@ -22,6 +22,7 @@ THE SOFTWARE. #include "hip_conversions.hpp" +namespace hip { hipError_t ihipMemcpy3D_validate(const hipMemcpy3DParms* p); hipError_t ihipDrvMemcpy3D_validate(const HIP_MEMCPY3D* pCopy); @@ -51,11 +52,11 @@ hipError_t ihipMemset3D_validate(hipPitchedPtr pitchedDevPtr, int value, hipExte hipError_t ihipLaunchKernelCommand(amd::Command*& command, hipFunction_t f, uint32_t globalWorkSizeX, uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, uint32_t blockDimX, uint32_t blockDimY, - uint32_t blockDimZ, uint32_t sharedMemBytes, - hip::Stream* stream, void** kernelParams, void** extra, - hipEvent_t startEvent, hipEvent_t stopEvent, uint32_t flags, - uint32_t params, uint32_t gridId, uint32_t numGrids, - uint64_t prevGridSum, uint64_t allGridSum, uint32_t firstDevice); + uint32_t blockDimZ, uint32_t sharedMemBytes, hip::Stream* stream, + void** kernelParams, void** extra, hipEvent_t startEvent, + hipEvent_t stopEvent, uint32_t flags, uint32_t params, + uint32_t gridId, uint32_t numGrids, uint64_t prevGridSum, + uint64_t allGridSum, uint32_t firstDevice); hipError_t ihipMemcpy3DCommand(amd::Command*& command, const hipMemcpy3DParms* p, hip::Stream* stream); @@ -67,7 +68,8 @@ hipError_t ihipMemsetCommand(std::vector& commands, void* dst, in size_t valueSize, size_t sizeBytes, hip::Stream* stream); hipError_t ihipMemset3DCommand(std::vector& commands, hipPitchedPtr pitchedDevPtr, - int value, hipExtent extent, hip::Stream* stream, size_t elementSize = 1); + int value, hipExtent extent, hip::Stream* stream, + size_t elementSize = 1); hipError_t ihipMemcpySymbol_validate(const void* symbol, size_t sizeBytes, size_t offset, size_t& sym_size, hipDeviceptr_t& device_ptr); @@ -121,3 +123,4 @@ hipError_t ihipMemcpyAtoHValidate(hipArray_t srcArray, void* dstHost, amd::Coord size_t &start); hipError_t ihipGraphMemsetParams_validate(const hipMemsetParams* pNodeParams); +} // namespace hip \ No newline at end of file diff --git a/hipamd/src/hip_hcc.map.in b/hipamd/src/hip_hcc.map.in index 3e92924d91..1bec29f25c 100644 --- a/hipamd/src/hip_hcc.map.in +++ b/hipamd/src/hip_hcc.map.in @@ -235,7 +235,7 @@ global: hipTexRefGetMipmapFilterMode; hipTexRefGetMipmapLevelBias; hipTexRefGetMipmapLevelClamp; - hipTexRefGetMipmappedArray; + hipTexRefGetMipMappedArray; hipTexRefSetAddress; hipTexRefSetAddress2D; hipTexRefSetAddressMode; diff --git a/hipamd/src/hip_hmm.cpp b/hipamd/src/hip_hmm.cpp index 2e9c03ff1b..57270d942c 100644 --- a/hipamd/src/hip_hmm.cpp +++ b/hipamd/src/hip_hmm.cpp @@ -25,6 +25,8 @@ #include "platform/command.hpp" #include "platform/memory.hpp" +namespace hip { + // Forward declaraiton of a function hipError_t ihipMallocManaged(void** ptr, size_t size, unsigned int align = 0); @@ -304,3 +306,4 @@ hipError_t ihipMallocManaged(void** ptr, size_t size, unsigned int align) { ClPrint(amd::LOG_INFO, amd::LOG_API, "ihipMallocManaged ptr=0x%zx", *ptr); return hipSuccess; } +} //namespace hip diff --git a/hipamd/src/hip_intercept.cpp b/hipamd/src/hip_intercept.cpp index da0a699bd3..2445ef2fa3 100644 --- a/hipamd/src/hip_intercept.cpp +++ b/hipamd/src/hip_intercept.cpp @@ -24,11 +24,10 @@ #include "hip_prof_api.h" // HIP API callback/activity +namespace hip { extern const std::string& FunctionName(const hipFunction_t f); -extern "C" { - int hipGetStreamDeviceId(hipStream_t stream) { if (!hip::isValid(stream)) { return -1; @@ -47,11 +46,12 @@ const char* hipKernelNameRefByPtr(const void* host_function, hipStream_t stream) : nullptr; } -void hipRegisterTracerCallback(int (*function)(activity_domain_t domain, uint32_t operation_id, - void* data)) { - activity_prof::report_activity.store(function, std::memory_order_relaxed); +void hipRegisterTracerCallback(const void* function) { + typedef int (*fptr)(activity_domain_t domain, uint32_t operation_id, void* data); + fptr my_fptr = reinterpret_cast(function); + activity_prof::report_activity.store(my_fptr, std::memory_order_relaxed); } const char* hipApiName(uint32_t id) { return hip_api_name(id); } -} // extern "C" +} // namespace hip diff --git a/hipamd/src/hip_internal.hpp b/hipamd/src/hip_internal.hpp index 81b91a7aa1..ac63466c17 100644 --- a/hipamd/src/hip_internal.hpp +++ b/hipamd/src/hip_internal.hpp @@ -52,20 +52,7 @@ #define IHIP_IPC_MEM_HANDLE_SIZE 32 #define IHIP_IPC_MEM_RESERVED_SIZE LP64_SWITCH(20,12) -namespace hip { -struct Graph; -struct GraphNode; -struct GraphExec; -struct UserObject; -} - -typedef struct ihipIpcMemHandle_st { - char ipc_handle[IHIP_IPC_MEM_HANDLE_SIZE]; ///< ipc memory handle on ROCr - size_t psize; - size_t poffset; - int owners_process_id; - char reserved[IHIP_IPC_MEM_RESERVED_SIZE]; -} ihipIpcMemHandle_t; +extern std::once_flag g_ihipInitialized; typedef struct hipArray { void* data; // FIXME: generalize this @@ -81,6 +68,19 @@ typedef struct hipArray { unsigned int flags; }hipArray; +namespace hip { +struct Graph; +struct GraphNode; +struct GraphExec; +struct UserObject; +typedef struct ihipIpcMemHandle_st { + char ipc_handle[IHIP_IPC_MEM_HANDLE_SIZE]; ///< ipc memory handle on ROCr + size_t psize; + size_t poffset; + int owners_process_id; + char reserved[IHIP_IPC_MEM_RESERVED_SIZE]; +} ihipIpcMemHandle_t; + #define IHIP_IPC_EVENT_HANDLE_SIZE 32 #define IHIP_IPC_EVENT_RESERVED_SIZE LP64_SWITCH(28,24) typedef struct ihipIpcEventHandle_st { @@ -91,18 +91,18 @@ typedef struct ihipIpcEventHandle_st { }ihipIpcEventHandle_t; const char* ihipGetErrorName(hipError_t hip_error); +} -extern std::once_flag g_ihipInitialized; #define HIP_INIT(noReturn) \ { \ bool status = true; \ std::call_once(g_ihipInitialized, hip::init, &status); \ - if (!status && !noReturn) { \ + if (!status && !noReturn) { \ HIP_RETURN(hipErrorInvalidDevice); \ } \ - if (hip::tls.device_ == nullptr && g_devices.size() > 0) { \ - hip::tls.device_ = g_devices[0]; \ - amd::Os::setPreferredNumaNode(g_devices[0]->devices()[0]->getPreferredNumaNode()); \ + if (hip::tls.device_ == nullptr && hip::g_devices.size() > 0) { \ + hip::tls.device_ = hip::g_devices[0]; \ + amd::Os::setPreferredNumaNode(hip::g_devices[0]->devices()[0]->getPreferredNumaNode()); \ } \ } @@ -110,9 +110,9 @@ extern std::once_flag g_ihipInitialized; { \ bool status = true; \ std::call_once(g_ihipInitialized, hip::init, &status); \ - if (hip::tls.device_ == nullptr && g_devices.size() > 0) { \ - hip::tls.device_ = g_devices[0]; \ - amd::Os::setPreferredNumaNode(g_devices[0]->devices()[0]->getPreferredNumaNode()); \ + if (hip::tls.device_ == nullptr && hip::g_devices.size() > 0) { \ + hip::tls.device_ = hip::g_devices[0]; \ + amd::Os::setPreferredNumaNode(hip::g_devices[0]->devices()[0]->getPreferredNumaNode()); \ } \ } @@ -125,37 +125,36 @@ extern std::once_flag g_ihipInitialized; #define HIP_ERROR_PRINT(err, ...) \ ClPrint(amd::LOG_INFO, amd::LOG_API, "%s: Returned %s : %s", \ - __func__, ihipGetErrorName(err), ToString( __VA_ARGS__ ).c_str()); + __func__, hip::ihipGetErrorName(err), ToString( __VA_ARGS__ ).c_str()); -#define HIP_INIT_API_INTERNAL(noReturn, cid, ...) \ - amd::Thread* thread = amd::Thread::current(); \ - if (!VDI_CHECK_THREAD(thread)) { \ - ClPrint(amd::LOG_NONE, amd::LOG_ALWAYS, "An internal error has occurred." \ - " This may be due to insufficient memory."); \ - if (!noReturn) { \ - return hipErrorOutOfMemory; \ - } \ - } \ - HIP_INIT(noReturn) \ - HIP_API_PRINT(__VA_ARGS__) \ +#define HIP_INIT_API_INTERNAL(noReturn, cid, ...) \ + amd::Thread* thread = amd::Thread::current(); \ + if (!VDI_CHECK_THREAD(thread)) { \ + ClPrint(amd::LOG_NONE, amd::LOG_ALWAYS, \ + "An internal error has occurred." \ + " This may be due to insufficient memory."); \ + if (!noReturn) { \ + return hipErrorOutOfMemory; \ + } \ + } \ + HIP_INIT(noReturn) \ + HIP_API_PRINT(__VA_ARGS__) \ HIP_CB_SPAWNER_OBJECT(cid); // This macro should be called at the beginning of every HIP API. #define HIP_INIT_API(cid, ...) \ HIP_INIT_API_INTERNAL(0, cid, __VA_ARGS__) \ - if (g_devices.size() == 0) { \ + if (hip::g_devices.size() == 0) { \ HIP_RETURN(hipErrorNoDevice); \ } #define HIP_INIT_API_NO_RETURN(cid, ...) \ HIP_INIT_API_INTERNAL(1, cid, __VA_ARGS__) -#define HIP_RETURN_DURATION(ret, ...) \ - hip::tls.last_error_ = ret; \ - HIPPrintDuration(amd::LOG_INFO, amd::LOG_API, &startTimeUs, \ - "%s: Returned %s : %s", \ - __func__, ihipGetErrorName(hip::tls.last_error_), \ - ToString( __VA_ARGS__ ).c_str()); \ +#define HIP_RETURN_DURATION(ret, ...) \ + hip::tls.last_error_ = ret; \ + HIPPrintDuration(amd::LOG_INFO, amd::LOG_API, &startTimeUs, "%s: Returned %s : %s", __func__, \ + hip::ihipGetErrorName(hip::tls.last_error_), ToString(__VA_ARGS__).c_str()); \ return hip::tls.last_error_; #define HIP_RETURN(ret, ...) \ @@ -202,11 +201,11 @@ extern std::once_flag g_ihipInitialized; } #define STREAM_CAPTURE(name, stream, ...) \ - getStreamPerThread(stream); \ + hip::getStreamPerThread(stream); \ if (stream != nullptr && \ reinterpret_cast(stream)->GetCaptureStatus() == \ hipStreamCaptureStatusActive) { \ - hipError_t status = capture##name(stream, ##__VA_ARGS__); \ + hipError_t status = hip::capture##name(stream, ##__VA_ARGS__); \ return status; \ } @@ -228,6 +227,7 @@ struct ihipExec_t { std::vector arguments_; }; +namespace hip { class stream_per_thread { private: std::vector m_streams; @@ -239,7 +239,6 @@ public: hipStream_t get(); }; -namespace hip { class Device; class MemoryPool; class Stream : public amd::HostQueue { @@ -581,40 +580,41 @@ namespace hip { extern bool isValid(hipEvent_t event); extern amd::Monitor hipArraySetLock; extern std::unordered_set hipArraySet; -}; // namespace hip -extern void WaitThenDecrementSignal(hipStream_t stream, hipError_t status, void* user_data); + extern void WaitThenDecrementSignal(hipStream_t stream, hipError_t status, void* user_data); -/// Wait all active streams on the blocking queue. The method enqueues a wait command and -/// doesn't stall the current thread -extern void iHipWaitActiveStreams(hip::Stream* blocking_stream, bool wait_null_stream = false); + /// Wait all active streams on the blocking queue. The method enqueues a wait command and + /// doesn't stall the current thread + extern void iHipWaitActiveStreams(hip::Stream* blocking_stream, bool wait_null_stream = false); -extern std::vector g_devices; -extern hipError_t ihipDeviceGetCount(int* count); -extern int ihipGetDevice(); + extern std::vector g_devices; + extern hipError_t ihipDeviceGetCount(int* count); + extern int ihipGetDevice(); -extern hipError_t ihipMalloc(void** ptr, size_t sizeBytes, unsigned int flags); -extern amd::Memory* getMemoryObject(const void* ptr, size_t& offset, size_t size = 0); -extern amd::Memory* getMemoryObjectWithOffset(const void* ptr, const size_t size = 0); -extern void getStreamPerThread(hipStream_t& stream); -extern hipStream_t getPerThreadDefaultStream(); -extern hipError_t ihipUnbindTexture(textureReference* texRef); -extern hipError_t ihipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags); -extern hipError_t ihipHostUnregister(void* hostPtr); -extern hipError_t ihipGetDeviceProperties(hipDeviceProp_t* props, hipDevice_t device); + extern hipError_t ihipMalloc(void** ptr, size_t sizeBytes, unsigned int flags); + extern amd::Memory* getMemoryObject(const void* ptr, size_t& offset, size_t size = 0); + extern amd::Memory* getMemoryObjectWithOffset(const void* ptr, const size_t size = 0); + extern void getStreamPerThread(hipStream_t& stream); + extern hipStream_t getPerThreadDefaultStream(); + extern hipError_t ihipUnbindTexture(textureReference* texRef); + extern hipError_t ihipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags); + extern hipError_t ihipHostUnregister(void* hostPtr); + extern hipError_t ihipGetDeviceProperties(hipDeviceProp_t* props, hipDevice_t device); -extern hipError_t ihipDeviceGet(hipDevice_t* device, int deviceId); -extern hipError_t ihipStreamOperation(hipStream_t stream, cl_command_type cmdType, void* ptr, - uint64_t value, uint64_t mask, unsigned int flags, size_t sizeBytes); -hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind, - hip::Stream& stream, bool isHostAsync = false, bool isGPUAsync = true); -constexpr bool kOptionChangeable = true; -constexpr bool kNewDevProg = false; + extern hipError_t ihipDeviceGet(hipDevice_t* device, int deviceId); + extern hipError_t ihipStreamOperation(hipStream_t stream, cl_command_type cmdType, void* ptr, + uint64_t value, uint64_t mask, unsigned int flags, + size_t sizeBytes); + hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind, + hip::Stream& stream, bool isHostAsync = false, bool isGPUAsync = true); + constexpr bool kOptionChangeable = true; + constexpr bool kNewDevProg = false; -constexpr bool kMarkerDisableFlush = true; //!< Avoids command batch flush in ROCclr + constexpr bool kMarkerDisableFlush = true; //!< Avoids command batch flush in ROCclr -extern std::vector g_captureStreams; -extern amd::Monitor g_captureStreamsLock; -extern amd::Monitor g_streamSetLock; -extern std::unordered_set g_allCapturingStreams; -#endif // HIP_SRC_HIP_INTERNAL_H + extern std::vector g_captureStreams; + extern amd::Monitor g_captureStreamsLock; + extern amd::Monitor g_streamSetLock; + extern std::unordered_set g_allCapturingStreams; +} // namespace hip +#endif // HIP_SRC_HIP_INTERNAL_H diff --git a/hipamd/src/hip_memory.cpp b/hipamd/src/hip_memory.cpp index 6085f26f1d..7b286963a3 100644 --- a/hipamd/src/hip_memory.cpp +++ b/hipamd/src/hip_memory.cpp @@ -26,9 +26,10 @@ #include "platform/command.hpp" #include "platform/memory.hpp" #include "platform/external_memory.hpp" +namespace hip { -amd::Monitor hip::hipArraySetLock{"Guards global hipArray set"}; -std::unordered_set hip::hipArraySet; +amd::Monitor hipArraySetLock{"Guards global hipArray set"}; +std::unordered_set hipArraySet; // ================================================================================================ amd::Memory* getMemoryObject(const void* ptr, size_t& offset, size_t size) { @@ -727,7 +728,7 @@ hipError_t ihipArrayDestroy(hipArray_t array) { return hipErrorInvalidValue; } { - amd::ScopedLock lock(hip::hipArraySetLock); + amd::ScopedLock lock(hipArraySetLock); if (hip::hipArraySet.find(array) == hip::hipArraySet.end()) { return hipErrorContextIsDestroyed; } else { @@ -1101,7 +1102,7 @@ hipError_t ihipArrayCreate(hipArray_t* array, (*array)->NumChannels = pAllocateArray->NumChannels; (*array)->flags = pAllocateArray->Flags; { - amd::ScopedLock lock(hip::hipArraySetLock); + amd::ScopedLock lock(hipArraySetLock); hip::hipArraySet.insert(*array); } return hipSuccess; @@ -3859,7 +3860,7 @@ hipError_t hipArrayDestroy(hipArray_t array) { hipError_t ihipArray3DGetDescriptor(HIP_ARRAY3D_DESCRIPTOR* desc, hipArray_t array) { { - amd::ScopedLock lock(hip::hipArraySetLock); + amd::ScopedLock lock(hipArraySetLock); if (hip::hipArraySet.find(array) == hip::hipArraySet.end()) { return hipErrorInvalidHandle; } @@ -4267,7 +4268,7 @@ hipError_t ihipMipmappedArrayGetLevel(hipArray_t* level_array_pptr, (*level_array_pptr)->textureType = 0; (*level_array_pptr)->flags = mipmapped_array_ptr->flags; - amd::ScopedLock lock(hip::hipArraySetLock); + amd::ScopedLock lock(hipArraySetLock); hip::hipArraySet.insert(*level_array_pptr); return hipSuccess; @@ -4360,4 +4361,4 @@ hipError_t hipExternalMemoryGetMappedMipmappedArray( HIP_RETURN(ihipMipmapArrayCreate(mipmap, &allocateArray, mipmapDesc->numLevels, (size_t)mipmapDesc->offset, buf)); } - +} // namespace hip diff --git a/hipamd/src/hip_mempool.cpp b/hipamd/src/hip_mempool.cpp index eac005a962..675f7a3e0b 100644 --- a/hipamd/src/hip_mempool.cpp +++ b/hipamd/src/hip_mempool.cpp @@ -20,6 +20,7 @@ #include "hip_mempool_impl.hpp" +namespace hip { /** * API interfaces */ @@ -386,3 +387,4 @@ hipError_t hipMemPoolImportPointer( mpool->retain(); HIP_RETURN(hipSuccess); } +} // namespace hip diff --git a/hipamd/src/hip_module.cpp b/hipamd/src/hip_module.cpp index ea57b2e269..93fa193c23 100644 --- a/hipamd/src/hip_module.cpp +++ b/hipamd/src/hip_module.cpp @@ -27,6 +27,7 @@ #include "hip_event.hpp" #include "hip_platform.hpp" +namespace hip { hipError_t ihipModuleLoadData(hipModule_t* module, const void* mmap_ptr, size_t mmap_size); extern hipError_t ihipLaunchKernel(const void* hostFunction, dim3 gridDim, dim3 blockDim, @@ -460,7 +461,7 @@ hipError_t hipModuleLaunchKernel(hipFunction_t f, uint32_t gridDimX, uint32_t gr hStream, kernelParams, extra, nullptr, nullptr)); } -hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, +hipError_t __hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, uint32_t localWorkSizeX, uint32_t localWorkSizeY, uint32_t localWorkSizeZ, size_t sharedMemBytes, @@ -484,7 +485,7 @@ hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, } -hipError_t hipHccModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, +hipError_t __hipHccModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, uint32_t blockDimX, uint32_t blockDimY, uint32_t blockDimZ, size_t sharedMemBytes, hipStream_t hStream, void** kernelParams, @@ -655,7 +656,7 @@ hipError_t hipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams* } -extern "C" hipError_t hipLaunchKernel_common(const void* hostFunction, dim3 gridDim, dim3 blockDim, + hipError_t hipLaunchKernel_common(const void* hostFunction, dim3 gridDim, dim3 blockDim, void** args, size_t sharedMemBytes, hipStream_t stream) { STREAM_CAPTURE(hipLaunchKernel, stream, hostFunction, gridDim, blockDim, args, sharedMemBytes); @@ -663,20 +664,20 @@ extern "C" hipError_t hipLaunchKernel_common(const void* hostFunction, dim3 grid nullptr, 0); } -extern "C" hipError_t hipLaunchKernel(const void* hostFunction, dim3 gridDim, dim3 blockDim, + hipError_t hipLaunchKernel(const void* hostFunction, dim3 gridDim, dim3 blockDim, void** args, size_t sharedMemBytes, hipStream_t stream) { HIP_INIT_API(hipLaunchKernel, hostFunction, gridDim, blockDim, args, sharedMemBytes, stream); HIP_RETURN(hipLaunchKernel_common(hostFunction, gridDim, blockDim, args, sharedMemBytes, stream)); } -extern "C" hipError_t hipLaunchKernel_spt(const void* hostFunction, dim3 gridDim, dim3 blockDim, +hipError_t hipLaunchKernel_spt(const void* hostFunction, dim3 gridDim, dim3 blockDim, void** args, size_t sharedMemBytes, hipStream_t stream) { HIP_INIT_API(hipLaunchKernel, hostFunction, gridDim, blockDim, args, sharedMemBytes, stream); PER_THREAD_DEFAULT_STREAM(stream); HIP_RETURN(hipLaunchKernel_common(hostFunction, gridDim, blockDim, args, sharedMemBytes, stream)); } -extern "C" hipError_t hipExtLaunchKernel(const void* hostFunction, dim3 gridDim, dim3 blockDim, +hipError_t hipExtLaunchKernel(const void* hostFunction, dim3 gridDim, dim3 blockDim, void** args, size_t sharedMemBytes, hipStream_t stream, hipEvent_t startEvent, hipEvent_t stopEvent, int flags) { HIP_INIT_API(hipExtLaunchKernel, hostFunction, gridDim, blockDim, args, sharedMemBytes, @@ -840,3 +841,4 @@ hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const HIP_RETURN(err); } +} // namespace hip diff --git a/hipamd/src/hip_peer.cpp b/hipamd/src/hip_peer.cpp index cadb7c1035..e309b73129 100644 --- a/hipamd/src/hip_peer.cpp +++ b/hipamd/src/hip_peer.cpp @@ -22,31 +22,7 @@ #include "hip_internal.hpp" -hipError_t hipDeviceCanAccessPeer(int* canAccessPeer, hipCtx_t thisCtx, hipCtx_t peerCtx) { - HIP_INIT_API(NONE, canAccessPeer, thisCtx, peerCtx); - - assert(0 && "Unimplemented"); - - HIP_RETURN(hipErrorNotSupported); -} - -hipError_t hipMemcpyPeer(void* dst, hipCtx_t dstCtx, const void* src, hipCtx_t srcCtx, - size_t sizeBytes) { - HIP_INIT_API(NONE, dst, dstCtx, src, srcCtx, sizeBytes); - - assert(0 && "Unimplemented"); - - HIP_RETURN(hipErrorNotSupported); -} - -hipError_t hipMemcpyPeerAsync(void* dst, hipCtx_t dstDevice, const void* src, hipCtx_t srcDevice, - size_t sizeBytes, hipStream_t stream) { - HIP_INIT_API(NONE, dst, dstDevice, src, srcDevice, sizeBytes, stream); - - assert(0 && "Unimplemented"); - - HIP_RETURN(hipErrorNotSupported); -} +namespace hip { hipError_t canAccessPeer(int* canAccessPeer, int deviceId, int peerDeviceId){ amd::Device* device = nullptr; @@ -254,3 +230,4 @@ hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx) { HIP_RETURN(hipSuccess); } +} // namespace hip diff --git a/hipamd/src/hip_platform.cpp b/hipamd/src/hip_platform.cpp index 9ed1ee2ea8..66773ba480 100644 --- a/hipamd/src/hip_platform.cpp +++ b/hipamd/src/hip_platform.cpp @@ -26,7 +26,7 @@ #include "platform/runtime.hpp" #include - +namespace hip { constexpr unsigned __hipFatMAGIC2 = 0x48495046; // "HIPF" PlatformState* PlatformState::platform_; // Initiaized as nullptr by default @@ -67,17 +67,17 @@ static bool isCompatibleCodeObject(const std::string& codeobj_target_id, const c return codeobj_target_id == short_name; } -extern "C" hip::FatBinaryInfo** __hipRegisterFatBinary(const void* data) { +void** __hipRegisterFatBinary(const void* data) { const __CudaFatBinaryWrapper* fbwrapper = reinterpret_cast(data); if (fbwrapper->magic != __hipFatMAGIC2 || fbwrapper->version != 1) { LogPrintfError("Cannot Register fat binary. FatMagic: %u version: %u ", fbwrapper->magic, fbwrapper->version); return nullptr; } - return PlatformState::instance().addFatBinary(fbwrapper->binary); + return reinterpret_cast(PlatformState::instance().addFatBinary(fbwrapper->binary)); } -extern "C" void __hipRegisterFunction(hip::FatBinaryInfo** modules, const void* hostFunction, +void __hipRegisterFunction(hip::FatBinaryInfo** modules, const void* hostFunction, char* deviceFunction, const char* deviceName, unsigned int threadLimit, uint3* tid, uint3* bid, dim3* blockDim, dim3* gridDim, int* wSize) { @@ -107,7 +107,7 @@ extern "C" void __hipRegisterFunction(hip::FatBinaryInfo** modules, const void* // global variable in host code. The shadow host variable is used to keep // track of the value of the device side global variable between kernel // executions. -extern "C" void __hipRegisterVar( +void __hipRegisterVar( hip::FatBinaryInfo** modules, // The device modules containing code object void* var, // The shadow variable in host code char* hostVar, // Variable name in host code @@ -123,7 +123,7 @@ extern "C" void __hipRegisterVar( guarantee((err == hipSuccess), "Cannot register Static Global Var, error:%d \n", err); } -extern "C" void __hipRegisterSurface( +void __hipRegisterSurface( hip::FatBinaryInfo** modules, // The device modules containing code object void* var, // The shadow variable in host code char* hostVar, // Variable name in host code @@ -135,7 +135,7 @@ extern "C" void __hipRegisterSurface( guarantee((err == hipSuccess), "Cannot register Static Glbal Var, err:%d \n", err); } -extern "C" void __hipRegisterManagedVar( +void __hipRegisterManagedVar( void* hipModule, // Pointer to hip module returned from __hipRegisterFatbinary void** pointer, // Pointer to a chunk of managed memory with size \p size and alignment \p // align HIP runtime allocates such managed memory and assign it to \p pointer @@ -162,7 +162,7 @@ extern "C" void __hipRegisterManagedVar( guarantee((status == hipSuccess), "Cannot register Static Managed Var, error: %d \n", status); } -extern "C" void __hipRegisterTexture( +void __hipRegisterTexture( hip::FatBinaryInfo** modules, // The device modules containing code object void* var, // The shadow variable in host code char* hostVar, // Variable name in host code @@ -174,12 +174,38 @@ extern "C" void __hipRegisterTexture( guarantee((err == hipSuccess), "Cannot register Static Global Var, status: %d \n", err); } -extern "C" void __hipUnregisterFatBinary(hip::FatBinaryInfo** modules) { +void __hipUnregisterFatBinary(hip::FatBinaryInfo** modules) { hipError_t err = PlatformState::instance().removeFatBinary(modules); guarantee((err == hipSuccess), "Cannot Unregister Fat Binary, error:%d \n", err); } -extern "C" hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem, +void __hipRegisterFunction(void** modules, const void* hostFunction, char* deviceFunction, + const char* deviceName, unsigned int threadLimit, uint3* tid, uint3* bid, + dim3* blockDim, dim3* gridDim, int* wSize) { + return __hipRegisterFunction(reinterpret_cast(modules), hostFunction, + deviceFunction, deviceName, threadLimit, tid, bid, blockDim, gridDim, + wSize); +} +void __hipRegisterSurface(void** modules, void* var, char* hostVar, char* deviceVar, int type, + int ext) { + return __hipRegisterSurface(reinterpret_cast(modules), var, hostVar, + deviceVar, type, ext); +} +void __hipRegisterTexture(void** modules, void* var, char* hostVar, char* deviceVar, int type, + int norm, int ext) { + return __hipRegisterTexture(reinterpret_cast(modules), var, hostVar, + deviceVar, type, norm, ext); +} +void __hipRegisterVar(void** modules, void* var, char* hostVar, char* deviceVar, int ext, + size_t size, int constant, int global) { + return __hipRegisterVar(reinterpret_cast(modules), var, hostVar, + deviceVar, ext, size, constant, global); +} +void __hipUnregisterFatBinary(void** modules) { + return __hipUnregisterFatBinary(reinterpret_cast(modules)); +} + +hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem, hipStream_t stream) { HIP_INIT_API(hipConfigureCall, gridDim, blockDim, sharedMem, stream); @@ -188,7 +214,7 @@ extern "C" hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t share HIP_RETURN(hipSuccess); } -extern "C" hipError_t __hipPushCallConfiguration(dim3 gridDim, dim3 blockDim, size_t sharedMem, +hipError_t __hipPushCallConfiguration(dim3 gridDim, dim3 blockDim, size_t sharedMem, hipStream_t stream) { HIP_INIT_API(__hipPushCallConfiguration, gridDim, blockDim, sharedMem, stream); @@ -197,7 +223,7 @@ extern "C" hipError_t __hipPushCallConfiguration(dim3 gridDim, dim3 blockDim, si HIP_RETURN(hipSuccess); } -extern "C" hipError_t __hipPopCallConfiguration(dim3* gridDim, dim3* blockDim, size_t* sharedMem, +hipError_t __hipPopCallConfiguration(dim3* gridDim, dim3* blockDim, size_t* sharedMem, hipStream_t* stream) { HIP_INIT_API(__hipPopCallConfiguration, gridDim, blockDim, sharedMem, stream); @@ -211,7 +237,7 @@ extern "C" hipError_t __hipPopCallConfiguration(dim3* gridDim, dim3* blockDim, s HIP_RETURN(hipSuccess); } -extern "C" hipError_t hipSetupArgument(const void* arg, size_t size, size_t offset) { +hipError_t hipSetupArgument(const void* arg, size_t size, size_t offset) { HIP_INIT_API(hipSetupArgument, arg, size, offset); PlatformState::instance().setupArgument(arg, size, offset); @@ -219,7 +245,7 @@ extern "C" hipError_t hipSetupArgument(const void* arg, size_t size, size_t offs HIP_RETURN(hipSuccess); } -extern "C" hipError_t hipLaunchByPtr(const void* hostFunction) { +hipError_t hipLaunchByPtr(const void* hostFunction) { HIP_INIT_API(hipLaunchByPtr, hostFunction); ihipExec_t exec; @@ -294,7 +320,7 @@ hipError_t ihipCreateGlobalVarObj(const char* name, hipModule_t hmod, amd::Memor HIP_RETURN(hipSuccess); } - +} // namespace hip namespace hip_impl { hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor( @@ -389,7 +415,7 @@ hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor( } } // namespace hip_impl -extern "C" { +namespace hip { hipError_t hipOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize, const void* f, size_t dynSharedMemPerBlk, int blockSizeLimit) { HIP_INIT_API(hipOccupancyMaxPotentialBlockSize, f, dynSharedMemPerBlk, blockSizeLimit); @@ -558,7 +584,6 @@ hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, *numBlocks = num_blocks; HIP_RETURN(ret); } -} hipError_t ihipLaunchKernel(const void* hostFunction, dim3 gridDim, dim3 blockDim, void** args, size_t sharedMemBytes, hipStream_t stream, hipEvent_t startEvent, @@ -927,3 +952,4 @@ bool PlatformState::CloseUniqueFileHandle(const std::shared_ptr& ufd) } return true; } +} //namespace hip diff --git a/hipamd/src/hip_platform.hpp b/hipamd/src/hip_platform.hpp index d28db1442b..9efe303f3c 100644 --- a/hipamd/src/hip_platform.hpp +++ b/hipamd/src/hip_platform.hpp @@ -29,7 +29,7 @@ namespace hip_impl { hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor( int* maxBlocksPerCU, int* numBlocksPerGrid, int* bestBlockSize, const amd::Device& device, hipFunction_t func, int inputBlockSize, size_t dynamicSMemSize, bool bCalcPotentialBlkSz); -} /* namespace hip_impl*/ +} // namespace hip_impl // Unique file descriptor class struct UniqueFD { @@ -41,6 +41,7 @@ struct UniqueFD { const size_t fsize_; //!< File Size }; +namespace hip { class PlatformState { amd::Monitor lock_{"Guards PlatformState globals", true}; @@ -114,3 +115,4 @@ class PlatformState { std::unordered_map> ufd_map_; //!< Unique File Desc Map }; +} // namespace hip diff --git a/hipamd/src/hip_prof_gen.py b/hipamd/src/hip_prof_gen.py index 6dc5247609..9085272a5e 100755 --- a/hipamd/src/hip_prof_gen.py +++ b/hipamd/src/hip_prof_gen.py @@ -370,7 +370,12 @@ def parse_src(api_map, src_path, src_patt, out): if pattern.search(fnm): file = root + '/' + fnm message(file) - content = parse_content(file, api_map, out); + content = '' + filename = os.path.basename(file) + if re.match("hip_table_interface.cpp", filename): + message("SKIP FILE:" + filename) + else: + content = parse_content(file, api_map, out); if (hip_patch_mode != 0) and (content != ''): f = open(file, 'w') f.write(content) diff --git a/hipamd/src/hip_profile.cpp b/hipamd/src/hip_profile.cpp index d557c5c698..214210653f 100644 --- a/hipamd/src/hip_profile.cpp +++ b/hipamd/src/hip_profile.cpp @@ -22,6 +22,7 @@ #include "hip_internal.hpp" +namespace hip { hipError_t hipProfilerStart() { HIP_INIT_API(hipProfilerStart); @@ -38,3 +39,4 @@ hipError_t hipProfilerStop() { HIP_RETURN(hipErrorNotSupported); } +} //namespace hip diff --git a/hipamd/src/hip_runtime.cpp b/hipamd/src/hip_runtime.cpp index 78eb4acace..6c712a7be6 100644 --- a/hipamd/src/hip_runtime.cpp +++ b/hipamd/src/hip_runtime.cpp @@ -22,8 +22,9 @@ #include #include - +namespace hip { void ihipDestroyDevice(); +} #ifdef DEBUG static int reportHook(int reportType, char* message, int* returnValue) { @@ -52,7 +53,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) { ((thread = new amd::HostThread()) != nullptr && thread == amd::Thread::current()))) { return true; } - ihipDestroyDevice(); + hip::ihipDestroyDevice(); } break; case DLL_THREAD_DETACH: { amd::Thread* thread = amd::Thread::current(); diff --git a/hipamd/src/hip_stream.cpp b/hipamd/src/hip_stream.cpp index 7eab6d8d83..8babc5a917 100644 --- a/hipamd/src/hip_stream.cpp +++ b/hipamd/src/hip_stream.cpp @@ -24,9 +24,9 @@ #include "thread/monitor.hpp" #include "hip_prof_api.h" +namespace hip { static amd::Monitor streamSetLock{"Guards global stream set"}; static std::unordered_set streamSet; -namespace hip { // ================================================================================================ Stream::Stream(hip::Device* dev, Priority p, unsigned int f, bool null_stream, @@ -194,8 +194,6 @@ bool Stream::existsActiveStreamForDevice(hip::Device* device) { return false; } -};// hip namespace - // ================================================================================================ void iHipWaitActiveStreams(hip::Stream* blocking_stream, bool wait_null_stream) { amd::Command::EventWaitList eventWaitList(0); @@ -864,3 +862,4 @@ hipError_t hipStreamGetDevice(hipStream_t stream, hipDevice_t* device) { HIP_RETURN(hipSuccess); } +} // hip namespace diff --git a/hipamd/src/hip_stream_ops.cpp b/hipamd/src/hip_stream_ops.cpp index 7032c4c65d..481e839ea9 100644 --- a/hipamd/src/hip_stream_ops.cpp +++ b/hipamd/src/hip_stream_ops.cpp @@ -22,6 +22,7 @@ #include "hip_internal.hpp" #include "platform/command_utils.hpp" +namespace hip { hipError_t ihipStreamOperation(hipStream_t stream, cl_command_type cmdType, void* ptr, uint64_t value, uint64_t mask, unsigned int flags, size_t sizeBytes) { size_t offset = 0; @@ -135,3 +136,4 @@ hipError_t hipStreamWriteValue64(hipStream_t stream, void* ptr, uint64_t value, 0, // flags un-used for now set it to 0 sizeof(uint64_t))); } +} // namespace hip diff --git a/hipamd/src/hip_surface.cpp b/hipamd/src/hip_surface.cpp index 96e1f2479c..cd40e254ef 100644 --- a/hipamd/src/hip_surface.cpp +++ b/hipamd/src/hip_surface.cpp @@ -23,8 +23,6 @@ #include "hip_internal.hpp" #include -hipError_t ihipFree(void* ptr); - struct __hip_surface { uint32_t imageSRD[HIP_IMAGE_OBJECT_SIZE_DWORD]; amd::Image* image; @@ -40,6 +38,9 @@ struct __hip_surface { } }; +namespace hip { + +hipError_t ihipFree(void* ptr); hipError_t ihipCreateSurfaceObject(hipSurfaceObject_t* pSurfObject, const hipResourceDesc* pResDesc) { amd::Device* device = hip::getCurrentDevice()->devices()[0]; @@ -103,3 +104,4 @@ hipError_t hipDestroySurfaceObject(hipSurfaceObject_t surfaceObject) { HIP_RETURN(ihipDestroySurfaceObject(surfaceObject)); } +} //namespace hip diff --git a/hipamd/src/hip_table_interface.cpp b/hipamd/src/hip_table_interface.cpp new file mode 100644 index 0000000000..72ebff234d --- /dev/null +++ b/hipamd/src/hip_table_interface.cpp @@ -0,0 +1,1689 @@ +/* + Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ +#include +namespace hip { +const HipDispatchTable* GetHipDispatchTable(); +const HipCompilerDispatchTable* GetHipCompilerDispatchTable(); +} // namespace hip + +extern "C" hipError_t __hipPopCallConfiguration(dim3* gridDim, dim3* blockDim, size_t* sharedMem, + hipStream_t* stream) { + return hip::GetHipCompilerDispatchTable()->__hipPopCallConfiguration_fn(gridDim, blockDim, + sharedMem, stream); +} +extern "C" hipError_t __hipPushCallConfiguration(dim3 gridDim, dim3 blockDim, size_t sharedMem, + hipStream_t stream) { + return hip::GetHipCompilerDispatchTable()->__hipPushCallConfiguration_fn(gridDim, blockDim, + sharedMem, stream); +} +extern "C" void** __hipRegisterFatBinary(const void* data) { + return hip::GetHipCompilerDispatchTable()->__hipRegisterFatBinary_fn(data); +} +extern "C" void __hipRegisterFunction(void** modules, const void* hostFunction, + char* deviceFunction, const char* deviceName, + unsigned int threadLimit, uint3* tid, uint3* bid, + dim3* blockDim, dim3* gridDim, int* wSize) { + return hip::GetHipCompilerDispatchTable()->__hipRegisterFunction_fn( + modules, hostFunction, deviceFunction, deviceName, threadLimit, tid, bid, blockDim, gridDim, + wSize); +} +extern "C" void __hipRegisterManagedVar(void* hipModule, void** pointer, void* init_value, + const char* name, size_t size, unsigned align) { + return hip::GetHipCompilerDispatchTable()->__hipRegisterManagedVar_fn( + hipModule, pointer, init_value, name, size, align); +} +extern "C" void __hipRegisterSurface(void** modules, void* var, char* hostVar, char* deviceVar, + int type, int ext) { + return hip::GetHipCompilerDispatchTable()->__hipRegisterSurface_fn(modules, var, hostVar, + deviceVar, type, ext); +} +extern "C" void __hipRegisterTexture(void** modules, void* var, char* hostVar, char* deviceVar, + int type, int norm, int ext) { + return hip::GetHipCompilerDispatchTable()->__hipRegisterTexture_fn(modules, var, hostVar, + deviceVar, type, norm, ext); +} +extern "C" void __hipRegisterVar(void** modules, void* var, char* hostVar, char* deviceVar, int ext, + size_t size, int constant, int global) { + return hip::GetHipCompilerDispatchTable()->__hipRegisterVar_fn(modules, var, hostVar, deviceVar, + ext, size, constant, global); +} +extern "C" void __hipUnregisterFatBinary(void** modules) { + return hip::GetHipCompilerDispatchTable()->__hipUnregisterFatBinary_fn(modules); +} +extern "C" const char* hipApiName(uint32_t id) { + return hip::GetHipDispatchTable()->hipApiName_fn(id); +} +hipError_t hipArray3DCreate(hipArray_t* array, const HIP_ARRAY3D_DESCRIPTOR* pAllocateArray) { + return hip::GetHipDispatchTable()->hipArray3DCreate_fn(array, pAllocateArray); +} +hipError_t hipArray3DGetDescriptor(HIP_ARRAY3D_DESCRIPTOR* pArrayDescriptor, hipArray_t array) { + return hip::GetHipDispatchTable()->hipArray3DGetDescriptor_fn(pArrayDescriptor, array); +} +hipError_t hipArrayCreate(hipArray_t* pHandle, const HIP_ARRAY_DESCRIPTOR* pAllocateArray) { + return hip::GetHipDispatchTable()->hipArrayCreate_fn(pHandle, pAllocateArray); +} +hipError_t hipArrayDestroy(hipArray_t array) { + return hip::GetHipDispatchTable()->hipArrayDestroy_fn(array); +} +hipError_t hipArrayGetDescriptor(HIP_ARRAY_DESCRIPTOR* pArrayDescriptor, hipArray_t array) { + return hip::GetHipDispatchTable()->hipArrayGetDescriptor_fn(pArrayDescriptor, array); +} +hipError_t hipArrayGetInfo(hipChannelFormatDesc* desc, hipExtent* extent, unsigned int* flags, + hipArray_t array) { + return hip::GetHipDispatchTable()->hipArrayGetInfo_fn(desc, extent, flags, array); +} +extern "C" hipError_t hipBindTexture(size_t* offset, const textureReference* tex, + const void* devPtr, const hipChannelFormatDesc* desc, + size_t size) { + return hip::GetHipDispatchTable()->hipBindTexture_fn(offset, tex, devPtr, desc, size); +} +hipError_t hipBindTexture2D(size_t* offset, const textureReference* tex, const void* devPtr, + const hipChannelFormatDesc* desc, size_t width, size_t height, + size_t pitch) { + return hip::GetHipDispatchTable()->hipBindTexture2D_fn(offset, tex, devPtr, desc, width, height, + pitch); +} +hipError_t hipBindTextureToArray(const textureReference* tex, hipArray_const_t array, + const hipChannelFormatDesc* desc) { + return hip::GetHipDispatchTable()->hipBindTextureToArray_fn(tex, array, desc); +} +hipError_t hipBindTextureToMipmappedArray(const textureReference* tex, + hipMipmappedArray_const_t mipmappedArray, + const hipChannelFormatDesc* desc) { + return hip::GetHipDispatchTable()->hipBindTextureToMipmappedArray_fn(tex, mipmappedArray, desc); +} +hipError_t hipChooseDevice(int* device, const hipDeviceProp_t* prop) { + return hip::GetHipDispatchTable()->hipChooseDevice_fn(device, prop); +} +extern "C" hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipConfigureCall_fn(gridDim, blockDim, sharedMem, stream); +} +hipError_t hipCreateSurfaceObject(hipSurfaceObject_t* pSurfObject, + const hipResourceDesc* pResDesc) { + return hip::GetHipDispatchTable()->hipCreateSurfaceObject_fn(pSurfObject, pResDesc); +} +hipError_t hipCreateTextureObject(hipTextureObject_t* pTexObject, const hipResourceDesc* pResDesc, + const hipTextureDesc* pTexDesc, + const struct hipResourceViewDesc* pResViewDesc) { + return hip::GetHipDispatchTable()->hipCreateTextureObject_fn(pTexObject, pResDesc, pTexDesc, + pResViewDesc); +} +hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device) { + return hip::GetHipDispatchTable()->hipCtxCreate_fn(ctx, flags, device); +} +hipError_t hipCtxDestroy(hipCtx_t ctx) { return hip::GetHipDispatchTable()->hipCtxDestroy_fn(ctx); } +hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx) { + return hip::GetHipDispatchTable()->hipCtxDisablePeerAccess_fn(peerCtx); +} +hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags) { + return hip::GetHipDispatchTable()->hipCtxEnablePeerAccess_fn(peerCtx, flags); +} +hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion) { + return hip::GetHipDispatchTable()->hipCtxGetApiVersion_fn(ctx, apiVersion); +} +hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig) { + return hip::GetHipDispatchTable()->hipCtxGetCacheConfig_fn(cacheConfig); +} +hipError_t hipCtxGetCurrent(hipCtx_t* ctx) { + return hip::GetHipDispatchTable()->hipCtxGetCurrent_fn(ctx); +} +hipError_t hipCtxGetDevice(hipDevice_t* device) { + return hip::GetHipDispatchTable()->hipCtxGetDevice_fn(device); +} +hipError_t hipCtxGetFlags(unsigned int* flags) { + return hip::GetHipDispatchTable()->hipCtxGetFlags_fn(flags); +} +hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig) { + return hip::GetHipDispatchTable()->hipCtxGetSharedMemConfig_fn(pConfig); +} +hipError_t hipCtxPopCurrent(hipCtx_t* ctx) { + return hip::GetHipDispatchTable()->hipCtxPopCurrent_fn(ctx); +} +hipError_t hipCtxPushCurrent(hipCtx_t ctx) { + return hip::GetHipDispatchTable()->hipCtxPushCurrent_fn(ctx); +} +hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig) { + return hip::GetHipDispatchTable()->hipCtxSetCacheConfig_fn(cacheConfig); +} +hipError_t hipCtxSetCurrent(hipCtx_t ctx) { + return hip::GetHipDispatchTable()->hipCtxSetCurrent_fn(ctx); +} +hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config) { + return hip::GetHipDispatchTable()->hipCtxSetSharedMemConfig_fn(config); +} +hipError_t hipCtxSynchronize(void) { return hip::GetHipDispatchTable()->hipCtxSynchronize_fn(); } +hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem) { + return hip::GetHipDispatchTable()->hipDestroyExternalMemory_fn(extMem); +} +hipError_t hipDestroyExternalSemaphore(hipExternalSemaphore_t extSem) { + return hip::GetHipDispatchTable()->hipDestroyExternalSemaphore_fn(extSem); +} +hipError_t hipDestroySurfaceObject(hipSurfaceObject_t surfaceObject) { + return hip::GetHipDispatchTable()->hipDestroySurfaceObject_fn(surfaceObject); +} +hipError_t hipDestroyTextureObject(hipTextureObject_t textureObject) { + return hip::GetHipDispatchTable()->hipDestroyTextureObject_fn(textureObject); +} +hipError_t hipDeviceCanAccessPeer(int* canAccessPeer, int deviceId, int peerDeviceId) { + return hip::GetHipDispatchTable()->hipDeviceCanAccessPeer_fn(canAccessPeer, deviceId, + peerDeviceId); +} +hipError_t hipDeviceComputeCapability(int* major, int* minor, hipDevice_t device) { + return hip::GetHipDispatchTable()->hipDeviceComputeCapability_fn(major, minor, device); +} +hipError_t hipDeviceDisablePeerAccess(int peerDeviceId) { + return hip::GetHipDispatchTable()->hipDeviceDisablePeerAccess_fn(peerDeviceId); +} +hipError_t hipDeviceEnablePeerAccess(int peerDeviceId, unsigned int flags) { + return hip::GetHipDispatchTable()->hipDeviceEnablePeerAccess_fn(peerDeviceId, flags); +} +hipError_t hipDeviceGet(hipDevice_t* device, int ordinal) { + return hip::GetHipDispatchTable()->hipDeviceGet_fn(device, ordinal); +} +hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int deviceId) { + return hip::GetHipDispatchTable()->hipDeviceGetAttribute_fn(pi, attr, deviceId); +} +hipError_t hipDeviceGetByPCIBusId(int* device, const char* pciBusId) { + return hip::GetHipDispatchTable()->hipDeviceGetByPCIBusId_fn(device, pciBusId); +} +hipError_t hipDeviceGetCacheConfig(hipFuncCache_t* cacheConfig) { + return hip::GetHipDispatchTable()->hipDeviceGetCacheConfig_fn(cacheConfig); +} +hipError_t hipDeviceGetDefaultMemPool(hipMemPool_t* mem_pool, int device) { + return hip::GetHipDispatchTable()->hipDeviceGetDefaultMemPool_fn(mem_pool, device); +} +hipError_t hipDeviceGetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value) { + return hip::GetHipDispatchTable()->hipDeviceGetGraphMemAttribute_fn(device, attr, value); +} +hipError_t hipDeviceGetLimit(size_t* pValue, enum hipLimit_t limit) { + return hip::GetHipDispatchTable()->hipDeviceGetLimit_fn(pValue, limit); +} +hipError_t hipDeviceGetMemPool(hipMemPool_t* mem_pool, int device) { + return hip::GetHipDispatchTable()->hipDeviceGetMemPool_fn(mem_pool, device); +} +hipError_t hipDeviceGetName(char* name, int len, hipDevice_t device) { + return hip::GetHipDispatchTable()->hipDeviceGetName_fn(name, len, device); +} +hipError_t hipDeviceGetP2PAttribute(int* value, hipDeviceP2PAttr attr, int srcDevice, + int dstDevice) { + return hip::GetHipDispatchTable()->hipDeviceGetP2PAttribute_fn(value, attr, srcDevice, dstDevice); +} +hipError_t hipDeviceGetPCIBusId(char* pciBusId, int len, int device) { + return hip::GetHipDispatchTable()->hipDeviceGetPCIBusId_fn(pciBusId, len, device); +} +hipError_t hipDeviceGetSharedMemConfig(hipSharedMemConfig* pConfig) { + return hip::GetHipDispatchTable()->hipDeviceGetSharedMemConfig_fn(pConfig); +} +hipError_t hipDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) { + return hip::GetHipDispatchTable()->hipDeviceGetStreamPriorityRange_fn(leastPriority, + greatestPriority); +} +hipError_t hipDeviceGetUuid(hipUUID* uuid, hipDevice_t device) { + return hip::GetHipDispatchTable()->hipDeviceGetUuid_fn(uuid, device); +} +hipError_t hipDeviceGraphMemTrim(int device) { + return hip::GetHipDispatchTable()->hipDeviceGraphMemTrim_fn(device); +} +hipError_t hipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int* flags, int* active) { + return hip::GetHipDispatchTable()->hipDevicePrimaryCtxGetState_fn(dev, flags, active); +} +hipError_t hipDevicePrimaryCtxRelease(hipDevice_t dev) { + return hip::GetHipDispatchTable()->hipDevicePrimaryCtxRelease_fn(dev); +} +hipError_t hipDevicePrimaryCtxReset(hipDevice_t dev) { + return hip::GetHipDispatchTable()->hipDevicePrimaryCtxReset_fn(dev); +} +hipError_t hipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev) { + return hip::GetHipDispatchTable()->hipDevicePrimaryCtxRetain_fn(pctx, dev); +} +hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags) { + return hip::GetHipDispatchTable()->hipDevicePrimaryCtxSetFlags_fn(dev, flags); +} +hipError_t hipDeviceReset(void) { return hip::GetHipDispatchTable()->hipDeviceReset_fn(); } +hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig) { + return hip::GetHipDispatchTable()->hipDeviceSetCacheConfig_fn(cacheConfig); +} +hipError_t hipDeviceSetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value) { + return hip::GetHipDispatchTable()->hipDeviceSetGraphMemAttribute_fn(device, attr, value); +} +hipError_t hipDeviceSetLimit(enum hipLimit_t limit, size_t value) { + return hip::GetHipDispatchTable()->hipDeviceSetLimit_fn(limit, value); +} +hipError_t hipDeviceSetMemPool(int device, hipMemPool_t mem_pool) { + return hip::GetHipDispatchTable()->hipDeviceSetMemPool_fn(device, mem_pool); +} +hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config) { + return hip::GetHipDispatchTable()->hipDeviceSetSharedMemConfig_fn(config); +} +hipError_t hipDeviceSynchronize(void) { + return hip::GetHipDispatchTable()->hipDeviceSynchronize_fn(); +} +hipError_t hipDeviceTotalMem(size_t* bytes, hipDevice_t device) { + return hip::GetHipDispatchTable()->hipDeviceTotalMem_fn(bytes, device); +} +hipError_t hipDriverGetVersion(int* driverVersion) { + return hip::GetHipDispatchTable()->hipDriverGetVersion_fn(driverVersion); +} +hipError_t hipDrvGetErrorName(hipError_t hipError, const char** errorString) { + return hip::GetHipDispatchTable()->hipDrvGetErrorName_fn(hipError, errorString); +} +hipError_t hipDrvGetErrorString(hipError_t hipError, const char** errorString) { + return hip::GetHipDispatchTable()->hipDrvGetErrorString_fn(hipError, errorString); +} +hipError_t hipDrvGraphAddMemcpyNode(hipGraphNode_t* phGraphNode, hipGraph_t hGraph, + const hipGraphNode_t* dependencies, size_t numDependencies, + const HIP_MEMCPY3D* copyParams, hipCtx_t ctx) { + return hip::GetHipDispatchTable()->hipDrvGraphAddMemcpyNode_fn(phGraphNode, hGraph, dependencies, + numDependencies, copyParams, ctx); +} +hipError_t hipDrvMemcpy2DUnaligned(const hip_Memcpy2D* pCopy) { + return hip::GetHipDispatchTable()->hipDrvMemcpy2DUnaligned_fn(pCopy); +} +hipError_t hipDrvMemcpy3D(const HIP_MEMCPY3D* pCopy) { + return hip::GetHipDispatchTable()->hipDrvMemcpy3D_fn(pCopy); +} +hipError_t hipDrvMemcpy3DAsync(const HIP_MEMCPY3D* pCopy, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipDrvMemcpy3DAsync_fn(pCopy, stream); +} +hipError_t hipDrvPointerGetAttributes(unsigned int numAttributes, hipPointer_attribute* attributes, + void** data, hipDeviceptr_t ptr) { + return hip::GetHipDispatchTable()->hipDrvPointerGetAttributes_fn(numAttributes, attributes, data, + ptr); +} +hipError_t hipEventCreate(hipEvent_t* event) { + return hip::GetHipDispatchTable()->hipEventCreate_fn(event); +} +hipError_t hipEventCreateWithFlags(hipEvent_t* event, unsigned flags) { + return hip::GetHipDispatchTable()->hipEventCreateWithFlags_fn(event, flags); +} +hipError_t hipEventDestroy(hipEvent_t event) { + return hip::GetHipDispatchTable()->hipEventDestroy_fn(event); +} +hipError_t hipEventElapsedTime(float* ms, hipEvent_t start, hipEvent_t stop) { + return hip::GetHipDispatchTable()->hipEventElapsedTime_fn(ms, start, stop); +} +hipError_t hipEventQuery(hipEvent_t event) { + return hip::GetHipDispatchTable()->hipEventQuery_fn(event); +} +hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipEventRecord_fn(event, stream); +} +hipError_t hipEventSynchronize(hipEvent_t event) { + return hip::GetHipDispatchTable()->hipEventSynchronize_fn(event); +} +hipError_t hipExtGetLinkTypeAndHopCount(int device1, int device2, uint32_t* linktype, + uint32_t* hopcount) { + return hip::GetHipDispatchTable()->hipExtGetLinkTypeAndHopCount_fn(device1, device2, linktype, + hopcount); +} +extern "C" hipError_t hipExtLaunchKernel(const void* function_address, dim3 numBlocks, + dim3 dimBlocks, void** args, size_t sharedMemBytes, + hipStream_t stream, hipEvent_t startEvent, + hipEvent_t stopEvent, int flags) { + return hip::GetHipDispatchTable()->hipExtLaunchKernel_fn(function_address, numBlocks, dimBlocks, + args, sharedMemBytes, stream, startEvent, + stopEvent, flags); +} +hipError_t hipExtLaunchMultiKernelMultiDevice(hipLaunchParams* launchParamsList, int numDevices, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipExtLaunchMultiKernelMultiDevice_fn(launchParamsList, + numDevices, flags); +} +hipError_t hipExtMallocWithFlags(void** ptr, size_t sizeBytes, unsigned int flags) { + return hip::GetHipDispatchTable()->hipExtMallocWithFlags_fn(ptr, sizeBytes, flags); +} +hipError_t hipExtStreamCreateWithCUMask(hipStream_t* stream, uint32_t cuMaskSize, + const uint32_t* cuMask) { + return hip::GetHipDispatchTable()->hipExtStreamCreateWithCUMask_fn(stream, cuMaskSize, cuMask); +} +hipError_t hipExtStreamGetCUMask(hipStream_t stream, uint32_t cuMaskSize, uint32_t* cuMask) { + return hip::GetHipDispatchTable()->hipExtStreamGetCUMask_fn(stream, cuMaskSize, cuMask); +} +hipError_t hipExternalMemoryGetMappedBuffer(void** devPtr, hipExternalMemory_t extMem, + const hipExternalMemoryBufferDesc* bufferDesc) { + return hip::GetHipDispatchTable()->hipExternalMemoryGetMappedBuffer_fn(devPtr, extMem, + bufferDesc); +} +hipError_t hipFree(void* ptr) { return hip::GetHipDispatchTable()->hipFree_fn(ptr); } +hipError_t hipFreeArray(hipArray_t array) { + return hip::GetHipDispatchTable()->hipFreeArray_fn(array); +} +hipError_t hipFreeAsync(void* dev_ptr, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipFreeAsync_fn(dev_ptr, stream); +} +hipError_t hipFreeHost(void* ptr) { return hip::GetHipDispatchTable()->hipFreeHost_fn(ptr); } +hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray) { + return hip::GetHipDispatchTable()->hipFreeMipmappedArray_fn(mipmappedArray); +} +hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc) { + return hip::GetHipDispatchTable()->hipFuncGetAttribute_fn(value, attrib, hfunc); +} +hipError_t hipFuncGetAttributes(struct hipFuncAttributes* attr, const void* func) { + return hip::GetHipDispatchTable()->hipFuncGetAttributes_fn(attr, func); +} +hipError_t hipFuncSetAttribute(const void* func, hipFuncAttribute attr, int value) { + return hip::GetHipDispatchTable()->hipFuncSetAttribute_fn(func, attr, value); +} +hipError_t hipFuncSetCacheConfig(const void* func, hipFuncCache_t config) { + return hip::GetHipDispatchTable()->hipFuncSetCacheConfig_fn(func, config); +} +hipError_t hipFuncSetSharedMemConfig(const void* func, hipSharedMemConfig config) { + return hip::GetHipDispatchTable()->hipFuncSetSharedMemConfig_fn(func, config); +} +hipError_t hipGLGetDevices(unsigned int* pHipDeviceCount, int* pHipDevices, + unsigned int hipDeviceCount, hipGLDeviceList deviceList) { + return hip::GetHipDispatchTable()->hipGLGetDevices_fn(pHipDeviceCount, pHipDevices, + hipDeviceCount, deviceList); +} +hipError_t hipGetChannelDesc(hipChannelFormatDesc* desc, hipArray_const_t array) { + return hip::GetHipDispatchTable()->hipGetChannelDesc_fn(desc, array); +} +hipError_t hipGetDevice(int* deviceId) { + return hip::GetHipDispatchTable()->hipGetDevice_fn(deviceId); +} +hipError_t hipGetDeviceCount(int* count) { + return hip::GetHipDispatchTable()->hipGetDeviceCount_fn(count); +} +hipError_t hipGetDeviceFlags(unsigned int* flags) { + return hip::GetHipDispatchTable()->hipGetDeviceFlags_fn(flags); +} +hipError_t hipGetDeviceProperties(hipDeviceProp_t* prop, int deviceId) { + return hip::GetHipDispatchTable()->hipGetDeviceProperties_fn(prop, deviceId); +} +const char* hipGetErrorName(hipError_t hip_error) { + return hip::GetHipDispatchTable()->hipGetErrorName_fn(hip_error); +} +const char* hipGetErrorString(hipError_t hipError) { + return hip::GetHipDispatchTable()->hipGetErrorString_fn(hipError); +} +hipError_t hipGetLastError(void) { return hip::GetHipDispatchTable()->hipGetLastError_fn(); } +hipError_t hipGetMipmappedArrayLevel(hipArray_t* levelArray, + hipMipmappedArray_const_t mipmappedArray, unsigned int level) { + return hip::GetHipDispatchTable()->hipGetMipmappedArrayLevel_fn(levelArray, mipmappedArray, + level); +} +hipError_t hipGetSymbolAddress(void** devPtr, const void* symbol) { + return hip::GetHipDispatchTable()->hipGetSymbolAddress_fn(devPtr, symbol); +} +hipError_t hipGetSymbolSize(size_t* size, const void* symbol) { + return hip::GetHipDispatchTable()->hipGetSymbolSize_fn(size, symbol); +} +hipError_t hipGetTextureAlignmentOffset(size_t* offset, const textureReference* texref) { + return hip::GetHipDispatchTable()->hipGetTextureAlignmentOffset_fn(offset, texref); +} +hipError_t hipGetTextureObjectResourceDesc(hipResourceDesc* pResDesc, + hipTextureObject_t textureObject) { + return hip::GetHipDispatchTable()->hipGetTextureObjectResourceDesc_fn(pResDesc, textureObject); +} +hipError_t hipGetTextureObjectResourceViewDesc(struct hipResourceViewDesc* pResViewDesc, + hipTextureObject_t textureObject) { + return hip::GetHipDispatchTable()->hipGetTextureObjectResourceViewDesc_fn(pResViewDesc, + textureObject); +} +hipError_t hipGetTextureObjectTextureDesc(hipTextureDesc* pTexDesc, + hipTextureObject_t textureObject) { + return hip::GetHipDispatchTable()->hipGetTextureObjectTextureDesc_fn(pTexDesc, textureObject); +} +hipError_t hipGetTextureReference(const textureReference** texref, const void* symbol) { + return hip::GetHipDispatchTable()->hipGetTextureReference_fn(texref, symbol); +} +hipError_t hipGraphAddChildGraphNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + hipGraph_t childGraph) { + return hip::GetHipDispatchTable()->hipGraphAddChildGraphNode_fn(pGraphNode, graph, pDependencies, + numDependencies, childGraph); +} +hipError_t hipGraphAddDependencies(hipGraph_t graph, const hipGraphNode_t* from, + const hipGraphNode_t* to, size_t numDependencies) { + return hip::GetHipDispatchTable()->hipGraphAddDependencies_fn(graph, from, to, numDependencies); +} +hipError_t hipGraphAddEmptyNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies) { + return hip::GetHipDispatchTable()->hipGraphAddEmptyNode_fn(pGraphNode, graph, pDependencies, + numDependencies); +} +hipError_t hipGraphAddEventRecordNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + hipEvent_t event) { + return hip::GetHipDispatchTable()->hipGraphAddEventRecordNode_fn(pGraphNode, graph, pDependencies, + numDependencies, event); +} +hipError_t hipGraphAddEventWaitNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + hipEvent_t event) { + return hip::GetHipDispatchTable()->hipGraphAddEventWaitNode_fn(pGraphNode, graph, pDependencies, + numDependencies, event); +} +hipError_t hipGraphAddHostNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + const hipHostNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphAddHostNode_fn(pGraphNode, graph, pDependencies, + numDependencies, pNodeParams); +} +hipError_t hipGraphAddKernelNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + const hipKernelNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphAddKernelNode_fn(pGraphNode, graph, pDependencies, + numDependencies, pNodeParams); +} +hipError_t hipGraphAddMemAllocNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + hipMemAllocNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphAddMemAllocNode_fn(pGraphNode, graph, pDependencies, + numDependencies, pNodeParams); +} +hipError_t hipGraphAddMemFreeNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + void* dev_ptr) { + return hip::GetHipDispatchTable()->hipGraphAddMemFreeNode_fn(pGraphNode, graph, pDependencies, + numDependencies, dev_ptr); +} +hipError_t hipGraphAddMemcpyNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + const hipMemcpy3DParms* pCopyParams) { + return hip::GetHipDispatchTable()->hipGraphAddMemcpyNode_fn(pGraphNode, graph, pDependencies, + numDependencies, pCopyParams); +} +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) { + return hip::GetHipDispatchTable()->hipGraphAddMemcpyNode1D_fn( + pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind); +} +hipError_t hipGraphAddMemcpyNodeFromSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, void* dst, const void* symbol, + size_t count, size_t offset, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipGraphAddMemcpyNodeFromSymbol_fn( + pGraphNode, graph, pDependencies, numDependencies, dst, symbol, count, offset, kind); +} +hipError_t hipGraphAddMemcpyNodeToSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, + size_t numDependencies, const void* symbol, + const void* src, size_t count, size_t offset, + hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipGraphAddMemcpyNodeToSymbol_fn( + pGraphNode, graph, pDependencies, numDependencies, symbol, src, count, offset, kind); +} +hipError_t hipGraphAddMemsetNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, + const hipGraphNode_t* pDependencies, size_t numDependencies, + const hipMemsetParams* pMemsetParams) { + return hip::GetHipDispatchTable()->hipGraphAddMemsetNode_fn(pGraphNode, graph, pDependencies, + numDependencies, pMemsetParams); +} +hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t* pGraph) { + return hip::GetHipDispatchTable()->hipGraphChildGraphNodeGetGraph_fn(node, pGraph); +} +hipError_t hipGraphClone(hipGraph_t* pGraphClone, hipGraph_t originalGraph) { + return hip::GetHipDispatchTable()->hipGraphClone_fn(pGraphClone, originalGraph); +} +hipError_t hipGraphCreate(hipGraph_t* pGraph, unsigned int flags) { + return hip::GetHipDispatchTable()->hipGraphCreate_fn(pGraph, flags); +} +hipError_t hipGraphDebugDotPrint(hipGraph_t graph, const char* path, unsigned int flags) { + return hip::GetHipDispatchTable()->hipGraphDebugDotPrint_fn(graph, path, flags); +} +hipError_t hipGraphDestroy(hipGraph_t graph) { + return hip::GetHipDispatchTable()->hipGraphDestroy_fn(graph); +} +hipError_t hipGraphDestroyNode(hipGraphNode_t node) { + return hip::GetHipDispatchTable()->hipGraphDestroyNode_fn(node); +} +hipError_t hipGraphEventRecordNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out) { + return hip::GetHipDispatchTable()->hipGraphEventRecordNodeGetEvent_fn(node, event_out); +} +hipError_t hipGraphEventRecordNodeSetEvent(hipGraphNode_t node, hipEvent_t event) { + return hip::GetHipDispatchTable()->hipGraphEventRecordNodeSetEvent_fn(node, event); +} +hipError_t hipGraphEventWaitNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out) { + return hip::GetHipDispatchTable()->hipGraphEventWaitNodeGetEvent_fn(node, event_out); +} +hipError_t hipGraphEventWaitNodeSetEvent(hipGraphNode_t node, hipEvent_t event) { + return hip::GetHipDispatchTable()->hipGraphEventWaitNodeSetEvent_fn(node, event); +} +hipError_t hipGraphExecChildGraphNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + hipGraph_t childGraph) { + return hip::GetHipDispatchTable()->hipGraphExecChildGraphNodeSetParams_fn(hGraphExec, node, + childGraph); +} +hipError_t hipGraphExecDestroy(hipGraphExec_t graphExec) { + return hip::GetHipDispatchTable()->hipGraphExecDestroy_fn(graphExec); +} +hipError_t hipGraphExecEventRecordNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + hipEvent_t event) { + return hip::GetHipDispatchTable()->hipGraphExecEventRecordNodeSetEvent_fn(hGraphExec, hNode, + event); +} +hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + hipEvent_t event) { + return hip::GetHipDispatchTable()->hipGraphExecEventWaitNodeSetEvent_fn(hGraphExec, hNode, event); +} +hipError_t hipGraphExecHostNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + const hipHostNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphExecHostNodeSetParams_fn(hGraphExec, node, + pNodeParams); +} +hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + const hipKernelNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphExecKernelNodeSetParams_fn(hGraphExec, node, + pNodeParams); +} +hipError_t hipGraphExecMemcpyNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + hipMemcpy3DParms* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphExecMemcpyNodeSetParams_fn(hGraphExec, node, + pNodeParams); +} +hipError_t hipGraphExecMemcpyNodeSetParams1D(hipGraphExec_t hGraphExec, hipGraphNode_t node, + void* dst, const void* src, size_t count, + hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipGraphExecMemcpyNodeSetParams1D_fn(hGraphExec, node, dst, + src, count, kind); +} +hipError_t hipGraphExecMemcpyNodeSetParamsFromSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, + void* dst, const void* symbol, size_t count, + size_t offset, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipGraphExecMemcpyNodeSetParamsFromSymbol_fn( + hGraphExec, node, dst, symbol, count, offset, kind); +} +hipError_t hipGraphExecMemcpyNodeSetParamsToSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, + const void* symbol, const void* src, + size_t count, size_t offset, + hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipGraphExecMemcpyNodeSetParamsToSymbol_fn( + hGraphExec, node, symbol, src, count, offset, kind); +} +hipError_t hipGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, + const hipMemsetParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphExecMemsetNodeSetParams_fn(hGraphExec, node, + pNodeParams); +} +hipError_t hipGraphExecUpdate(hipGraphExec_t hGraphExec, hipGraph_t hGraph, + hipGraphNode_t* hErrorNode_out, + hipGraphExecUpdateResult* updateResult_out) { + return hip::GetHipDispatchTable()->hipGraphExecUpdate_fn(hGraphExec, hGraph, hErrorNode_out, + updateResult_out); +} +hipError_t hipGraphGetEdges(hipGraph_t graph, hipGraphNode_t* from, hipGraphNode_t* to, + size_t* numEdges) { + return hip::GetHipDispatchTable()->hipGraphGetEdges_fn(graph, from, to, numEdges); +} +hipError_t hipGraphGetNodes(hipGraph_t graph, hipGraphNode_t* nodes, size_t* numNodes) { + return hip::GetHipDispatchTable()->hipGraphGetNodes_fn(graph, nodes, numNodes); +} +hipError_t hipGraphGetRootNodes(hipGraph_t graph, hipGraphNode_t* pRootNodes, + size_t* pNumRootNodes) { + return hip::GetHipDispatchTable()->hipGraphGetRootNodes_fn(graph, pRootNodes, pNumRootNodes); +} +hipError_t hipGraphHostNodeGetParams(hipGraphNode_t node, hipHostNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphHostNodeGetParams_fn(node, pNodeParams); +} +hipError_t hipGraphHostNodeSetParams(hipGraphNode_t node, const hipHostNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphHostNodeSetParams_fn(node, pNodeParams); +} +hipError_t hipGraphInstantiate(hipGraphExec_t* pGraphExec, hipGraph_t graph, + hipGraphNode_t* pErrorNode, char* pLogBuffer, size_t bufferSize) { + return hip::GetHipDispatchTable()->hipGraphInstantiate_fn(pGraphExec, graph, pErrorNode, + pLogBuffer, bufferSize); +} +hipError_t hipGraphInstantiateWithFlags(hipGraphExec_t* pGraphExec, hipGraph_t graph, + unsigned long long flags) { + return hip::GetHipDispatchTable()->hipGraphInstantiateWithFlags_fn(pGraphExec, graph, flags); +} +hipError_t hipGraphKernelNodeCopyAttributes(hipGraphNode_t hSrc, hipGraphNode_t hDst) { + return hip::GetHipDispatchTable()->hipGraphKernelNodeCopyAttributes_fn(hSrc, hDst); +} +hipError_t hipGraphKernelNodeGetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, + hipKernelNodeAttrValue* value) { + return hip::GetHipDispatchTable()->hipGraphKernelNodeGetAttribute_fn(hNode, attr, value); +} +hipError_t hipGraphKernelNodeGetParams(hipGraphNode_t node, hipKernelNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphKernelNodeGetParams_fn(node, pNodeParams); +} +hipError_t hipGraphKernelNodeSetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, + const hipKernelNodeAttrValue* value) { + return hip::GetHipDispatchTable()->hipGraphKernelNodeSetAttribute_fn(hNode, attr, value); +} +hipError_t hipGraphKernelNodeSetParams(hipGraphNode_t node, + const hipKernelNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphKernelNodeSetParams_fn(node, pNodeParams); +} +hipError_t hipGraphLaunch(hipGraphExec_t graphExec, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipGraphLaunch_fn(graphExec, stream); +} +hipError_t hipGraphMemAllocNodeGetParams(hipGraphNode_t node, hipMemAllocNodeParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphMemAllocNodeGetParams_fn(node, pNodeParams); +} +hipError_t hipGraphMemFreeNodeGetParams(hipGraphNode_t node, void* dev_ptr) { + return hip::GetHipDispatchTable()->hipGraphMemFreeNodeGetParams_fn(node, dev_ptr); +} +hipError_t hipGraphMemcpyNodeGetParams(hipGraphNode_t node, hipMemcpy3DParms* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphMemcpyNodeGetParams_fn(node, pNodeParams); +} +hipError_t hipGraphMemcpyNodeSetParams(hipGraphNode_t node, const hipMemcpy3DParms* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphMemcpyNodeSetParams_fn(node, pNodeParams); +} +hipError_t hipGraphMemcpyNodeSetParams1D(hipGraphNode_t node, void* dst, const void* src, + size_t count, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipGraphMemcpyNodeSetParams1D_fn(node, dst, src, count, kind); +} +hipError_t hipGraphMemcpyNodeSetParamsFromSymbol(hipGraphNode_t node, void* dst, const void* symbol, + size_t count, size_t offset, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipGraphMemcpyNodeSetParamsFromSymbol_fn(node, dst, symbol, + count, offset, kind); +} +hipError_t hipGraphMemcpyNodeSetParamsToSymbol(hipGraphNode_t node, const void* symbol, + const void* src, size_t count, size_t offset, + hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipGraphMemcpyNodeSetParamsToSymbol_fn(node, symbol, src, + count, offset, kind); +} +hipError_t hipGraphMemsetNodeGetParams(hipGraphNode_t node, hipMemsetParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphMemsetNodeGetParams_fn(node, pNodeParams); +} +hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const hipMemsetParams* pNodeParams) { + return hip::GetHipDispatchTable()->hipGraphMemsetNodeSetParams_fn(node, pNodeParams); +} +hipError_t hipGraphNodeFindInClone(hipGraphNode_t* pNode, hipGraphNode_t originalNode, + hipGraph_t clonedGraph) { + return hip::GetHipDispatchTable()->hipGraphNodeFindInClone_fn(pNode, originalNode, clonedGraph); +} +hipError_t hipGraphNodeGetDependencies(hipGraphNode_t node, hipGraphNode_t* pDependencies, + size_t* pNumDependencies) { + return hip::GetHipDispatchTable()->hipGraphNodeGetDependencies_fn(node, pDependencies, + pNumDependencies); +} +hipError_t hipGraphNodeGetDependentNodes(hipGraphNode_t node, hipGraphNode_t* pDependentNodes, + size_t* pNumDependentNodes) { + return hip::GetHipDispatchTable()->hipGraphNodeGetDependentNodes_fn(node, pDependentNodes, + pNumDependentNodes); +} +hipError_t hipGraphNodeGetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + unsigned int* isEnabled) { + return hip::GetHipDispatchTable()->hipGraphNodeGetEnabled_fn(hGraphExec, hNode, isEnabled); +} +hipError_t hipGraphNodeGetType(hipGraphNode_t node, hipGraphNodeType* pType) { + return hip::GetHipDispatchTable()->hipGraphNodeGetType_fn(node, pType); +} +hipError_t hipGraphNodeSetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, + unsigned int isEnabled) { + return hip::GetHipDispatchTable()->hipGraphNodeSetEnabled_fn(hGraphExec, hNode, isEnabled); +} +hipError_t hipGraphReleaseUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count) { + return hip::GetHipDispatchTable()->hipGraphReleaseUserObject_fn(graph, object, count); +} +hipError_t hipGraphRemoveDependencies(hipGraph_t graph, const hipGraphNode_t* from, + const hipGraphNode_t* to, size_t numDependencies) { + return hip::GetHipDispatchTable()->hipGraphRemoveDependencies_fn(graph, from, to, + numDependencies); +} +hipError_t hipGraphRetainUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipGraphRetainUserObject_fn(graph, object, count, flags); +} +hipError_t hipGraphUpload(hipGraphExec_t graphExec, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipGraphUpload_fn(graphExec, stream); +} +hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipGraphicsGLRegisterBuffer_fn(resource, buffer, flags); +} +hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource, GLuint image, GLenum target, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipGraphicsGLRegisterImage_fn(resource, image, target, flags); +} +hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t* resources, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipGraphicsMapResources_fn(count, resources, stream); +} +hipError_t hipGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, + hipGraphicsResource_t resource) { + return hip::GetHipDispatchTable()->hipGraphicsResourceGetMappedPointer_fn(devPtr, size, resource); +} +hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t* array, hipGraphicsResource_t resource, + unsigned int arrayIndex, unsigned int mipLevel) { + return hip::GetHipDispatchTable()->hipGraphicsSubResourceGetMappedArray_fn(array, resource, + arrayIndex, mipLevel); +} +hipError_t hipGraphicsUnmapResources(int count, hipGraphicsResource_t* resources, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipGraphicsUnmapResources_fn(count, resources, stream); +} +hipError_t hipGraphicsUnregisterResource(hipGraphicsResource_t resource) { + return hip::GetHipDispatchTable()->hipGraphicsUnregisterResource_fn(resource); +} +hipError_t hipHostAlloc(void** ptr, size_t size, unsigned int flags) { + return hip::GetHipDispatchTable()->hipHostAlloc_fn(ptr, size, flags); +} +hipError_t hipHostFree(void* ptr) { return hip::GetHipDispatchTable()->hipHostFree_fn(ptr); } +hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, unsigned int flags) { + return hip::GetHipDispatchTable()->hipHostGetDevicePointer_fn(devPtr, hstPtr, flags); +} +hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr) { + return hip::GetHipDispatchTable()->hipHostGetFlags_fn(flagsPtr, hostPtr); +} +hipError_t hipHostMalloc(void** ptr, size_t size, unsigned int flags) { + return hip::GetHipDispatchTable()->hipHostMalloc_fn(ptr, size, flags); +} +hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags) { + return hip::GetHipDispatchTable()->hipHostRegister_fn(hostPtr, sizeBytes, flags); +} +hipError_t hipHostUnregister(void* hostPtr) { + return hip::GetHipDispatchTable()->hipHostUnregister_fn(hostPtr); +} +hipError_t hipImportExternalMemory(hipExternalMemory_t* extMem_out, + const hipExternalMemoryHandleDesc* memHandleDesc) { + return hip::GetHipDispatchTable()->hipImportExternalMemory_fn(extMem_out, memHandleDesc); +} +hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t* extSem_out, + const hipExternalSemaphoreHandleDesc* semHandleDesc) { + return hip::GetHipDispatchTable()->hipImportExternalSemaphore_fn(extSem_out, semHandleDesc); +} +hipError_t hipInit(unsigned int flags) { return hip::GetHipDispatchTable()->hipInit_fn(flags); } +hipError_t hipIpcCloseMemHandle(void* devPtr) { + return hip::GetHipDispatchTable()->hipIpcCloseMemHandle_fn(devPtr); +} +hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t* handle, hipEvent_t event) { + return hip::GetHipDispatchTable()->hipIpcGetEventHandle_fn(handle, event); +} +hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t* handle, void* devPtr) { + return hip::GetHipDispatchTable()->hipIpcGetMemHandle_fn(handle, devPtr); +} +hipError_t hipIpcOpenEventHandle(hipEvent_t* event, hipIpcEventHandle_t handle) { + return hip::GetHipDispatchTable()->hipIpcOpenEventHandle_fn(event, handle); +} +hipError_t hipIpcOpenMemHandle(void** devPtr, hipIpcMemHandle_t handle, unsigned int flags) { + return hip::GetHipDispatchTable()->hipIpcOpenMemHandle_fn(devPtr, handle, flags); +} +extern "C" const char* hipKernelNameRef(const hipFunction_t f) { + return hip::GetHipDispatchTable()->hipKernelNameRef_fn(f); +} +extern "C" const char* hipKernelNameRefByPtr(const void* hostFunction, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipKernelNameRefByPtr_fn(hostFunction, stream); +} +extern "C" hipError_t hipLaunchByPtr(const void* func) { + return hip::GetHipDispatchTable()->hipLaunchByPtr_fn(func); +} +hipError_t hipLaunchCooperativeKernel(const void* f, dim3 gridDim, dim3 blockDimX, + void** kernelParams, unsigned int sharedMemBytes, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipLaunchCooperativeKernel_fn( + f, gridDim, blockDimX, kernelParams, sharedMemBytes, stream); +} +hipError_t hipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsList, int numDevices, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipLaunchCooperativeKernelMultiDevice_fn(launchParamsList, + numDevices, flags); +} +hipError_t hipLaunchHostFunc(hipStream_t stream, hipHostFn_t fn, void* userData) { + return hip::GetHipDispatchTable()->hipLaunchHostFunc_fn(stream, fn, userData); +} +extern "C" hipError_t hipLaunchKernel(const void* function_address, dim3 numBlocks, dim3 dimBlocks, + void** args, size_t sharedMemBytes, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipLaunchKernel_fn(function_address, numBlocks, dimBlocks, + args, sharedMemBytes, stream); +} +hipError_t hipMalloc(void** ptr, size_t size) { + return hip::GetHipDispatchTable()->hipMalloc_fn(ptr, size); +} +hipError_t hipMalloc3D(hipPitchedPtr* pitchedDevPtr, hipExtent extent) { + return hip::GetHipDispatchTable()->hipMalloc3D_fn(pitchedDevPtr, extent); +} +extern "C" hipError_t hipMalloc3DArray(hipArray_t* array, const struct hipChannelFormatDesc* desc, + struct hipExtent extent, unsigned int flags) { + return hip::GetHipDispatchTable()->hipMalloc3DArray_fn(array, desc, extent, flags); +} +extern "C" hipError_t hipMallocArray(hipArray_t* array, const hipChannelFormatDesc* desc, + size_t width, size_t height, unsigned int flags) { + return hip::GetHipDispatchTable()->hipMallocArray_fn(array, desc, width, height, flags); +} +hipError_t hipMallocAsync(void** dev_ptr, size_t size, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMallocAsync_fn(dev_ptr, size, stream); +} +hipError_t hipMallocFromPoolAsync(void** dev_ptr, size_t size, hipMemPool_t mem_pool, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMallocFromPoolAsync_fn(dev_ptr, size, mem_pool, stream); +} +hipError_t hipMallocHost(void** ptr, size_t size) { + return hip::GetHipDispatchTable()->hipMallocHost_fn(ptr, size); +} +hipError_t hipMallocManaged(void** dev_ptr, size_t size, unsigned int flags) { + return hip::GetHipDispatchTable()->hipMallocManaged_fn(dev_ptr, size, flags); +} +extern "C" hipError_t hipMallocMipmappedArray(hipMipmappedArray_t* mipmappedArray, + const struct hipChannelFormatDesc* desc, + struct hipExtent extent, unsigned int numLevels, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipMallocMipmappedArray_fn(mipmappedArray, desc, extent, + numLevels, flags); +} +hipError_t hipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t height) { + return hip::GetHipDispatchTable()->hipMallocPitch_fn(ptr, pitch, width, height); +} +hipError_t hipMemAddressFree(void* devPtr, size_t size) { + return hip::GetHipDispatchTable()->hipMemAddressFree_fn(devPtr, size); +} +hipError_t hipMemAddressReserve(void** ptr, size_t size, size_t alignment, void* addr, + unsigned long long flags) { + return hip::GetHipDispatchTable()->hipMemAddressReserve_fn(ptr, size, alignment, addr, flags); +} +hipError_t hipMemAdvise(const void* dev_ptr, size_t count, hipMemoryAdvise advice, int device) { + return hip::GetHipDispatchTable()->hipMemAdvise_fn(dev_ptr, count, advice, device); +} +hipError_t hipMemAllocHost(void** ptr, size_t size) { + return hip::GetHipDispatchTable()->hipMemAllocHost_fn(ptr, size); +} +hipError_t hipMemAllocPitch(hipDeviceptr_t* dptr, size_t* pitch, size_t widthInBytes, size_t height, + unsigned int elementSizeBytes) { + return hip::GetHipDispatchTable()->hipMemAllocPitch_fn(dptr, pitch, widthInBytes, height, + elementSizeBytes); +} +hipError_t hipMemCreate(hipMemGenericAllocationHandle_t* handle, size_t size, + const hipMemAllocationProp* prop, unsigned long long flags) { + return hip::GetHipDispatchTable()->hipMemCreate_fn(handle, size, prop, flags); +} +hipError_t hipMemExportToShareableHandle(void* shareableHandle, + hipMemGenericAllocationHandle_t handle, + hipMemAllocationHandleType handleType, + unsigned long long flags) { + return hip::GetHipDispatchTable()->hipMemExportToShareableHandle_fn(shareableHandle, handle, + handleType, flags); +} +hipError_t hipMemGetAccess(unsigned long long* flags, const hipMemLocation* location, void* ptr) { + return hip::GetHipDispatchTable()->hipMemGetAccess_fn(flags, location, ptr); +} +hipError_t hipMemGetAddressRange(hipDeviceptr_t* pbase, size_t* psize, hipDeviceptr_t dptr) { + return hip::GetHipDispatchTable()->hipMemGetAddressRange_fn(pbase, psize, dptr); +} +hipError_t hipMemGetAllocationGranularity(size_t* granularity, const hipMemAllocationProp* prop, + hipMemAllocationGranularity_flags option) { + return hip::GetHipDispatchTable()->hipMemGetAllocationGranularity_fn(granularity, prop, option); +} +hipError_t hipMemGetAllocationPropertiesFromHandle(hipMemAllocationProp* prop, + hipMemGenericAllocationHandle_t handle) { + return hip::GetHipDispatchTable()->hipMemGetAllocationPropertiesFromHandle_fn(prop, handle); +} +hipError_t hipMemGetInfo(size_t* free, size_t* total) { + return hip::GetHipDispatchTable()->hipMemGetInfo_fn(free, total); +} +hipError_t hipMemImportFromShareableHandle(hipMemGenericAllocationHandle_t* handle, void* osHandle, + hipMemAllocationHandleType shHandleType) { + return hip::GetHipDispatchTable()->hipMemImportFromShareableHandle_fn(handle, osHandle, + shHandleType); +} +hipError_t hipMemMap(void* ptr, size_t size, size_t offset, hipMemGenericAllocationHandle_t handle, + unsigned long long flags) { + return hip::GetHipDispatchTable()->hipMemMap_fn(ptr, size, offset, handle, flags); +} +hipError_t hipMemMapArrayAsync(hipArrayMapInfo* mapInfoList, unsigned int count, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemMapArrayAsync_fn(mapInfoList, count, stream); +} +hipError_t hipMemPoolCreate(hipMemPool_t* mem_pool, const hipMemPoolProps* pool_props) { + return hip::GetHipDispatchTable()->hipMemPoolCreate_fn(mem_pool, pool_props); +} +hipError_t hipMemPoolDestroy(hipMemPool_t mem_pool) { + return hip::GetHipDispatchTable()->hipMemPoolDestroy_fn(mem_pool); +} +hipError_t hipMemPoolExportPointer(hipMemPoolPtrExportData* export_data, void* dev_ptr) { + return hip::GetHipDispatchTable()->hipMemPoolExportPointer_fn(export_data, dev_ptr); +} +hipError_t hipMemPoolExportToShareableHandle(void* shared_handle, hipMemPool_t mem_pool, + hipMemAllocationHandleType handle_type, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipMemPoolExportToShareableHandle_fn(shared_handle, mem_pool, + handle_type, flags); +} +hipError_t hipMemPoolGetAccess(hipMemAccessFlags* flags, hipMemPool_t mem_pool, + hipMemLocation* location) { + return hip::GetHipDispatchTable()->hipMemPoolGetAccess_fn(flags, mem_pool, location); +} +hipError_t hipMemPoolGetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value) { + return hip::GetHipDispatchTable()->hipMemPoolGetAttribute_fn(mem_pool, attr, value); +} +hipError_t hipMemPoolImportFromShareableHandle(hipMemPool_t* mem_pool, void* shared_handle, + hipMemAllocationHandleType handle_type, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipMemPoolImportFromShareableHandle_fn(mem_pool, shared_handle, + handle_type, flags); +} +hipError_t hipMemPoolImportPointer(void** dev_ptr, hipMemPool_t mem_pool, + hipMemPoolPtrExportData* export_data) { + return hip::GetHipDispatchTable()->hipMemPoolImportPointer_fn(dev_ptr, mem_pool, export_data); +} +hipError_t hipMemPoolSetAccess(hipMemPool_t mem_pool, const hipMemAccessDesc* desc_list, + size_t count) { + return hip::GetHipDispatchTable()->hipMemPoolSetAccess_fn(mem_pool, desc_list, count); +} +hipError_t hipMemPoolSetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value) { + return hip::GetHipDispatchTable()->hipMemPoolSetAttribute_fn(mem_pool, attr, value); +} +hipError_t hipMemPoolTrimTo(hipMemPool_t mem_pool, size_t min_bytes_to_hold) { + return hip::GetHipDispatchTable()->hipMemPoolTrimTo_fn(mem_pool, min_bytes_to_hold); +} +hipError_t hipMemPrefetchAsync(const void* dev_ptr, size_t count, int device, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemPrefetchAsync_fn(dev_ptr, count, device, stream); +} +hipError_t hipMemPtrGetInfo(void* ptr, size_t* size) { + return hip::GetHipDispatchTable()->hipMemPtrGetInfo_fn(ptr, size); +} +hipError_t hipMemRangeGetAttribute(void* data, size_t data_size, hipMemRangeAttribute attribute, + const void* dev_ptr, size_t count) { + return hip::GetHipDispatchTable()->hipMemRangeGetAttribute_fn(data, data_size, attribute, dev_ptr, + count); +} +hipError_t hipMemRangeGetAttributes(void** data, size_t* data_sizes, + hipMemRangeAttribute* attributes, size_t num_attributes, + const void* dev_ptr, size_t count) { + return hip::GetHipDispatchTable()->hipMemRangeGetAttributes_fn(data, data_sizes, attributes, + num_attributes, dev_ptr, count); +} +hipError_t hipMemRelease(hipMemGenericAllocationHandle_t handle) { + return hip::GetHipDispatchTable()->hipMemRelease_fn(handle); +} +hipError_t hipMemRetainAllocationHandle(hipMemGenericAllocationHandle_t* handle, void* addr) { + return hip::GetHipDispatchTable()->hipMemRetainAllocationHandle_fn(handle, addr); +} +hipError_t hipMemSetAccess(void* ptr, size_t size, const hipMemAccessDesc* desc, size_t count) { + return hip::GetHipDispatchTable()->hipMemSetAccess_fn(ptr, size, desc, count); +} +hipError_t hipMemUnmap(void* ptr, size_t size) { + return hip::GetHipDispatchTable()->hipMemUnmap_fn(ptr, size); +} +hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpy_fn(dst, src, sizeBytes, kind); +} +hipError_t hipMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, + size_t height, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpy2D_fn(dst, dpitch, src, spitch, width, height, kind); +} +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) { + return hip::GetHipDispatchTable()->hipMemcpy2DAsync_fn(dst, dpitch, src, spitch, width, height, + kind, 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) { + return hip::GetHipDispatchTable()->hipMemcpy2DFromArray_fn(dst, dpitch, src, wOffset, hOffset, + width, height, kind); +} +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) { + return hip::GetHipDispatchTable()->hipMemcpy2DFromArrayAsync_fn( + dst, dpitch, src, wOffset, hOffset, width, height, kind, stream); +} +hipError_t hipMemcpy2DToArray(hipArray_t dst, size_t wOffset, size_t hOffset, const void* src, + size_t spitch, size_t width, size_t height, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpy2DToArray_fn(dst, wOffset, hOffset, src, spitch, + width, height, kind); +} +hipError_t hipMemcpy2DToArrayAsync(hipArray_t dst, size_t wOffset, size_t hOffset, const void* src, + size_t spitch, size_t width, size_t height, hipMemcpyKind kind, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpy2DToArrayAsync_fn(dst, wOffset, hOffset, src, spitch, + width, height, kind, stream); +} +hipError_t hipMemcpy3D(const struct hipMemcpy3DParms* p) { + return hip::GetHipDispatchTable()->hipMemcpy3D_fn(p); +} +hipError_t hipMemcpy3DAsync(const struct hipMemcpy3DParms* p, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpy3DAsync_fn(p, stream); +} +hipError_t hipMemcpyAsync(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyAsync_fn(dst, src, sizeBytes, kind, stream); +} +hipError_t hipMemcpyAtoH(void* dst, hipArray_t srcArray, size_t srcOffset, size_t count) { + return hip::GetHipDispatchTable()->hipMemcpyAtoH_fn(dst, srcArray, srcOffset, count); +} +hipError_t hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes) { + return hip::GetHipDispatchTable()->hipMemcpyDtoD_fn(dst, src, sizeBytes); +} +hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyDtoDAsync_fn(dst, src, sizeBytes, stream); +} +hipError_t hipMemcpyDtoH(void* dst, hipDeviceptr_t src, size_t sizeBytes) { + return hip::GetHipDispatchTable()->hipMemcpyDtoH_fn(dst, src, sizeBytes); +} +hipError_t hipMemcpyDtoHAsync(void* dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyDtoHAsync_fn(dst, src, sizeBytes, stream); +} +hipError_t hipMemcpyFromArray(void* dst, hipArray_const_t srcArray, size_t wOffset, size_t hOffset, + size_t count, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpyFromArray_fn(dst, srcArray, wOffset, hOffset, count, + kind); +} +hipError_t hipMemcpyFromSymbol(void* dst, const void* symbol, size_t sizeBytes, size_t offset, + hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpyFromSymbol_fn(dst, symbol, sizeBytes, offset, kind); +} +hipError_t hipMemcpyFromSymbolAsync(void* dst, const void* symbol, size_t sizeBytes, size_t offset, + hipMemcpyKind kind, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyFromSymbolAsync_fn(dst, symbol, sizeBytes, offset, + kind, stream); +} +hipError_t hipMemcpyHtoA(hipArray_t dstArray, size_t dstOffset, const void* srcHost, size_t count) { + return hip::GetHipDispatchTable()->hipMemcpyHtoA_fn(dstArray, dstOffset, srcHost, count); +} +hipError_t hipMemcpyHtoD(hipDeviceptr_t dst, void* src, size_t sizeBytes) { + return hip::GetHipDispatchTable()->hipMemcpyHtoD_fn(dst, src, sizeBytes); +} +hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, void* src, size_t sizeBytes, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyHtoDAsync_fn(dst, src, sizeBytes, stream); +} +hipError_t hipMemcpyParam2D(const hip_Memcpy2D* pCopy) { + return hip::GetHipDispatchTable()->hipMemcpyParam2D_fn(pCopy); +} +hipError_t hipMemcpyParam2DAsync(const hip_Memcpy2D* pCopy, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyParam2DAsync_fn(pCopy, stream); +} +hipError_t hipMemcpyPeer(void* dst, int dstDeviceId, const void* src, int srcDeviceId, + size_t sizeBytes) { + return hip::GetHipDispatchTable()->hipMemcpyPeer_fn(dst, dstDeviceId, src, srcDeviceId, + sizeBytes); +} +hipError_t hipMemcpyPeerAsync(void* dst, int dstDeviceId, const void* src, int srcDevice, + size_t sizeBytes, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyPeerAsync_fn(dst, dstDeviceId, src, srcDevice, + sizeBytes, stream); +} +hipError_t hipMemcpyToArray(hipArray_t dst, size_t wOffset, size_t hOffset, const void* src, + size_t count, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpyToArray_fn(dst, wOffset, hOffset, src, count, kind); +} +hipError_t hipMemcpyToSymbol(const void* symbol, const void* src, size_t sizeBytes, size_t offset, + hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpyToSymbol_fn(symbol, src, sizeBytes, offset, kind); +} +hipError_t hipMemcpyToSymbolAsync(const void* symbol, const void* src, size_t sizeBytes, + size_t offset, hipMemcpyKind kind, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyToSymbolAsync_fn(symbol, src, sizeBytes, offset, kind, + stream); +} +hipError_t hipMemcpyWithStream(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyWithStream_fn(dst, src, sizeBytes, kind, stream); +} +hipError_t hipMemset(void* dst, int value, size_t sizeBytes) { + return hip::GetHipDispatchTable()->hipMemset_fn(dst, value, sizeBytes); +} +hipError_t hipMemset2D(void* dst, size_t pitch, int value, size_t width, size_t height) { + return hip::GetHipDispatchTable()->hipMemset2D_fn(dst, pitch, value, width, height); +} +hipError_t hipMemset2DAsync(void* dst, size_t pitch, int value, size_t width, size_t height, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemset2DAsync_fn(dst, pitch, value, width, height, stream); +} +hipError_t hipMemset3D(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent) { + return hip::GetHipDispatchTable()->hipMemset3D_fn(pitchedDevPtr, value, extent); +} +hipError_t hipMemset3DAsync(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemset3DAsync_fn(pitchedDevPtr, value, extent, stream); +} +hipError_t hipMemsetAsync(void* dst, int value, size_t sizeBytes, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemsetAsync_fn(dst, value, sizeBytes, stream); +} +hipError_t hipMemsetD16(hipDeviceptr_t dest, unsigned short value, size_t count) { + return hip::GetHipDispatchTable()->hipMemsetD16_fn(dest, value, count); +} +hipError_t hipMemsetD16Async(hipDeviceptr_t dest, unsigned short value, size_t count, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemsetD16Async_fn(dest, value, count, stream); +} +hipError_t hipMemsetD32(hipDeviceptr_t dest, int value, size_t count) { + return hip::GetHipDispatchTable()->hipMemsetD32_fn(dest, value, count); +} +hipError_t hipMemsetD32Async(hipDeviceptr_t dst, int value, size_t count, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemsetD32Async_fn(dst, value, count, stream); +} +hipError_t hipMemsetD8(hipDeviceptr_t dest, unsigned char value, size_t count) { + return hip::GetHipDispatchTable()->hipMemsetD8_fn(dest, value, count); +} +hipError_t hipMemsetD8Async(hipDeviceptr_t dest, unsigned char value, size_t count, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemsetD8Async_fn(dest, value, count, stream); +} +hipError_t hipMipmappedArrayCreate(hipMipmappedArray_t* pHandle, + HIP_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, + unsigned int numMipmapLevels) { + return hip::GetHipDispatchTable()->hipMipmappedArrayCreate_fn(pHandle, pMipmappedArrayDesc, + numMipmapLevels); +} +hipError_t hipMipmappedArrayDestroy(hipMipmappedArray_t hMipmappedArray) { + return hip::GetHipDispatchTable()->hipMipmappedArrayDestroy_fn(hMipmappedArray); +} +hipError_t hipMipmappedArrayGetLevel(hipArray_t* pLevelArray, hipMipmappedArray_t hMipMappedArray, + unsigned int level) { + return hip::GetHipDispatchTable()->hipMipmappedArrayGetLevel_fn(pLevelArray, hMipMappedArray, + level); +} +hipError_t hipModuleGetFunction(hipFunction_t* function, hipModule_t module, const char* kname) { + return hip::GetHipDispatchTable()->hipModuleGetFunction_fn(function, module, kname); +} +hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t hmod, + const char* name) { + return hip::GetHipDispatchTable()->hipModuleGetGlobal_fn(dptr, bytes, hmod, name); +} +hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const char* name) { + return hip::GetHipDispatchTable()->hipModuleGetTexRef_fn(texRef, hmod, name); +} +hipError_t hipModuleLaunchCooperativeKernel(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) { + return hip::GetHipDispatchTable()->hipModuleLaunchCooperativeKernel_fn( + f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, stream, + kernelParams); +} +hipError_t hipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams* launchParamsList, + unsigned int numDevices, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipModuleLaunchCooperativeKernelMultiDevice_fn( + launchParamsList, numDevices, flags); +} +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) { + return hip::GetHipDispatchTable()->hipModuleLaunchKernel_fn( + f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, stream, + kernelParams, extra); +} +hipError_t hipModuleLoad(hipModule_t* module, const char* fname) { + return hip::GetHipDispatchTable()->hipModuleLoad_fn(module, fname); +} +hipError_t hipModuleLoadData(hipModule_t* module, const void* image) { + return hip::GetHipDispatchTable()->hipModuleLoadData_fn(module, image); +} +hipError_t hipModuleLoadDataEx(hipModule_t* module, const void* image, unsigned int numOptions, + hipJitOption* options, void** optionValues) { + return hip::GetHipDispatchTable()->hipModuleLoadDataEx_fn(module, image, numOptions, options, + optionValues); +} +extern "C" hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessor( + int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk) { + return hip::GetHipDispatchTable()->hipModuleOccupancyMaxActiveBlocksPerMultiprocessor_fn( + numBlocks, f, blockSize, dynSharedMemPerBlk); +} +extern "C" hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( + int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags) { + return hip::GetHipDispatchTable()->hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_fn( + numBlocks, f, blockSize, dynSharedMemPerBlk, flags); +} +extern "C" hipError_t hipModuleOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize, + hipFunction_t f, + size_t dynSharedMemPerBlk, + int blockSizeLimit) { + return hip::GetHipDispatchTable()->hipModuleOccupancyMaxPotentialBlockSize_fn( + gridSize, blockSize, f, dynSharedMemPerBlk, blockSizeLimit); +} +extern "C" hipError_t hipModuleOccupancyMaxPotentialBlockSizeWithFlags( + int* gridSize, int* blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipModuleOccupancyMaxPotentialBlockSizeWithFlags_fn( + gridSize, blockSize, f, dynSharedMemPerBlk, blockSizeLimit, flags); +} +hipError_t hipModuleUnload(hipModule_t module) { + return hip::GetHipDispatchTable()->hipModuleUnload_fn(module); +} +extern "C" hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* f, + int blockSize, + size_t dynSharedMemPerBlk) { + return hip::GetHipDispatchTable()->hipOccupancyMaxActiveBlocksPerMultiprocessor_fn( + numBlocks, f, blockSize, dynSharedMemPerBlk); +} +extern "C" hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( + int* numBlocks, const void* f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags) { + return hip::GetHipDispatchTable()->hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_fn( + numBlocks, f, blockSize, dynSharedMemPerBlk, flags); +} +extern "C" hipError_t hipOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize, + const void* f, size_t dynSharedMemPerBlk, + int blockSizeLimit) { + return hip::GetHipDispatchTable()->hipOccupancyMaxPotentialBlockSize_fn( + gridSize, blockSize, f, dynSharedMemPerBlk, blockSizeLimit); +} +hipError_t hipPeekAtLastError(void) { return hip::GetHipDispatchTable()->hipPeekAtLastError_fn(); } +hipError_t hipPointerGetAttribute(void* data, hipPointer_attribute attribute, hipDeviceptr_t ptr) { + return hip::GetHipDispatchTable()->hipPointerGetAttribute_fn(data, attribute, ptr); +} +hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void* ptr) { + return hip::GetHipDispatchTable()->hipPointerGetAttributes_fn(attributes, ptr); +} +hipError_t hipPointerSetAttribute(const void* value, hipPointer_attribute attribute, + hipDeviceptr_t ptr) { + return hip::GetHipDispatchTable()->hipPointerSetAttribute_fn(value, attribute, ptr); +} +hipError_t hipProfilerStart() { return hip::GetHipDispatchTable()->hipProfilerStart_fn(); } +hipError_t hipProfilerStop() { return hip::GetHipDispatchTable()->hipProfilerStop_fn(); } +extern "C" void hipRegisterTracerCallback(const void* function) { + return hip::GetHipDispatchTable()->hipRegisterTracerCallback_fn(function); +} +hipError_t hipRuntimeGetVersion(int* runtimeVersion) { + return hip::GetHipDispatchTable()->hipRuntimeGetVersion_fn(runtimeVersion); +} +hipError_t hipSetDevice(int deviceId) { + return hip::GetHipDispatchTable()->hipSetDevice_fn(deviceId); +} +hipError_t hipSetDeviceFlags(unsigned flags) { + return hip::GetHipDispatchTable()->hipSetDeviceFlags_fn(flags); +} +extern "C" hipError_t hipSetupArgument(const void* arg, size_t size, size_t offset) { + return hip::GetHipDispatchTable()->hipSetupArgument_fn(arg, size, offset); +} +hipError_t hipSignalExternalSemaphoresAsync(const hipExternalSemaphore_t* extSemArray, + const hipExternalSemaphoreSignalParams* paramsArray, + unsigned int numExtSems, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipSignalExternalSemaphoresAsync_fn(extSemArray, paramsArray, + numExtSems, stream); +} +hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback, void* userData, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipStreamAddCallback_fn(stream, callback, userData, flags); +} +hipError_t hipStreamAttachMemAsync(hipStream_t stream, void* dev_ptr, size_t length, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipStreamAttachMemAsync_fn(stream, dev_ptr, length, flags); +} +hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode) { + return hip::GetHipDispatchTable()->hipStreamBeginCapture_fn(stream, mode); +} +hipError_t hipStreamCreate(hipStream_t* stream) { + return hip::GetHipDispatchTable()->hipStreamCreate_fn(stream); +} +hipError_t hipStreamCreateWithFlags(hipStream_t* stream, unsigned int flags) { + return hip::GetHipDispatchTable()->hipStreamCreateWithFlags_fn(stream, flags); +} +hipError_t hipStreamCreateWithPriority(hipStream_t* stream, unsigned int flags, int priority) { + return hip::GetHipDispatchTable()->hipStreamCreateWithPriority_fn(stream, flags, priority); +} +hipError_t hipStreamDestroy(hipStream_t stream) { + return hip::GetHipDispatchTable()->hipStreamDestroy_fn(stream); +} +hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t* pGraph) { + return hip::GetHipDispatchTable()->hipStreamEndCapture_fn(stream, pGraph); +} +hipError_t hipStreamGetCaptureInfo(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus, + unsigned long long* pId) { + return hip::GetHipDispatchTable()->hipStreamGetCaptureInfo_fn(stream, pCaptureStatus, pId); +} +hipError_t hipStreamGetCaptureInfo_v2(hipStream_t stream, hipStreamCaptureStatus* captureStatus_out, + unsigned long long* id_out, hipGraph_t* graph_out, + const hipGraphNode_t** dependencies_out, + size_t* numDependencies_out) { + return hip::GetHipDispatchTable()->hipStreamGetCaptureInfo_v2_fn( + stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out); +} +hipError_t hipStreamGetDevice(hipStream_t stream, hipDevice_t* device) { + return hip::GetHipDispatchTable()->hipStreamGetDevice_fn(stream, device); +} +hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int* flags) { + return hip::GetHipDispatchTable()->hipStreamGetFlags_fn(stream, flags); +} +hipError_t hipStreamGetPriority(hipStream_t stream, int* priority) { + return hip::GetHipDispatchTable()->hipStreamGetPriority_fn(stream, priority); +} +hipError_t hipStreamIsCapturing(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus) { + return hip::GetHipDispatchTable()->hipStreamIsCapturing_fn(stream, pCaptureStatus); +} +hipError_t hipStreamQuery(hipStream_t stream) { + return hip::GetHipDispatchTable()->hipStreamQuery_fn(stream); +} +hipError_t hipStreamSynchronize(hipStream_t stream) { + return hip::GetHipDispatchTable()->hipStreamSynchronize_fn(stream); +} +hipError_t hipStreamUpdateCaptureDependencies(hipStream_t stream, hipGraphNode_t* dependencies, + size_t numDependencies, unsigned int flags) { + return hip::GetHipDispatchTable()->hipStreamUpdateCaptureDependencies_fn(stream, dependencies, + numDependencies, flags); +} +hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags) { + return hip::GetHipDispatchTable()->hipStreamWaitEvent_fn(stream, event, flags); +} +hipError_t hipStreamWaitValue32(hipStream_t stream, void* ptr, uint32_t value, unsigned int flags, + uint32_t mask) { + return hip::GetHipDispatchTable()->hipStreamWaitValue32_fn(stream, ptr, value, flags, mask); +} +hipError_t hipStreamWaitValue64(hipStream_t stream, void* ptr, uint64_t value, unsigned int flags, + uint64_t mask) { + return hip::GetHipDispatchTable()->hipStreamWaitValue64_fn(stream, ptr, value, flags, mask); +} +hipError_t hipStreamWriteValue32(hipStream_t stream, void* ptr, uint32_t value, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipStreamWriteValue32_fn(stream, ptr, value, flags); +} +hipError_t hipStreamWriteValue64(hipStream_t stream, void* ptr, uint64_t value, + unsigned int flags) { + return hip::GetHipDispatchTable()->hipStreamWriteValue64_fn(stream, ptr, value, flags); +} +hipError_t hipTexObjectCreate(hipTextureObject_t* pTexObject, const HIP_RESOURCE_DESC* pResDesc, + const HIP_TEXTURE_DESC* pTexDesc, + const HIP_RESOURCE_VIEW_DESC* pResViewDesc) { + return hip::GetHipDispatchTable()->hipTexObjectCreate_fn(pTexObject, pResDesc, pTexDesc, + pResViewDesc); +} +hipError_t hipTexObjectDestroy(hipTextureObject_t texObject) { + return hip::GetHipDispatchTable()->hipTexObjectDestroy_fn(texObject); +} +hipError_t hipTexObjectGetResourceDesc(HIP_RESOURCE_DESC* pResDesc, hipTextureObject_t texObject) { + return hip::GetHipDispatchTable()->hipTexObjectGetResourceDesc_fn(pResDesc, texObject); +} +hipError_t hipTexObjectGetResourceViewDesc(HIP_RESOURCE_VIEW_DESC* pResViewDesc, + hipTextureObject_t texObject) { + return hip::GetHipDispatchTable()->hipTexObjectGetResourceViewDesc_fn(pResViewDesc, texObject); +} +hipError_t hipTexObjectGetTextureDesc(HIP_TEXTURE_DESC* pTexDesc, hipTextureObject_t texObject) { + return hip::GetHipDispatchTable()->hipTexObjectGetTextureDesc_fn(pTexDesc, texObject); +} +hipError_t hipTexRefGetAddress(hipDeviceptr_t* dev_ptr, const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetAddress_fn(dev_ptr, texRef); +} +hipError_t hipTexRefGetAddressMode(enum hipTextureAddressMode* pam, const textureReference* texRef, + int dim) { + return hip::GetHipDispatchTable()->hipTexRefGetAddressMode_fn(pam, texRef, dim); +} +hipError_t hipTexRefGetFilterMode(enum hipTextureFilterMode* pfm, const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetFilterMode_fn(pfm, texRef); +} +hipError_t hipTexRefGetFlags(unsigned int* pFlags, const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetFlags_fn(pFlags, texRef); +} +hipError_t hipTexRefGetFormat(hipArray_Format* pFormat, int* pNumChannels, + const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetFormat_fn(pFormat, pNumChannels, texRef); +} +hipError_t hipTexRefGetMaxAnisotropy(int* pmaxAnsio, const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetMaxAnisotropy_fn(pmaxAnsio, texRef); +} +extern "C" hipError_t hipTexRefGetMipMappedArray(hipMipmappedArray_t* pArray, + const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetMipMappedArray_fn(pArray, texRef); +} +hipError_t hipTexRefGetMipmapFilterMode(enum hipTextureFilterMode* pfm, + const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetMipmapFilterMode_fn(pfm, texRef); +} +hipError_t hipTexRefGetMipmapLevelBias(float* pbias, const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetMipmapLevelBias_fn(pbias, texRef); +} +hipError_t hipTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, + const textureReference* texRef) { + return hip::GetHipDispatchTable()->hipTexRefGetMipmapLevelClamp_fn(pminMipmapLevelClamp, + pmaxMipmapLevelClamp, texRef); +} +hipError_t hipTexRefSetAddress(size_t* ByteOffset, textureReference* texRef, hipDeviceptr_t dptr, + size_t bytes) { + return hip::GetHipDispatchTable()->hipTexRefSetAddress_fn(ByteOffset, texRef, dptr, bytes); +} +hipError_t hipTexRefSetAddress2D(textureReference* texRef, const HIP_ARRAY_DESCRIPTOR* desc, + hipDeviceptr_t dptr, size_t Pitch) { + return hip::GetHipDispatchTable()->hipTexRefSetAddress2D_fn(texRef, desc, dptr, Pitch); +} +hipError_t hipTexRefSetAddressMode(textureReference* texRef, int dim, + enum hipTextureAddressMode am) { + return hip::GetHipDispatchTable()->hipTexRefSetAddressMode_fn(texRef, dim, am); +} +hipError_t hipTexRefSetArray(textureReference* tex, hipArray_const_t array, unsigned int flags) { + return hip::GetHipDispatchTable()->hipTexRefSetArray_fn(tex, array, flags); +} +hipError_t hipTexRefSetBorderColor(textureReference* texRef, float* pBorderColor) { + return hip::GetHipDispatchTable()->hipTexRefSetBorderColor_fn(texRef, pBorderColor); +} +hipError_t hipTexRefSetFilterMode(textureReference* texRef, enum hipTextureFilterMode fm) { + return hip::GetHipDispatchTable()->hipTexRefSetFilterMode_fn(texRef, fm); +} +hipError_t hipTexRefSetFlags(textureReference* texRef, unsigned int Flags) { + return hip::GetHipDispatchTable()->hipTexRefSetFlags_fn(texRef, Flags); +} +hipError_t hipTexRefSetFormat(textureReference* texRef, hipArray_Format fmt, + int NumPackedComponents) { + return hip::GetHipDispatchTable()->hipTexRefSetFormat_fn(texRef, fmt, NumPackedComponents); +} +hipError_t hipTexRefSetMaxAnisotropy(textureReference* texRef, unsigned int maxAniso) { + return hip::GetHipDispatchTable()->hipTexRefSetMaxAnisotropy_fn(texRef, maxAniso); +} +hipError_t hipTexRefSetMipmapFilterMode(textureReference* texRef, enum hipTextureFilterMode fm) { + return hip::GetHipDispatchTable()->hipTexRefSetMipmapFilterMode_fn(texRef, fm); +} +hipError_t hipTexRefSetMipmapLevelBias(textureReference* texRef, float bias) { + return hip::GetHipDispatchTable()->hipTexRefSetMipmapLevelBias_fn(texRef, bias); +} +hipError_t hipTexRefSetMipmapLevelClamp(textureReference* texRef, float minMipMapLevelClamp, + float maxMipMapLevelClamp) { + return hip::GetHipDispatchTable()->hipTexRefSetMipmapLevelClamp_fn(texRef, minMipMapLevelClamp, + maxMipMapLevelClamp); +} +hipError_t hipTexRefSetMipmappedArray(textureReference* texRef, + struct hipMipmappedArray* mipmappedArray, + unsigned int Flags) { + return hip::GetHipDispatchTable()->hipTexRefSetMipmappedArray_fn(texRef, mipmappedArray, Flags); +} +hipError_t hipThreadExchangeStreamCaptureMode(hipStreamCaptureMode* mode) { + return hip::GetHipDispatchTable()->hipThreadExchangeStreamCaptureMode_fn(mode); +} +extern "C" hipError_t hipUnbindTexture(const textureReference* tex) { + return hip::GetHipDispatchTable()->hipUnbindTexture_fn(tex); +} +hipError_t hipUserObjectCreate(hipUserObject_t* object_out, void* ptr, hipHostFn_t destroy, + unsigned int initialRefcount, unsigned int flags) { + return hip::GetHipDispatchTable()->hipUserObjectCreate_fn(object_out, ptr, destroy, + initialRefcount, flags); +} +hipError_t hipUserObjectRelease(hipUserObject_t object, unsigned int count) { + return hip::GetHipDispatchTable()->hipUserObjectRelease_fn(object, count); +} +hipError_t hipUserObjectRetain(hipUserObject_t object, unsigned int count) { + return hip::GetHipDispatchTable()->hipUserObjectRetain_fn(object, count); +} +hipError_t hipWaitExternalSemaphoresAsync(const hipExternalSemaphore_t* extSemArray, + const hipExternalSemaphoreWaitParams* paramsArray, + unsigned int numExtSems, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipWaitExternalSemaphoresAsync_fn(extSemArray, paramsArray, + numExtSems, stream); +} +extern "C" hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w, + hipChannelFormatKind f) { + return hip::GetHipDispatchTable()->hipCreateChannelDesc_fn(x, y, z, w, f); +} +hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, + uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, + uint32_t localWorkSizeX, uint32_t localWorkSizeY, + uint32_t localWorkSizeZ, size_t sharedMemBytes, + hipStream_t hStream, void** kernelParams, void** extra, + hipEvent_t startEvent, hipEvent_t stopEvent, uint32_t flags) { + return hip::GetHipDispatchTable()->hipExtModuleLaunchKernel_fn( + f, globalWorkSizeX, globalWorkSizeY, globalWorkSizeZ, localWorkSizeX, localWorkSizeY, + localWorkSizeZ, sharedMemBytes, hStream, kernelParams, extra, startEvent, stopEvent, flags); +} +hipError_t hipHccModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, + uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, + uint32_t localWorkSizeX, uint32_t localWorkSizeY, + uint32_t localWorkSizeZ, size_t sharedMemBytes, + hipStream_t hStream, void** kernelParams, void** extra, + hipEvent_t startEvent, hipEvent_t stopEvent) { + return hip::GetHipDispatchTable()->hipHccModuleLaunchKernel_fn( + f, globalWorkSizeX, globalWorkSizeY, globalWorkSizeZ, localWorkSizeX, localWorkSizeY, + localWorkSizeZ, sharedMemBytes, hStream, kernelParams, extra, startEvent, stopEvent); +} +hipError_t hipMemcpy_spt(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpy_spt_fn(dst, src, sizeBytes, kind); +} +hipError_t hipMemcpyToSymbol_spt(const void* symbol, const void* src, size_t sizeBytes, + size_t offset, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpyToSymbol_spt_fn(symbol, src, sizeBytes, offset, kind); +} +hipError_t hipMemcpyFromSymbol_spt(void* dst, const void* symbol, size_t sizeBytes, size_t offset, + hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpyFromSymbol_spt_fn(dst, symbol, sizeBytes, offset, + kind); +} +hipError_t hipMemcpy2D_spt(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, + size_t height, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpy2D_spt_fn(dst, dpitch, src, spitch, width, height, + kind); +} +hipError_t hipMemcpy2DFromArray_spt(void* dst, size_t dpitch, hipArray_const_t src, size_t wOffset, + size_t hOffset, size_t width, size_t height, + hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpy2DFromArray_spt_fn(dst, dpitch, src, wOffset, hOffset, + width, height, kind); +} +hipError_t hipMemcpy3D_spt(const struct hipMemcpy3DParms* p) { + return hip::GetHipDispatchTable()->hipMemcpy3D_spt_fn(p); +} +hipError_t hipMemset_spt(void* dst, int value, size_t sizeBytes) { + return hip::GetHipDispatchTable()->hipMemset_spt_fn(dst, value, sizeBytes); +} +hipError_t hipMemsetAsync_spt(void* dst, int value, size_t sizeBytes, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemsetAsync_spt_fn(dst, value, sizeBytes, stream); +} +hipError_t hipMemset2D_spt(void* dst, size_t pitch, int value, size_t width, size_t height) { + return hip::GetHipDispatchTable()->hipMemset2D_spt_fn(dst, pitch, value, width, height); +} +hipError_t hipMemset2DAsync_spt(void* dst, size_t pitch, int value, size_t width, size_t height, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemset2DAsync_spt_fn(dst, pitch, value, width, height, + stream); +} +hipError_t hipMemset3DAsync_spt(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemset3DAsync_spt_fn(pitchedDevPtr, value, extent, stream); +} +hipError_t hipMemset3D_spt(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent) { + return hip::GetHipDispatchTable()->hipMemset3D_spt_fn(pitchedDevPtr, value, extent); +} +hipError_t hipMemcpyAsync_spt(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyAsync_spt_fn(dst, src, sizeBytes, kind, stream); +} +hipError_t hipMemcpy3DAsync_spt(const hipMemcpy3DParms* p, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpy3DAsync_spt_fn(p, stream); +} +hipError_t hipMemcpy2DAsync_spt(void* dst, size_t dpitch, const void* src, size_t spitch, + size_t width, size_t height, hipMemcpyKind kind, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpy2DAsync_spt_fn(dst, dpitch, src, spitch, width, + height, kind, stream); +} +hipError_t hipMemcpyFromSymbolAsync_spt(void* dst, const void* symbol, size_t sizeBytes, + size_t offset, hipMemcpyKind kind, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyFromSymbolAsync_spt_fn(dst, symbol, sizeBytes, offset, + kind, stream); +} +hipError_t hipMemcpyToSymbolAsync_spt(const void* symbol, const void* src, size_t sizeBytes, + size_t offset, hipMemcpyKind kind, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpyToSymbolAsync_spt_fn(symbol, src, sizeBytes, offset, + kind, stream); +} +hipError_t hipMemcpyFromArray_spt(void* dst, hipArray_const_t src, size_t wOffsetSrc, + size_t hOffset, size_t count, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpyFromArray_spt_fn(dst, src, wOffsetSrc, hOffset, count, + kind); +} +hipError_t hipMemcpy2DToArray_spt(hipArray_t dst, size_t wOffset, size_t hOffset, const void* src, + size_t spitch, size_t width, size_t height, hipMemcpyKind kind) { + return hip::GetHipDispatchTable()->hipMemcpy2DToArray_spt_fn(dst, wOffset, hOffset, src, spitch, + width, height, kind); +} +hipError_t hipMemcpy2DFromArrayAsync_spt(void* dst, size_t dpitch, hipArray_const_t src, + size_t wOffsetSrc, size_t hOffsetSrc, size_t width, + size_t height, hipMemcpyKind kind, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpy2DFromArrayAsync_spt_fn( + dst, dpitch, src, wOffsetSrc, hOffsetSrc, width, height, kind, stream); +} +hipError_t hipMemcpy2DToArrayAsync_spt(hipArray_t dst, size_t wOffset, size_t hOffset, + const void* src, size_t spitch, size_t width, size_t height, + hipMemcpyKind kind, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipMemcpy2DToArrayAsync_spt_fn( + dst, wOffset, hOffset, src, spitch, width, height, kind, stream); +} +hipError_t hipStreamQuery_spt(hipStream_t stream) { + return hip::GetHipDispatchTable()->hipStreamQuery_spt_fn(stream); +} +hipError_t hipStreamSynchronize_spt(hipStream_t stream) { + return hip::GetHipDispatchTable()->hipStreamSynchronize_spt_fn(stream); +} +hipError_t hipStreamGetPriority_spt(hipStream_t stream, int* priority) { + return hip::GetHipDispatchTable()->hipStreamGetPriority_spt_fn(stream, priority); +} +hipError_t hipStreamWaitEvent_spt(hipStream_t stream, hipEvent_t event, unsigned int flags) { + return hip::GetHipDispatchTable()->hipStreamWaitEvent_spt_fn(stream, event, flags); +} +hipError_t hipStreamGetFlags_spt(hipStream_t stream, unsigned int* flags) { + return hip::GetHipDispatchTable()->hipStreamGetFlags_spt_fn(stream, flags); +} +hipError_t hipStreamAddCallback_spt(hipStream_t stream, hipStreamCallback_t callback, + void* userData, unsigned int flags) { + return hip::GetHipDispatchTable()->hipStreamAddCallback_spt_fn(stream, callback, userData, flags); +} +hipError_t hipEventRecord_spt(hipEvent_t event, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipEventRecord_spt_fn(event, stream); +} +hipError_t hipLaunchCooperativeKernel_spt(const void* f, dim3 gridDim, dim3 blockDim, + void** kernelParams, uint32_t sharedMemBytes, + hipStream_t hStream) { + return hip::GetHipDispatchTable()->hipLaunchCooperativeKernel_spt_fn( + f, gridDim, blockDim, kernelParams, sharedMemBytes, hStream); +} + +extern "C" hipError_t hipLaunchKernel_spt(const void* function_address, dim3 numBlocks, + dim3 dimBlocks, void** args, size_t sharedMemBytes, + hipStream_t stream) { + return hip::GetHipDispatchTable()->hipLaunchKernel_spt_fn(function_address, numBlocks, dimBlocks, + args, sharedMemBytes, stream); +} + +hipError_t hipGraphLaunch_spt(hipGraphExec_t graphExec, hipStream_t stream) { + return hip::GetHipDispatchTable()->hipGraphLaunch_spt_fn(graphExec, stream); +} +hipError_t hipStreamBeginCapture_spt(hipStream_t stream, hipStreamCaptureMode mode) { + return hip::GetHipDispatchTable()->hipStreamBeginCapture_spt_fn(stream, mode); +} +hipError_t hipStreamEndCapture_spt(hipStream_t stream, hipGraph_t* pGraph) { + return hip::GetHipDispatchTable()->hipStreamEndCapture_spt_fn(stream, pGraph); +} +hipError_t hipStreamIsCapturing_spt(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus) { + return hip::GetHipDispatchTable()->hipStreamIsCapturing_spt_fn(stream, pCaptureStatus); +} +hipError_t hipStreamGetCaptureInfo_spt(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus, + unsigned long long* pId) { + return hip::GetHipDispatchTable()->hipStreamGetCaptureInfo_spt_fn(stream, pCaptureStatus, pId); +} +hipError_t hipStreamGetCaptureInfo_v2_spt(hipStream_t stream, + hipStreamCaptureStatus* captureStatus_out, + unsigned long long* id_out, hipGraph_t* graph_out, + const hipGraphNode_t** dependencies_out, + size_t* numDependencies_out) { + return hip::GetHipDispatchTable()->hipStreamGetCaptureInfo_v2_spt_fn( + stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out); +} +hipError_t hipLaunchHostFunc_spt(hipStream_t stream, hipHostFn_t fn, void* userData) { + return hip::GetHipDispatchTable()->hipLaunchHostFunc_spt_fn(stream, fn, userData); +} +extern "C" int hipGetStreamDeviceId(hipStream_t stream) { + return hip::GetHipDispatchTable()->hipGetStreamDeviceId_fn(stream); +} diff --git a/hipamd/src/hip_texture.cpp b/hipamd/src/hip_texture.cpp index 3c831b108d..eb9652973e 100644 --- a/hipamd/src/hip_texture.cpp +++ b/hipamd/src/hip_texture.cpp @@ -25,8 +25,6 @@ #include "hip_conversions.hpp" #include "platform/sampler.hpp" -hipError_t ihipFree(void* ptr); - struct __hip_texture { uint32_t imageSRD[HIP_IMAGE_OBJECT_SIZE_DWORD]; uint32_t samplerSRD[HIP_SAMPLER_OBJECT_SIZE_DWORD]; @@ -57,6 +55,9 @@ struct __hip_texture { } }; +namespace hip { + +hipError_t ihipFree(void* ptr); amd::Image* ihipImageCreate(const cl_channel_order channelOrder, const cl_channel_type channelType, const cl_mem_object_type imageType, @@ -1317,7 +1318,7 @@ hipError_t hipTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, HIP_RETURN(hipErrorInvalidValue); } -hipError_t hipTexRefGetMipmappedArray(hipMipmappedArray_t* pArray, +hipError_t hipTexRefGetMipMappedArray(hipMipmappedArray_t* pArray, const textureReference* texRef) { // TODO overload operator<<(ostream&, textureReference&). HIP_INIT_API(hipTexRefGetMipmappedArray, pArray, &texRef); @@ -1579,3 +1580,4 @@ hipError_t hipTexObjectGetTextureDesc(HIP_TEXTURE_DESC* pTexDesc, HIP_RETURN(hipSuccess); } +} // namespace hip diff --git a/hipamd/src/hip_vm.cpp b/hipamd/src/hip_vm.cpp index d68dc2501c..45f9ea00fc 100644 --- a/hipamd/src/hip_vm.cpp +++ b/hipamd/src/hip_vm.cpp @@ -21,6 +21,7 @@ #include #include "hip_internal.hpp" #include "hip_vm.hpp" +namespace hip { static_assert(static_cast(hipMemAccessFlagsProtNone) == static_cast(amd::Device::VmmAccess::kNone), @@ -324,3 +325,5 @@ hipError_t hipMemUnmap(void* ptr, size_t size) { HIP_RETURN(hipSuccess); } +} //namespace hip + diff --git a/hipamd/src/hip_vm.hpp b/hipamd/src/hip_vm.hpp index 241c07dda7..3302ace54f 100644 --- a/hipamd/src/hip_vm.hpp +++ b/hipamd/src/hip_vm.hpp @@ -26,10 +26,10 @@ #include "platform/object.hpp" -hipError_t ihipFree(void* ptr); - namespace hip { +hipError_t ihipFree(void* ptr); + struct MemMapAllocUserData { void* ptr_; // Original pointer of the allocation size_t size_; // Aligned size of the allocation