From 4ff355357f9d8f583d7453fe81d3fc9e0f28fb89 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Thu, 24 Jan 2019 14:05:36 +0300 Subject: [PATCH] [HIPIFY] CUDA Runtime API functions total revise (up to CUDA 10.0) + for all CUDA versions starting from 7.0 + add missing functions + sync with HIP + update CUDA_Runtime_API_functions_supported_by_HIP.md + update affected tests + fix typos + formatting, annotating --- ...A_Driver_API_functions_supported_by_HIP.md | 6 +- ..._Runtime_API_functions_supported_by_HIP.md | 75 +- .../src/CUDA2HIP_Driver_API_functions.cpp | 34 +- .../src/CUDA2HIP_Runtime_API_functions.cpp | 945 +++++++++++------- .../cuRAND/benchmark_curand_generate.cpp | 2 +- .../cuRAND/benchmark_curand_kernel.cpp | 2 +- 6 files changed, 676 insertions(+), 388 deletions(-) diff --git a/docs/markdown/CUDA_Driver_API_functions_supported_by_HIP.md b/docs/markdown/CUDA_Driver_API_functions_supported_by_HIP.md index b4f379879b..dc22286d84 100644 --- a/docs/markdown/CUDA_Driver_API_functions_supported_by_HIP.md +++ b/docs/markdown/CUDA_Driver_API_functions_supported_by_HIP.md @@ -770,7 +770,7 @@ | **CUDA** | **HIP** | |-----------------------------------------------------------|-------------------------------| | `cuDeviceComputeCapability` | `hipDeviceComputeCapability` | -| `cuDeviceGetProperties` | `hipGetDeviceProperties` | +| `cuDeviceGetProperties` | | ## **7. Primary Context Management** @@ -800,7 +800,7 @@ | `cuCtxPushCurrent` | `hipCtxPushCurrent` | | `cuCtxSetCacheConfig` | `hipCtxSetCacheConfig` | | `cuCtxSetCurrent` | `hipCtxSetCurrent` | -| `cuCtxSetLimit` | | +| `cuCtxSetLimit` | `hipDeviceSetLimit` | | `cuCtxSetSharedMemConfig` | `hipCtxSetSharedMemConfig` | | `cuCtxSynchronize` | `hipCtxSynchronize` | @@ -861,7 +861,7 @@ | `cuMemcpyAsync` | | | `cuMemcpyAtoA` | | | `cuMemcpyAtoD` | | -| `cuMemcpyAtoH` | | +| `cuMemcpyAtoH` | `hipMemcpyAtoH` | | `cuMemcpyAtoHAsync` | | | `cuMemcpyDtoA` | | | `cuMemcpyDtoD` | `hipMemcpyDtoD` | diff --git a/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md b/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md index 087b49b977..da3f3d4c46 100644 --- a/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md +++ b/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md @@ -29,6 +29,7 @@ | `cudaSetDevice` | `hipSetDevice` | | `cudaSetDeviceFlags` | `hipSetDeviceFlags` | | `cudaSetValidDevices` | | +| `cudaDeviceGetP2PAttribute` | | ## **2. Thread Management [DEPRECATED]** @@ -99,6 +100,7 @@ | **CUDA** | **HIP** | |-----------------------------------------------------------|-------------------------------| | `cudaFuncGetAttributes` | | +| `cudaFuncSetAttribute` | | | `cudaFuncSetCacheConfig` | `hipFuncSetCacheConfig` | | `cudaFuncSetSharedMemConfig` | | | `cudaGetParameterBuffer` | | @@ -106,6 +108,9 @@ | `cudaLaunchKernel` | `hipLaunchKernel` | | `cudaSetDoubleForDevice` | | | `cudaSetDoubleForHost` | | +| `cudaLaunchCooperativeKernel` | | +| `cudaLaunchCooperativeKernelMultiDevice` | | +| `cudaLaunchHostFunc` | | ## **8. Occupancy** @@ -148,6 +153,7 @@ | `cudaMallocMipmappedArray` | | | `cudaMallocPitch` | | | `cudaMemGetInfo` | `hipMemGetInfo` | +| `cudaMemPrefetchAsync` | | | `cudaMemcpy` | `hipMemcpy` | | `cudaMemcpy2D` | `hipMemcpy2D` | | `cudaMemcpy2DArrayToArray` | | @@ -162,10 +168,10 @@ | `cudaMemcpy3DPeerAsync` | | | `cudaMemcpyArrayToArray` | | | `cudaMemcpyAsync` | `hipMemcpyAsync` | -| `cudaMemcpyFromArray` | `MemcpyFromArray` | +| `cudaMemcpyFromArray` | `hipMemcpyFromArray` | | `cudaMemcpyFromArrayAsync` | | | `cudaMemcpyFromSymbol` | `hipMemcpyFromSymbol` | -| `cudaMemcpyFromSymbolAsync` | | +| `cudaMemcpyFromSymbolAsync` | `hipMemcpyFromSymbolAsync` | | `cudaMemcpyPeer` | `hipMemcpyPeer` | | `cudaMemcpyPeerAsync` | `hipMemcpyPeerAsync` | | `cudaMemcpyToArray` | `hipMemcpyToArray` | @@ -299,11 +305,13 @@ | `cudaEGLStreamConsumerAcquireFrame` | | | `cudaEGLStreamConsumerConnect` | | | `cudaEGLStreamConsumerConnectWithFlags` | | +| `cudaEGLStreamConsumerDisconnect` | | | `cudaEGLStreamConsumerReleaseFrame` | | | `cudaEGLStreamProducerConnect` | | | `cudaEGLStreamProducerDisconnect` | | | `cudaEGLStreamProducerPresentFrame` | | | `cudaEGLStreamProducerReturnFrame` | | +| `cudaEventCreateFromEGLSync` | | | `cudaGraphicsEGLRegisterImage` | | | `cudaGraphicsResourceGetMappedEglFrame` | | @@ -321,17 +329,17 @@ ## **24. Texture Reference Management** -| **CUDA** | **HIP** | -|-----------------------------------------------------------|-------------------------------| -| `cudaBindTexture` | `hipBindTexture` | -| `cudaBindTexture2D` | `hipBindTexture2D` | -| `cudaBindTextureToArray` | `hipBindTextureToArray` | -| `cudaBindTextureToMipmappedArray` | | -| `cudaCreateChannelDesc` | `hipCreateChannelDesc` | -| `cudaGetChannelDesc` | `hipGetChannelDesc` | -| `cudaGetTextureAlignmentOffset` | | -| `cudaGetTextureReference` | | -| `cudaUnbindTexture` | `hipUnbindTexture` | +| **CUDA** | **HIP** | +|-----------------------------------------------------------|----------------------------------| +| `cudaBindTexture` | `hipBindTexture` | +| `cudaBindTexture2D` | `hipBindTexture2D` | +| `cudaBindTextureToArray` | `hipBindTextureToArray` | +| `cudaBindTextureToMipmappedArray` | `hipBindTextureToMipmappedArray` | +| `cudaCreateChannelDesc` | `hipCreateChannelDesc` | +| `cudaGetChannelDesc` | `hipGetChannelDesc` | +| `cudaGetTextureAlignmentOffset` | `hipGetTextureAlignmentOffset` | +| `cudaGetTextureReference` | `hipGetTextureReference` | +| `cudaUnbindTexture` | `hipUnbindTexture` | ## **25. Surface Reference Management** @@ -369,6 +377,37 @@ | **CUDA** | **HIP** | |-----------------------------------------------------------|-------------------------------| +| `cudaGraphAddChildGraphNode` | | +| `cudaGraphAddDependencies` | | +| `cudaGraphAddEmptyNode` | | +| `cudaGraphAddHostNode` | | +| `cudaGraphAddKernelNode` | | +| `cudaGraphAddMemcpyNode` | | +| `cudaGraphAddMemsetNode` | | +| `cudaGraphChildGraphNodeGetGraph` | | +| `cudaGraphClone` | | +| `cudaGraphCreate` | | +| `cudaGraphDestroy` | | +| `cudaGraphDestroyNode` | | +| `cudaGraphExecDestroy` | | +| `cudaGraphGetEdges` | | +| `cudaGraphGetNodes` | | +| `cudaGraphGetRootNodes` | | +| `cudaGraphHostNodeGetParams` | | +| `cudaGraphHostNodeSetParams` | | +| `cudaGraphInstantiate` | | +| `cudaGraphKernelNodeGetParams` | | +| `cudaGraphKernelNodeSetParams` | | +| `cudaGraphLaunch` | | +| `cudaGraphMemcpyNodeGetParams` | | +| `cudaGraphMemcpyNodeSetParams` | | +| `cudaGraphMemsetNodeGetParams` | | +| `cudaGraphMemsetNodeSetParams` | | +| `cudaGraphNodeFindInClone` | | +| `cudaGraphNodeGetDependencies` | | +| `cudaGraphNodeGetDependentNodes` | | +| `cudaGraphNodeGetType` | | +| `cudaGraphRemoveDependencies` | | ## **30. C++ API Routines** *(7.0 contains, 7.5 doesn’t)* @@ -381,12 +420,15 @@ | `cudaBindTextureToArray` | | | `cudaBindTextureToMipmappedArray` | | | `cudaCreateChannelDesc` | `hipCreateChannelDesc` | +| `cudaEventCreate` | | | `cudaFuncGetAttributes` | | +| `cudaFuncSetAttribute` | | | `cudaFuncSetCacheConfig` | | | `cudaGetSymbolAddress` | `hipGetSymbolAddress` | | `cudaGetSymbolSize` | `hipGetSymbolSize` | | `cudaGetTextureAlignmentOffset` | | | `cudaLaunch` | | +| `cudaLaunchCooperativeKernel` | | | `cudaLaunchKernel` | | | `cudaMallocHost` | | | `cudaMallocManaged` | | @@ -397,9 +439,9 @@ | `cudaOccupancyMaxActiveBlocksPerMultiprocessor` | `hipOccupancyMaxActiveBlocksPerMultiprocessor` | | `cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` | | | `cudaOccupancyMaxPotentialBlockSize` | `hipOccupancyMaxPotentialBlockSize` | +| `cudaOccupancyMaxPotentialBlockSizeWithFlags` | | | `cudaOccupancyMaxPotentialBlockSizeVariableSMem` | | | `cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags` | | -| `cudaOccupancyMaxPotentialBlockSizeWithFlags` | | | `cudaSetupArgument` | | | `cudaStreamAttachMemAsync` | | | `cudaUnbindTexture` | `hipUnbindTexture` | @@ -876,11 +918,6 @@ | 1 |*`cudaAddressModeClamp`* |*`hipAddressModeClamp`* | | 2 |*`cudaAddressModeMirror`* |*`hipAddressModeMirror`* | | 3 |*`cudaAddressModeBorder`* |*`hipAddressModeBorder`* | -| enum |***`cudaTextureAddressMode`*** |***`hipTextureAddressMode`*** | -| 0 |*`cudaAddressModeWrap`* |*`hipAddressModeWrap`* | -| 1 |*`cudaAddressModeClamp`* |*`hipAddressModeClamp`* | -| 2 |*`cudaAddressModeMirror`* |*`hipAddressModeMirror`* | -| 3 |*`cudaAddressModeBorder`* |*`hipAddressModeBorder`* | | enum |***`cudaTextureFilterMode`*** |***`hipTextureFilterMode`*** | | 0 |*`cudaFilterModePoint`* |*`hipFilterModePoint`* | | 1 |*`cudaFilterModeLinear`* |*`hipFilterModeLinear`* | diff --git a/hipify-clang/src/CUDA2HIP_Driver_API_functions.cpp b/hipify-clang/src/CUDA2HIP_Driver_API_functions.cpp index f7990b2df4..8ad95cb537 100644 --- a/hipify-clang/src/CUDA2HIP_Driver_API_functions.cpp +++ b/hipify-clang/src/CUDA2HIP_Driver_API_functions.cpp @@ -26,10 +26,10 @@ THE SOFTWARE. const std::map CUDA_DRIVER_FUNCTION_MAP{ // 5.2. Error Handling // no analogue - // NOTE: cudaGetErrorName and hipGetErrorName have different signature + // NOTE: cudaGetErrorName and cuGetErrorName have different signatures {"cuGetErrorName", {"hipGetErrorName_", "", CONV_ERROR, API_DRIVER, HIP_UNSUPPORTED}}, // no analogue - // NOTE: cudaGetErrorString and hipGetErrorString have different signature + // NOTE: cudaGetErrorString and cuGetErrorString have different signatures {"cuGetErrorString", {"hipGetErrorString_", "", CONV_ERROR, API_DRIVER, HIP_UNSUPPORTED}}, // 5.3. Initialization @@ -60,7 +60,9 @@ const std::map CUDA_DRIVER_FUNCTION_MAP{ // 5.6. Device Management [DEPRECATED] {"cuDeviceComputeCapability", {"hipDeviceComputeCapability", "", CONV_DEVICE, API_DRIVER}}, - {"cuDeviceGetProperties", {"hipGetDeviceProperties", "", CONV_DEVICE, API_DRIVER}}, + // no analogue + // NOTE: Not equal to cudaGetDeviceProperties due to different attributes: cudaDeviceProp and CUdevprop + {"cuDeviceGetProperties", {"hipGetDeviceProperties_", "", CONV_DEVICE, API_DRIVER, HIP_UNSUPPORTED}}, // 5.7. Primary Context Management // no analogues @@ -85,6 +87,8 @@ const std::map CUDA_DRIVER_FUNCTION_MAP{ {"cuCtxGetFlags", {"hipCtxGetFlags", "", CONV_CONTEXT, API_DRIVER}}, // cudaDeviceGetLimit {"cuCtxGetLimit", {"hipDeviceGetLimit", "", CONV_CONTEXT, API_DRIVER}}, + // cudaDeviceGetSharedMemConfig + // TODO: rename to hipDeviceGetSharedMemConfig {"cuCtxGetSharedMemConfig", {"hipCtxGetSharedMemConfig", "", CONV_CONTEXT, API_DRIVER}}, // cudaDeviceGetStreamPriorityRange {"cuCtxGetStreamPriorityRange", {"hipDeviceGetStreamPriorityRange", "", CONV_CONTEXT, API_DRIVER}}, @@ -94,8 +98,13 @@ const std::map CUDA_DRIVER_FUNCTION_MAP{ {"cuCtxPushCurrent_v2", {"hipCtxPushCurrent", "", CONV_CONTEXT, API_DRIVER}}, {"cuCtxSetCacheConfig", {"hipCtxSetCacheConfig", "", CONV_CONTEXT, API_DRIVER}}, {"cuCtxSetCurrent", {"hipCtxSetCurrent", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxSetLimit", {"hipCtxSetLimit", "", CONV_CONTEXT, API_DRIVER, HIP_UNSUPPORTED}}, + // cudaDeviceSetLimit + {"cuCtxSetLimit", {"hipDeviceSetLimit", "", CONV_CONTEXT, API_DRIVER}}, + // cudaDeviceSetSharedMemConfig + // TODO: rename to hipDeviceSetSharedMemConfig {"cuCtxSetSharedMemConfig", {"hipCtxSetSharedMemConfig", "", CONV_CONTEXT, API_DRIVER}}, + // cudaDeviceSynchronize + // TODO: rename to hipDeviceSynchronize {"cuCtxSynchronize", {"hipCtxSynchronize", "", CONV_CONTEXT, API_DRIVER}}, // 5.9. Context Management [DEPRECATED] @@ -158,6 +167,7 @@ const std::map CUDA_DRIVER_FUNCTION_MAP{ // no analogue {"cuMemAllocManaged", {"hipMemAllocManaged", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, // no analogue + // NOTE: Not equal to cudaMallocPitch due to different signatures {"cuMemAllocPitch", {"hipMemAllocPitch", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, {"cuMemAllocPitch_v2", {"hipMemAllocPitch", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, // no analogue @@ -199,8 +209,8 @@ const std::map CUDA_DRIVER_FUNCTION_MAP{ {"cuMemcpyAtoD", {"hipMemcpyAtoD", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, {"cuMemcpyAtoD_v2", {"hipMemcpyAtoD", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, // no analogue - {"cuMemcpyAtoH", {"hipMemcpyAtoH", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemcpyAtoH_v2", {"hipMemcpyAtoH", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, + {"cuMemcpyAtoH", {"hipMemcpyAtoH", "", CONV_MEMORY, API_DRIVER}}, + {"cuMemcpyAtoH_v2", {"hipMemcpyAtoH", "", CONV_MEMORY, API_DRIVER}}, // no analogue {"cuMemcpyAtoHAsync", {"hipMemcpyAtoHAsync", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, {"cuMemcpyAtoHAsync_v2", {"hipMemcpyAtoHAsync", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, @@ -399,14 +409,14 @@ const std::map CUDA_DRIVER_FUNCTION_MAP{ // NOTE: Not equal to cudaFuncSetCacheConfig due to different signatures {"cuFuncSetCacheConfig", {"hipFuncSetCacheConfig", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, // no analogue - // NOTE: Not equal to cudaFuncSetCacheConfig due to different signatures + // NOTE: Not equal to cudaFuncSetSharedMemConfig due to different signatures {"cuFuncSetSharedMemConfig", {"hipFuncSetSharedMemConfig", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, // no analogue // NOTE: Not equal to cudaLaunchCooperativeKernel due to different signatures - {"cuLaunchCooperativeKernel", {"hipLaunchCooperativeKernel", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, + {"cuLaunchCooperativeKernel", {"hipLaunchCooperativeKernel_", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, // no analogue // NOTE: Not equal to cudaLaunchCooperativeKernelMultiDevice due to different signatures - {"cuLaunchCooperativeKernelMultiDevice", {"hipLaunchCooperativeKernelMultiDevice", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, + {"cuLaunchCooperativeKernelMultiDevice", {"hipLaunchCooperativeKernelMultiDevice_", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, // cudaLaunchHostFunc {"cuLaunchHostFunc", {"hipLaunchHostFunc", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, // no analogue @@ -632,10 +642,12 @@ const std::map CUDA_DRIVER_FUNCTION_MAP{ {"cuGLCtxCreate", {"hipGLCtxCreate", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, // no analogue {"cuGLInit", {"hipGLInit", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, + // no analogue // NOTE: Not equal to cudaGLMapBufferObject due to different signatures - {"cuGLMapBufferObject", {"hipGLMapBufferObject", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, + {"cuGLMapBufferObject", {"hipGLMapBufferObject_", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, + // no analogue // NOTE: Not equal to cudaGLMapBufferObjectAsync due to different signatures - {"cuGLMapBufferObjectAsync", {"hipGLMapBufferObjectAsync", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, + {"cuGLMapBufferObjectAsync", {"hipGLMapBufferObjectAsync_", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, // cudaGLRegisterBufferObject {"cuGLRegisterBufferObject", {"hipGLRegisterBufferObject", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, // cudaGLSetBufferObjectMapFlags diff --git a/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp b/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp index 694c1efcfe..8f5b87a864 100644 --- a/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp +++ b/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp @@ -24,413 +24,652 @@ THE SOFTWARE. // Map of all CUDA Runtime API functions const std::map CUDA_RUNTIME_FUNCTION_MAP{ - // Error API - {"cudaGetLastError", {"hipGetLastError", "", CONV_ERROR, API_RUNTIME}}, - {"cudaPeekAtLastError", {"hipPeekAtLastError", "", CONV_ERROR, API_RUNTIME}}, - {"cudaGetErrorName", {"hipGetErrorName", "", CONV_ERROR, API_RUNTIME}}, - {"cudaGetErrorString", {"hipGetErrorString", "", CONV_ERROR, API_RUNTIME}}, + // 5.1. Device Management + // no analogue + {"cudaChooseDevice", {"hipChooseDevice", "", CONV_DEVICE, API_RUNTIME}}, + // cuDeviceGetAttribute + {"cudaDeviceGetAttribute", {"hipDeviceGetAttribute", "", CONV_DEVICE, API_RUNTIME}}, + // cuDeviceGetByPCIBusId + {"cudaDeviceGetByPCIBusId", {"hipDeviceGetByPCIBusId", "", CONV_DEVICE, API_RUNTIME}}, + // no analogue + {"cudaDeviceGetCacheConfig", {"hipDeviceGetCacheConfig", "", CONV_DEVICE, API_RUNTIME}}, + // cuCtxGetLimit + {"cudaDeviceGetLimit", {"hipDeviceGetLimit", "", CONV_DEVICE, API_RUNTIME}}, + // cuDeviceGetP2PAttribute + {"cudaDeviceGetP2PAttribute", {"hipDeviceGetP2PAttribute", "", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuDeviceGetPCIBusId + {"cudaDeviceGetPCIBusId", {"hipDeviceGetPCIBusId", "", CONV_DEVICE, API_RUNTIME}}, + // cuCtxGetSharedMemConfig + {"cudaDeviceGetSharedMemConfig", {"hipDeviceGetSharedMemConfig", "", CONV_DEVICE, API_RUNTIME}}, + // cuCtxGetStreamPriorityRange + {"cudaDeviceGetStreamPriorityRange", {"hipDeviceGetStreamPriorityRange", "", CONV_DEVICE, API_RUNTIME}}, + // no analogue + {"cudaDeviceReset", {"hipDeviceReset", "", CONV_DEVICE, API_RUNTIME}}, + // no analogue + {"cudaDeviceSetCacheConfig", {"hipDeviceSetCacheConfig", "", CONV_DEVICE, API_RUNTIME}}, + // cuCtxSetLimit + {"cudaDeviceSetLimit", {"hipDeviceSetLimit", "", CONV_DEVICE, API_RUNTIME}}, + // cuCtxSetSharedMemConfig + {"cudaDeviceSetSharedMemConfig", {"hipDeviceSetSharedMemConfig", "", CONV_DEVICE, API_RUNTIME}}, + // cuCtxSynchronize + {"cudaDeviceSynchronize", {"hipDeviceSynchronize", "", CONV_DEVICE, API_RUNTIME}}, + // cuDeviceGet + // NOTE: cuDeviceGet has no attr: int ordinal + {"cudaGetDevice", {"hipGetDevice", "", CONV_DEVICE, API_RUNTIME}}, + // cuDeviceGetCount + {"cudaGetDeviceCount", {"hipGetDeviceCount", "", CONV_DEVICE, API_RUNTIME}}, + // cuCtxGetFlags + // TODO: rename to hipGetDeviceFlags + {"cudaGetDeviceFlags", {"hipCtxGetFlags", "", CONV_DEVICE, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuDeviceGetProperties due to different attributes: CUdevprop and cudaDeviceProp + {"cudaGetDeviceProperties", {"hipGetDeviceProperties", "", CONV_DEVICE, API_RUNTIME}}, + // cuIpcCloseMemHandle + {"cudaIpcCloseMemHandle", {"hipIpcCloseMemHandle", "", CONV_DEVICE, API_RUNTIME}}, + // cuIpcGetEventHandle + {"cudaIpcGetEventHandle", {"hipIpcGetEventHandle", "", CONV_DEVICE, API_RUNTIME}}, + // cuIpcGetMemHandle + {"cudaIpcGetMemHandle", {"hipIpcGetMemHandle", "", CONV_DEVICE, API_RUNTIME}}, + // cuIpcOpenEventHandle + {"cudaIpcOpenEventHandle", {"hipIpcOpenEventHandle", "", CONV_DEVICE, API_RUNTIME}}, + // cuIpcOpenMemHandle + {"cudaIpcOpenMemHandle", {"hipIpcOpenMemHandle", "", CONV_DEVICE, API_RUNTIME}}, + // no analogue + {"cudaSetDevice", {"hipSetDevice", "", CONV_DEVICE, API_RUNTIME}}, + // cuCtxGetFlags + {"cudaSetDeviceFlags", {"hipSetDeviceFlags", "", CONV_DEVICE, API_RUNTIME}}, + // no analogue + {"cudaSetValidDevices", {"hipSetValidDevices", "", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}}, - // memcpy functions + // 5.2. Thread Management [DEPRECATED] // no analogue - // NOTE: Not equal to cuMemcpy due to different signatures - {"cudaMemcpy", {"hipMemcpy", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemcpyToArray", {"hipMemcpyToArray", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemcpyToSymbol", {"hipMemcpyToSymbol", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemcpyToSymbolAsync", {"hipMemcpyToSymbolAsync", "", CONV_MEMORY, API_RUNTIME}}, + {"cudaThreadExit", {"hipDeviceReset", "", CONV_THREAD, API_RUNTIME}}, + // no analogue + {"cudaThreadGetCacheConfig", {"hipDeviceGetCacheConfig", "", CONV_THREAD, API_RUNTIME}}, + // no analogue + {"cudaThreadGetLimit", {"hipThreadGetLimit", "", CONV_THREAD, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaThreadSetCacheConfig", {"hipDeviceSetCacheConfig", "", CONV_THREAD, API_RUNTIME}}, + // no analogue + {"cudaThreadSetLimit", {"hipThreadSetLimit", "", CONV_THREAD, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuCtxSynchronize + {"cudaThreadSynchronize", {"hipDeviceSynchronize", "", CONV_THREAD, API_RUNTIME}}, - {"cudaMemcpyAsync", {"hipMemcpyAsync", "", CONV_MEMORY, API_RUNTIME}}, + // 5.3. Error Handling // no analogue - // NOTE: Not equal to cuMemcpy2D due to different signatures - {"cudaMemcpy2D", {"hipMemcpy2D", "", CONV_MEMORY, API_RUNTIME}}, + // NOTE: cudaGetErrorName and cuGetErrorName have different signatures + {"cudaGetErrorName", {"hipGetErrorName", "", CONV_ERROR, API_RUNTIME}}, // no analogue - // NOTE: Not equal to cuMemcpy2DAsync due to different signatures - {"cudaMemcpy2DAsync", {"hipMemcpy2DAsync", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemcpy2DToArray", {"hipMemcpy2DToArray", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemcpy2DArrayToArray", {"hipMemcpy2DArrayToArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaMemcpy2DFromArray", {"hipMemcpy2DFromArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaMemcpy2DFromArrayAsync", {"hipMemcpy2DFromArrayAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaMemcpy2DToArrayAsync", {"hipMemcpy2DToArrayAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // NOTE: cudaGetErrorString and cuGetErrorString have different signatures + {"cudaGetErrorString", {"hipGetErrorString", "", CONV_ERROR, API_RUNTIME}}, // no analogue - // NOTE: Not equal to cuMemcpy3D due to different signatures - {"cudaMemcpy3D", {"hipMemcpy3D", "", CONV_MEMORY, API_RUNTIME}}, + {"cudaGetLastError", {"hipGetLastError", "", CONV_ERROR, API_RUNTIME}}, // no analogue - // NOTE: Not equal to cuMemcpy3DAsync due to different signatures - {"cudaMemcpy3DAsync", {"hipMemcpy3DAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMemcpy3DPeer due to different signatures - {"cudaMemcpy3DPeer", {"hipMemcpy3DPeer", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMemcpy3DPeerAsync due to different signatures - {"cudaMemcpy3DPeerAsync", {"hipMemcpy3DPeerAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMemcpyAtoA due to different signatures - {"cudaMemcpyArrayToArray", {"hipMemcpyArrayToArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaMemcpyFromArrayAsync", {"hipMemcpyFromArrayAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaMemcpyFromSymbol", {"hipMemcpyFromSymbol", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemcpyFromSymbolAsync", {"hipMemcpyFromSymbolAsync", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemAdvise - {"cudaMemAdvise", {"hipMemAdvise", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuMemRangeGetAttribute - {"cudaMemRangeGetAttribute", {"hipMemRangeGetAttribute", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuMemRangeGetAttributes - {"cudaMemRangeGetAttributes", {"hipMemRangeGetAttributes", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + {"cudaPeekAtLastError", {"hipPeekAtLastError", "", CONV_ERROR, API_RUNTIME}}, - // memset - {"cudaMemset", {"hipMemset", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemsetAsync", {"hipMemsetAsync", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemset2D", {"hipMemset2D", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemset2DAsync", {"hipMemset2DAsync", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemset3D", {"hipMemset3D", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaMemset3DAsync", {"hipMemset3DAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - - // Memory management - // cuMemGetInfo - {"cudaMemGetInfo", {"hipMemGetInfo", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaArrayGetInfo", {"hipArrayGetInfo", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // 5.4. Stream Management + // cuStreamAddCallback + {"cudaStreamAddCallback", {"hipStreamAddCallback", "", CONV_STREAM, API_RUNTIME}}, + // cuStreamAttachMemAsync + {"cudaStreamAttachMemAsync", {"hipStreamAttachMemAsync", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuStreamBeginCapture + {"cudaStreamBeginCapture", {"hipStreamBeginCapture", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, // no analogue - // NOTE: Not equal to cuMipmappedArrayDestroy due to different signatures - {"cudaFreeMipmappedArray", {"hipFreeMipmappedArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaGetMipmappedArrayLevel", {"hipGetMipmappedArrayLevel", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaGetSymbolAddress", {"hipGetSymbolAddress", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaGetSymbolSize", {"hipGetSymbolSize", "", CONV_MEMORY, API_RUNTIME}}, - // TODO: double check cuMemPrefetchAsync - {"cudaMemPrefetchAsync", {"hipMemPrefetchAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // NOTE: Not equal to cuStreamCreate due to different signatures + {"cudaStreamCreate", {"hipStreamCreate", "", CONV_STREAM, API_RUNTIME}}, + // cuStreamCreate + {"cudaStreamCreateWithFlags", {"hipStreamCreateWithFlags", "", CONV_STREAM, API_RUNTIME}}, + // cuStreamCreateWithPriority + {"cudaStreamCreateWithPriority", {"hipStreamCreateWithPriority", "", CONV_STREAM, API_RUNTIME}}, + // cuStreamDestroy + {"cudaStreamDestroy", {"hipStreamDestroy", "", CONV_STREAM, API_RUNTIME}}, + // cuStreamEndCapture + {"cudaStreamEndCapture", {"hipStreamEndCapture", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuStreamGetFlags + {"cudaStreamGetFlags", {"hipStreamGetFlags", "", CONV_STREAM, API_RUNTIME}}, + // cuStreamGetPriority + {"cudaStreamGetPriority", {"hipStreamGetPriority", "", CONV_STREAM, API_RUNTIME}}, + // cuStreamIsCapturing + {"cudaStreamIsCapturing", {"hipStreamIsCapturing", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuStreamQuery + {"cudaStreamQuery", {"hipStreamQuery", "", CONV_STREAM, API_RUNTIME}}, + // cuStreamSynchronize + {"cudaStreamSynchronize", {"hipStreamSynchronize", "", CONV_STREAM, API_RUNTIME}}, + // cuStreamWaitEvent + {"cudaStreamWaitEvent", {"hipStreamWaitEvent", "", CONV_STREAM, API_RUNTIME}}, - // malloc - {"cudaMalloc", {"hipMalloc", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMallocHost", {"hipHostMalloc", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMallocArray", {"hipMallocArray", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMalloc3D", {"hipMalloc3D", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMalloc3DArray", {"hipMalloc3DArray", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMallocManaged", {"hipMallocManaged", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMipmappedArrayCreate due to different signatures - {"cudaMallocMipmappedArray", {"hipMallocMipmappedArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaMallocPitch", {"hipMallocPitch", "", CONV_MEMORY, API_RUNTIME}}, - - // cuMemFree - {"cudaFree", {"hipFree", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemFreeHost - {"cudaFreeHost", {"hipHostFree", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaFreeArray", {"hipFreeArray", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemHostRegister - {"cudaHostRegister", {"hipHostRegister", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemHostUnregister - {"cudaHostUnregister", {"hipHostUnregister", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemHostAlloc - // NOTE: hipHostAlloc deprecated - use hipHostMalloc instead - {"cudaHostAlloc", {"hipHostMalloc", "", CONV_MEMORY, API_RUNTIME}}, - - // make memory functions - {"make_cudaExtent", {"make_hipExtent", "", CONV_MEMORY, API_RUNTIME}}, - {"make_cudaPitchedPtr", {"make_hipPitchedPtr", "", CONV_MEMORY, API_RUNTIME}}, - {"make_cudaPos", {"make_hipPos", "", CONV_MEMORY, API_RUNTIME}}, - - // Host Register Flags - // cuMemHostGetFlags - {"cudaHostGetFlags", {"hipHostGetFlags", "", CONV_MEMORY, API_RUNTIME}}, - - // Events + // 5.5.Event Management // no analogue // NOTE: Not equal to cuEventCreate due to different signatures - {"cudaEventCreate", {"hipEventCreate", "", CONV_EVENT, API_RUNTIME}}, + {"cudaEventCreate", {"hipEventCreate", "", CONV_EVENT, API_RUNTIME}}, // cuEventCreate - {"cudaEventCreateWithFlags", {"hipEventCreateWithFlags", "", CONV_EVENT, API_RUNTIME}}, + {"cudaEventCreateWithFlags", {"hipEventCreateWithFlags", "", CONV_EVENT, API_RUNTIME}}, // cuEventDestroy - {"cudaEventDestroy", {"hipEventDestroy", "", CONV_EVENT, API_RUNTIME}}, - // cuEventRecord - {"cudaEventRecord", {"hipEventRecord", "", CONV_EVENT, API_RUNTIME}}, + {"cudaEventDestroy", {"hipEventDestroy", "", CONV_EVENT, API_RUNTIME}}, // cuEventElapsedTime - {"cudaEventElapsedTime", {"hipEventElapsedTime", "", CONV_EVENT, API_RUNTIME}}, - // cuEventSynchronize - {"cudaEventSynchronize", {"hipEventSynchronize", "", CONV_EVENT, API_RUNTIME}}, + {"cudaEventElapsedTime", {"hipEventElapsedTime", "", CONV_EVENT, API_RUNTIME}}, // cuEventQuery - {"cudaEventQuery", {"hipEventQuery", "", CONV_EVENT, API_RUNTIME}}, + {"cudaEventQuery", {"hipEventQuery", "", CONV_EVENT, API_RUNTIME}}, + // cuEventRecord + {"cudaEventRecord", {"hipEventRecord", "", CONV_EVENT, API_RUNTIME}}, + // cuEventSynchronize + {"cudaEventSynchronize", {"hipEventSynchronize", "", CONV_EVENT, API_RUNTIME}}, // 5.6. External Resource Interoperability // cuDestroyExternalMemory - {"cudaDestroyExternalMemory", {"hipDestroyExternalMemory", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, + {"cudaDestroyExternalMemory", {"hipDestroyExternalMemory", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, // cuDestroyExternalSemaphore - {"cudaDestroyExternalSemaphore", {"hipDestroyExternalSemaphore", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, + {"cudaDestroyExternalSemaphore", {"hipDestroyExternalSemaphore", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, // cuExternalMemoryGetMappedBuffer - {"cudaExternalMemoryGetMappedBuffer", {"hipExternalMemoryGetMappedBuffer", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, + {"cudaExternalMemoryGetMappedBuffer", {"hipExternalMemoryGetMappedBuffer", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, // cuExternalMemoryGetMappedMipmappedArray - {"cudaExternalMemoryGetMappedMipmappedArray", {"hipExternalMemoryGetMappedMipmappedArray", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, + {"cudaExternalMemoryGetMappedMipmappedArray", {"hipExternalMemoryGetMappedMipmappedArray", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, // cuImportExternalMemory - {"cudaImportExternalMemory", {"hipImportExternalMemory", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, + {"cudaImportExternalMemory", {"hipImportExternalMemory", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, // cuImportExternalSemaphore - {"cudaImportExternalSemaphore", {"hipImportExternalSemaphore", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, + {"cudaImportExternalSemaphore", {"hipImportExternalSemaphore", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, // cuSignalExternalSemaphoresAsync - {"cudaSignalExternalSemaphoresAsync", {"hipSignalExternalSemaphoresAsync", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, + {"cudaSignalExternalSemaphoresAsync", {"hipSignalExternalSemaphoresAsync", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, // cuWaitExternalSemaphoresAsync - {"cudaWaitExternalSemaphoresAsync", {"hipWaitExternalSemaphoresAsync", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, + {"cudaWaitExternalSemaphoresAsync", {"hipWaitExternalSemaphoresAsync", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, - // Streams + // 5.7. Execution Control // no analogue - // NOTE: Not equal to cuStreamCreate due to different signatures - {"cudaStreamCreate", {"hipStreamCreate", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamCreate - {"cudaStreamCreateWithFlags", {"hipStreamCreateWithFlags", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamCreateWithPriority - {"cudaStreamCreateWithPriority", {"hipStreamCreateWithPriority", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamDestroy - {"cudaStreamDestroy", {"hipStreamDestroy", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamWaitEvent - {"cudaStreamWaitEvent", {"hipStreamWaitEvent", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamSynchronize - {"cudaStreamSynchronize", {"hipStreamSynchronize", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamGetFlags - {"cudaStreamGetFlags", {"hipStreamGetFlags", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamQuery - {"cudaStreamQuery", {"hipStreamQuery", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamAddCallback - {"cudaStreamAddCallback", {"hipStreamAddCallback", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamAttachMemAsync - {"cudaStreamAttachMemAsync", {"hipStreamAttachMemAsync", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuStreamBeginCapture - {"cudaStreamBeginCapture", {"hipStreamBeginCapture", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuStreamEndCapture - {"cudaStreamEndCapture", {"hipStreamEndCapture", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuStreamIsCapturing - {"cudaStreamIsCapturing", {"hipStreamIsCapturing", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuStreamGetPriority - {"cudaStreamGetPriority", {"hipStreamGetPriority", "", CONV_STREAM, API_RUNTIME}}, - - // Other synchronization - {"cudaDeviceSynchronize", {"hipDeviceSynchronize", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaDeviceReset", {"hipDeviceReset", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaSetDevice", {"hipSetDevice", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaGetDevice", {"hipGetDevice", "", CONV_DEVICE, API_RUNTIME}}, - // cuDeviceGetCount - {"cudaGetDeviceCount", {"hipGetDeviceCount", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaChooseDevice", {"hipChooseDevice", "", CONV_DEVICE, API_RUNTIME}}, - - // Thread Management - {"cudaThreadExit", {"hipDeviceReset", "", CONV_THREAD, API_RUNTIME}}, - {"cudaThreadGetCacheConfig", {"hipDeviceGetCacheConfig", "", CONV_THREAD, API_RUNTIME}}, - {"cudaThreadGetLimit", {"hipThreadGetLimit", "", CONV_THREAD, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaThreadSetCacheConfig", {"hipDeviceSetCacheConfig", "", CONV_THREAD, API_RUNTIME}}, - {"cudaThreadSetLimit", {"hipThreadSetLimit", "", CONV_THREAD, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaThreadSynchronize", {"hipDeviceSynchronize", "", CONV_THREAD, API_RUNTIME}}, - - // Attributes - {"cudaDeviceGetAttribute", {"hipDeviceGetAttribute", "", CONV_DEVICE, API_RUNTIME}}, - - // Pointer Attributes + {"cudaFuncGetAttributes", {"hipFuncGetAttributes", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, // no analogue - // NOTE: Not equal to cuPointerGetAttributes due to different signatures - {"cudaPointerGetAttributes", {"hipPointerGetAttributes", "", CONV_ADDRESSING, API_RUNTIME}}, - // cuMemHostGetDevicePointer - {"cudaHostGetDevicePointer", {"hipHostGetDevicePointer", "", CONV_MEMORY, API_RUNTIME}}, + {"cudaFuncSetAttribute", {"hipFuncSetAttribute", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuFuncSetCacheConfig due to different signatures + {"cudaFuncSetCacheConfig", {"hipFuncSetCacheConfig", "", CONV_DEVICE, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuFuncSetSharedMemConfig due to different signatures + {"cudaFuncSetSharedMemConfig", {"hipFuncSetSharedMemConfig", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaGetParameterBuffer", {"hipGetParameterBuffer", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaGetParameterBufferV2", {"hipGetParameterBufferV2", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuLaunchCooperativeKernel due to different signatures + {"cudaLaunchCooperativeKernel", {"hipLaunchCooperativeKernel", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuLaunchCooperativeKernelMultiDevice due to different signatures + {"cudaLaunchCooperativeKernelMultiDevice", {"hipLaunchCooperativeKernelMultiDevice", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuLaunchHostFunc + {"cudaLaunchHostFunc", {"hipLaunchHostFunc", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuLaunchKernel due to different signatures + {"cudaLaunchKernel", {"hipLaunchKernel", "", CONV_EXECUTION, API_RUNTIME}}, + // no analogue + {"cudaSetDoubleForDevice", {"hipSetDoubleForDevice", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaSetDoubleForHost", {"hipSetDoubleForHost", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - // Device - {"cudaGetDeviceProperties", {"hipGetDeviceProperties", "", CONV_DEVICE, API_RUNTIME}}, - // cuDeviceGetPCIBusId - {"cudaDeviceGetPCIBusId", {"hipDeviceGetPCIBusId", "", CONV_DEVICE, API_RUNTIME}}, - // cuDeviceGetByPCIBusId - {"cudaDeviceGetByPCIBusId", {"hipDeviceGetByPCIBusId", "", CONV_DEVICE, API_RUNTIME}}, - // cuCtxGetStreamPriorityRange - {"cudaDeviceGetStreamPriorityRange", {"hipDeviceGetStreamPriorityRange", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaSetValidDevices", {"hipSetValidDevices", "", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // Device Flags - // cuCtxGetFlags - {"cudaGetDeviceFlags", {"hipCtxGetFlags", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaSetDeviceFlags", {"hipSetDeviceFlags", "", CONV_DEVICE, API_RUNTIME}}, - - // Cache config - {"cudaDeviceSetCacheConfig", {"hipDeviceSetCacheConfig", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaDeviceGetCacheConfig", {"hipDeviceGetCacheConfig", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaFuncSetCacheConfig", {"hipFuncSetCacheConfig", "", CONV_DEVICE, API_RUNTIME}}, - - - // Execution control functions - {"cudaFuncGetAttributes", {"hipFuncGetAttributes", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaFuncSetSharedMemConfig", {"hipFuncSetSharedMemConfig", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaGetParameterBuffer", {"hipGetParameterBuffer", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaSetDoubleForDevice", {"hipSetDoubleForDevice", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaSetDoubleForHost", {"hipSetDoubleForHost", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - - // Execution Control [deprecated since 7.0] - {"cudaConfigureCall", {"hipConfigureCall", "", CONV_EXECUTION, API_RUNTIME}}, - {"cudaLaunch", {"hipLaunchByPtr", "", CONV_EXECUTION, API_RUNTIME}}, - {"cudaSetupArgument", {"hipSetupArgument", "", CONV_EXECUTION, API_RUNTIME}}, - - // Version Management - {"cudaDriverGetVersion", {"hipDriverGetVersion", "", CONV_VERSION, API_RUNTIME}}, - {"cudaRuntimeGetVersion", {"hipRuntimeGetVersion", "", CONV_VERSION, API_RUNTIME, HIP_UNSUPPORTED}}, - - // Occupancy - {"cudaOccupancyMaxPotentialBlockSize", {"hipOccupancyMaxPotentialBlockSize", "", CONV_OCCUPANCY, API_RUNTIME}}, - {"cudaOccupancyMaxPotentialBlockSizeWithFlags", {"hipOccupancyMaxPotentialBlockSizeWithFlags", "", CONV_OCCUPANCY, API_RUNTIME, HIP_UNSUPPORTED}}, + // 5.8. Occupancy + // {"cudaOccupancyMaxActiveBlocksPerMultiprocessor", {"hipOccupancyMaxActiveBlocksPerMultiprocessor", "", CONV_OCCUPANCY, API_RUNTIME}}, + // cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags {"cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", {"hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", "", CONV_OCCUPANCY, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuOccupancyMaxPotentialBlockSize + {"cudaOccupancyMaxPotentialBlockSize", {"hipOccupancyMaxPotentialBlockSize", "", CONV_OCCUPANCY, API_RUNTIME}}, + // cuOccupancyMaxPotentialBlockSizeWithFlags + {"cudaOccupancyMaxPotentialBlockSizeWithFlags", {"hipOccupancyMaxPotentialBlockSizeWithFlags", "", CONV_OCCUPANCY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue {"cudaOccupancyMaxPotentialBlockSizeVariableSMem", {"hipOccupancyMaxPotentialBlockSizeVariableSMem", "", CONV_OCCUPANCY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue {"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags", {"hipOccupancyMaxPotentialBlockSizeVariableSMemWithFlags", "", CONV_OCCUPANCY, API_RUNTIME, HIP_UNSUPPORTED}}, - // Peer2Peer - {"cudaDeviceCanAccessPeer", {"hipDeviceCanAccessPeer", "", CONV_PEER, API_RUNTIME}}, - {"cudaDeviceDisablePeerAccess", {"hipDeviceDisablePeerAccess", "", CONV_PEER, API_RUNTIME}}, - {"cudaDeviceEnablePeerAccess", {"hipDeviceEnablePeerAccess", "", CONV_PEER, API_RUNTIME}}, + // 5.9. Execution Control [DEPRECATED] + // no analogue + {"cudaConfigureCall", {"hipConfigureCall", "", CONV_EXECUTION, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cudaLaunch due to different signatures + {"cudaLaunch", {"hipLaunchByPtr", "", CONV_EXECUTION, API_RUNTIME}}, + // no analogue + {"cudaSetupArgument", {"hipSetupArgument", "", CONV_EXECUTION, API_RUNTIME}}, - {"cudaMemcpyPeerAsync", {"hipMemcpyPeerAsync", "", CONV_MEMORY, API_RUNTIME}}, - {"cudaMemcpyPeer", {"hipMemcpyPeer", "", CONV_MEMORY, API_RUNTIME}}, + // 5.10. Memory Management + // no analogue + {"cudaArrayGetInfo", {"hipArrayGetInfo", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuMemFree + {"cudaFree", {"hipFree", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaFreeArray", {"hipFreeArray", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemFreeHost + {"cudaFreeHost", {"hipHostFree", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuMipmappedArrayDestroy due to different signatures + {"cudaFreeMipmappedArray", {"hipFreeMipmappedArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMipmappedArrayGetLevel due to different signatures + {"cudaGetMipmappedArrayLevel", {"hipGetMipmappedArrayLevel", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaGetSymbolAddress", {"hipGetSymbolAddress", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaGetSymbolSize", {"hipGetSymbolSize", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemHostAlloc + // NOTE: hipHostAlloc deprecated - use hipHostMalloc instead + {"cudaHostAlloc", {"hipHostMalloc", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemHostGetDevicePointer + {"cudaHostGetDevicePointer", {"hipHostGetDevicePointer", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemHostGetFlags + {"cudaHostGetFlags", {"hipHostGetFlags", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemHostRegister + {"cudaHostRegister", {"hipHostRegister", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemHostUnregister + {"cudaHostUnregister", {"hipHostUnregister", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemAlloc + {"cudaMalloc", {"hipMalloc", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMalloc3D", {"hipMalloc3D", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMalloc3DArray", {"hipMalloc3DArray", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMallocArray", {"hipMallocArray", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemHostAlloc + {"cudaMallocHost", {"hipHostMalloc", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMallocManaged", {"hipMallocManaged", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMipmappedArrayCreate due to different signatures + {"cudaMallocMipmappedArray", {"hipMallocMipmappedArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMemAllocPitch due to different signatures + {"cudaMallocPitch", {"hipMallocPitch", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemAdvise + {"cudaMemAdvise", {"hipMemAdvise", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMemcpy due to different signatures + {"cudaMemcpy", {"hipMemcpy", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuMemcpy2D due to different signatures + {"cudaMemcpy2D", {"hipMemcpy2D", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpy2DArrayToArray", {"hipMemcpy2DArrayToArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMemcpy2DAsync due to different signatures + {"cudaMemcpy2DAsync", {"hipMemcpy2DAsync", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpy2DFromArray", {"hipMemcpy2DFromArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaMemcpy2DFromArrayAsync", {"hipMemcpy2DFromArrayAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaMemcpy2DToArray", {"hipMemcpy2DToArray", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpy2DToArrayAsync", {"hipMemcpy2DToArrayAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMemcpy3D due to different signatures + {"cudaMemcpy3D", {"hipMemcpy3D", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuMemcpy3DAsync due to different signatures + {"cudaMemcpy3DAsync", {"hipMemcpy3DAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMemcpy3DPeer due to different signatures + {"cudaMemcpy3DPeer", {"hipMemcpy3DPeer", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMemcpy3DPeerAsync due to different signatures + {"cudaMemcpy3DPeerAsync", {"hipMemcpy3DPeerAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMemcpyAtoA due to different signatures + {"cudaMemcpyArrayToArray", {"hipMemcpyArrayToArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuMemcpyAsync due to different signatures + {"cudaMemcpyAsync", {"hipMemcpyAsync", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpyFromArray", {"hipMemcpyFromArray", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpyFromArrayAsync", {"hipMemcpyFromArrayAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaMemcpyFromSymbol", {"hipMemcpyFromSymbol", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpyFromSymbolAsync", {"hipMemcpyFromSymbolAsync", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuMemcpyPeer due to different signatures + {"cudaMemcpyPeer", {"hipMemcpyPeer", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuMemcpyPeerAsync due to different signatures + {"cudaMemcpyPeerAsync", {"hipMemcpyPeerAsync", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpyToArray", {"hipMemcpyToArray", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpyToArrayAsync", {"hipMemcpyToArrayAsync", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpyToSymbol", {"hipMemcpyToSymbol", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemcpyToSymbolAsync", {"hipMemcpyToSymbolAsync", "", CONV_MEMORY, API_RUNTIME}}, + // cuMemGetInfo + {"cudaMemGetInfo", {"hipMemGetInfo", "", CONV_MEMORY, API_RUNTIME}}, + // TODO: double check cuMemPrefetchAsync + {"cudaMemPrefetchAsync", {"hipMemPrefetchAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuMemRangeGetAttribute + {"cudaMemRangeGetAttribute", {"hipMemRangeGetAttribute", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuMemRangeGetAttributes + {"cudaMemRangeGetAttributes", {"hipMemRangeGetAttributes", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuMemsetD32 + {"cudaMemset", {"hipMemset", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemset2D", {"hipMemset2D", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemset2DAsync", {"hipMemset2DAsync", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"cudaMemset3D", {"hipMemset3D", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaMemset3DAsync", {"hipMemset3DAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuMemsetD32Async + {"cudaMemsetAsync", {"hipMemsetAsync", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"make_cudaExtent", {"make_hipExtent", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"make_cudaPitchedPtr", {"make_hipPitchedPtr", "", CONV_MEMORY, API_RUNTIME}}, + // no analogue + {"make_cudaPos", {"make_hipPos", "", CONV_MEMORY, API_RUNTIME}}, - // Shared memory - {"cudaDeviceSetSharedMemConfig", {"hipDeviceSetSharedMemConfig", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaDeviceGetSharedMemConfig", {"hipDeviceGetSharedMemConfig", "", CONV_DEVICE, API_RUNTIME}}, - // translate deprecated - // {"cudaThreadGetSharedMemConfig", {"hipDeviceGetSharedMemConfig", "", CONV_DEVICE, API_RUNTIME}}, - // {"cudaThreadSetSharedMemConfig", {"hipDeviceSetSharedMemConfig", "", CONV_DEVICE, API_RUNTIME}}, + // 5.11.Unified Addressing + // no analogue + // NOTE: Not equal to cuPointerGetAttributes due to different signatures + {"cudaPointerGetAttributes", {"hipPointerGetAttributes", "", CONV_ADDRESSING, API_RUNTIME}}, - // cuCtxGetLimit - {"cudaDeviceGetLimit", {"hipDeviceGetLimit", "", CONV_DEVICE, API_RUNTIME}}, + // 5.12. Peer Device Memory Access + // cuDeviceCanAccessPeer + {"cudaDeviceCanAccessPeer", {"hipDeviceCanAccessPeer", "", CONV_PEER, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuCtxDisablePeerAccess due to different signatures + {"cudaDeviceDisablePeerAccess", {"hipDeviceDisablePeerAccess", "", CONV_PEER, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuCtxEnablePeerAccess due to different signatures + {"cudaDeviceEnablePeerAccess", {"hipDeviceEnablePeerAccess", "", CONV_PEER, API_RUNTIME}}, - // Profiler - {"cudaProfilerInitialize", {"hipProfilerInitialize", "", CONV_PROFILER, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuProfilerInitialize) - {"cudaProfilerStart", {"hipProfilerStart", "", CONV_PROFILER, API_RUNTIME}}, // API_Driver ANALOGUE (cuProfilerStart) - {"cudaProfilerStop", {"hipProfilerStop", "", CONV_PROFILER, API_RUNTIME}}, // API_Driver ANALOGUE (cuProfilerStop) + // 5.13. OpenGL Interoperability + // cuGLGetDevices + {"cudaGLGetDevices", {"hipGLGetDevices", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsGLRegisterBuffer + {"cudaGraphicsGLRegisterBuffer", {"hipGraphicsGLRegisterBuffer", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsGLRegisterImage + {"cudaGraphicsGLRegisterImage", {"hipGraphicsGLRegisterImage", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuWGLGetDevice + {"cudaWGLGetDevice", {"hipWGLGetDevice", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // 5.14. OpenGL Interoperability [DEPRECATED] + // no analogue + // NOTE: Not equal to cuGLMapBufferObject due to different signatures + {"cudaGLMapBufferObject", {"hipGLMapBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + // NOTE: Not equal to cuGLMapBufferObjectAsync due to different signatures + {"cudaGLMapBufferObjectAsync", {"hipGLMapBufferObjectAsync", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGLRegisterBufferObject + {"cudaGLRegisterBufferObject", {"hipGLRegisterBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGLSetBufferObjectMapFlags + {"cudaGLSetBufferObjectMapFlags", {"hipGLSetBufferObjectMapFlags", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaGLSetGLDevice", {"hipGLSetGLDevice", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGLUnmapBufferObject + {"cudaGLUnmapBufferObject", {"hipGLUnmapBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGLUnmapBufferObjectAsync + {"cudaGLUnmapBufferObjectAsync", {"hipGLUnmapBufferObjectAsync", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGLUnregisterBufferObject + {"cudaGLUnregisterBufferObject", {"hipGLUnregisterBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaBindTexture", {"hipBindTexture", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaUnbindTexture", {"hipUnbindTexture", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaBindTexture2D", {"hipBindTexture2D", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaBindTextureToArray", {"hipBindTextureToArray", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaBindTextureToMipmappedArray", {"hipBindTextureToMipmappedArray", "", CONV_TEXTURE, API_RUNTIME}}, // Unsupported yet on NVCC path - {"cudaGetTextureAlignmentOffset", {"hipGetTextureAlignmentOffset", "", CONV_TEXTURE, API_RUNTIME}}, // Unsupported yet on NVCC path - {"cudaGetTextureReference", {"hipGetTextureReference", "", CONV_TEXTURE, API_RUNTIME}}, // Unsupported yet on NVCC path + // 5.15. Direct3D 9 Interoperability + // cuD3D9GetDevice + {"cudaD3D9GetDevice", {"hipD3D9GetDevice", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9GetDevices + {"cudaD3D9GetDevices", {"hipD3D9GetDevices", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9GetDirect3DDevice + {"cudaD3D9GetDirect3DDevice", {"hipD3D9GetDirect3DDevice", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaD3D9SetDirect3DDevice", {"hipD3D9SetDirect3DDevice", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsD3D9RegisterResource + {"cudaGraphicsD3D9RegisterResource", {"hipGraphicsD3D9RegisterResource", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaCreateChannelDesc", {"hipCreateChannelDesc", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaGetChannelDesc", {"hipGetChannelDesc", "", CONV_TEXTURE, API_RUNTIME}}, + // 5.16.Direct3D 9 Interoperability[DEPRECATED] + // cuD3D9MapResources + {"cudaD3D9MapResources", {"hipD3D9MapResources", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9RegisterResource + {"cudaD3D9RegisterResource", {"hipD3D9RegisterResource", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9ResourceGetMappedArray + {"cudaD3D9ResourceGetMappedArray", {"hipD3D9ResourceGetMappedArray", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cudaD3D9ResourceGetMappedPitch + {"cudaD3D9ResourceGetMappedPitch", {"hipD3D9ResourceGetMappedPitch", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9ResourceGetMappedPointer + {"cudaD3D9ResourceGetMappedPointer", {"hipD3D9ResourceGetMappedPointer", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9ResourceGetMappedSize + {"cudaD3D9ResourceGetMappedSize", {"hipD3D9ResourceGetMappedSize", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9ResourceGetSurfaceDimensions + {"cudaD3D9ResourceGetSurfaceDimensions", {"hipD3D9ResourceGetSurfaceDimensions", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9ResourceSetMapFlags + {"cudaD3D9ResourceSetMapFlags", {"hipD3D9ResourceSetMapFlags", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9UnmapResources + {"cudaD3D9UnmapResources", {"hipD3D9UnmapResources", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D9UnregisterResource + {"cudaD3D9UnregisterResource", {"hipD3D9UnregisterResource", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // Texture Object Management + // 5.17. Direct3D 10 Interoperability + // cuD3D10GetDevice + {"cudaD3D10GetDevice", {"hipD3D10GetDevice", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10GetDevices + {"cudaD3D10GetDevices", {"hipD3D10GetDevices", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsD3D10RegisterResource + {"cudaGraphicsD3D10RegisterResource", {"hipGraphicsD3D10RegisterResource", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaAddressModeWrap", {"hipAddressModeWrap", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaAddressModeClamp", {"hipAddressModeClamp", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaAddressModeMirror", {"hipAddressModeMirror", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaAddressModeBorder", {"hipAddressModeBorder", "", CONV_TEXTURE, API_RUNTIME}}, + // 5.18. Direct3D 10 Interoperability [DEPRECATED] + // cudaD3D10GetDirect3DDevice + {"cudaD3D10GetDirect3DDevice", {"hipD3D10GetDirect3DDevice", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10MapResources + {"cudaD3D10MapResources", {"hipD3D10MapResources", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10RegisterResource + {"cudaD3D10RegisterResource", {"hipD3D10RegisterResource", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10ResourceGetMappedArray + {"cudaD3D10ResourceGetMappedArray", {"hipD3D10ResourceGetMappedArray", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cudaD3D10ResourceGetMappedPitch + {"cudaD3D10ResourceGetMappedPitch", {"hipD3D10ResourceGetMappedPitch", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10ResourceGetMappedPointer + {"cudaD3D10ResourceGetMappedPointer", {"hipD3D10ResourceGetMappedPointer", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10ResourceGetMappedSize + {"cudaD3D10ResourceGetMappedSize", {"hipD3D10ResourceGetMappedSize", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10ResourceGetSurfaceDimensions + {"cudaD3D10ResourceGetSurfaceDimensions", {"hipD3D10ResourceGetSurfaceDimensions", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10ResourceSetMapFlags + {"cudaD3D10ResourceSetMapFlags", {"hipD3D10ResourceSetMapFlags", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaD3D10SetDirect3DDevice", {"hipD3D10SetDirect3DDevice", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10UnmapResources + {"cudaD3D10UnmapResources", {"hipD3D10UnmapResources", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D10UnregisterResource + {"cudaD3D10UnregisterResource", {"hipD3D10UnregisterResource", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // functions - {"cudaCreateTextureObject", {"hipCreateTextureObject", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaDestroyTextureObject", {"hipDestroyTextureObject", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaGetTextureObjectResourceDesc", {"hipGetTextureObjectResourceDesc", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaGetTextureObjectResourceViewDesc", {"hipGetTextureObjectResourceViewDesc", "", CONV_TEXTURE, API_RUNTIME}}, - {"cudaGetTextureObjectTextureDesc", {"hipGetTextureObjectTextureDesc", "", CONV_TEXTURE, API_RUNTIME}}, + // 5.19. Direct3D 11 Interoperability + // cuD3D11GetDevice + {"cudaD3D11GetDevice", {"hipD3D11GetDevice", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuD3D11GetDevices + {"cudaD3D11GetDevices", {"hipD3D11GetDevices", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsD3D11RegisterResource + {"cudaGraphicsD3D11RegisterResource", {"hipGraphicsD3D11RegisterResource", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, - // Surface Reference Management - {"cudaBindSurfaceToArray", {"hipBindSurfaceToArray", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaGetSurfaceReference", {"hipGetSurfaceReference", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}}, + // 5.20. Direct3D 11 Interoperability [DEPRECATED] + // cuD3D11GetDirect3DDevice + {"cudaD3D11GetDirect3DDevice", {"hipD3D11GetDirect3DDevice", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaD3D11SetDirect3DDevice", {"hipD3D11SetDirect3DDevice", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, + // 5.21. VDPAU Interoperability + // cuGraphicsVDPAURegisterOutputSurface + {"cudaGraphicsVDPAURegisterOutputSurface", {"hipGraphicsVDPAURegisterOutputSurface", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsVDPAURegisterVideoSurface + {"cudaGraphicsVDPAURegisterVideoSurface", {"hipGraphicsVDPAURegisterVideoSurface", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuVDPAUGetDevice + {"cudaVDPAUGetDevice", {"hipVDPAUGetDevice", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, + // no analogue + {"cudaVDPAUSetVDPAUDevice", {"hipVDPAUSetDevice", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, - // Surface Object Management - {"cudaCreateSurfaceObject", {"hipCreateSurfaceObject", "", CONV_SURFACE, API_RUNTIME}}, - {"cudaDestroySurfaceObject", {"hipDestroySurfaceObject", "", CONV_SURFACE, API_RUNTIME}}, - {"cudaGetSurfaceObjectResourceDesc", {"hipGetSurfaceObjectResourceDesc", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}}, + // 5.22. EGL Interoperability + // cuEGLStreamConsumerAcquireFrame + {"cudaEGLStreamConsumerAcquireFrame", {"hipEGLStreamConsumerAcquireFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuEGLStreamConsumerConnect + {"cudaEGLStreamConsumerConnect", {"hipEGLStreamConsumerConnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuEGLStreamConsumerConnectWithFlags + {"cudaEGLStreamConsumerConnectWithFlags", {"hipEGLStreamConsumerConnectWithFlags", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuEGLStreamConsumerDisconnect + {"cudaEGLStreamConsumerDisconnect", {"hipEGLStreamConsumerDisconnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuEGLStreamConsumerReleaseFrame + {"cudaEGLStreamConsumerReleaseFrame", {"hipEGLStreamConsumerReleaseFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuEGLStreamProducerConnect + {"cudaEGLStreamProducerConnect", {"hipEGLStreamProducerConnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuEGLStreamProducerDisconnect + {"cudaEGLStreamProducerDisconnect", {"hipEGLStreamProducerDisconnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuEGLStreamProducerPresentFrame + {"cudaEGLStreamProducerPresentFrame", {"hipEGLStreamProducerPresentFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuEGLStreamProducerReturnFrame + {"cudaEGLStreamProducerReturnFrame", {"hipEGLStreamProducerReturnFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuEventCreateFromEGLSync + {"cudaEventCreateFromEGLSync", {"hipEventCreateFromEGLSync", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsEGLRegisterImage + {"cudaGraphicsEGLRegisterImage", {"hipGraphicsEGLRegisterImage", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsResourceGetMappedEglFrame + {"cudaGraphicsResourceGetMappedEglFrame", {"hipGraphicsResourceGetMappedEglFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // Inter-Process Communications (IPC) - {"cudaIpcCloseMemHandle", {"hipIpcCloseMemHandle", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaIpcGetEventHandle", {"hipIpcGetEventHandle", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaIpcGetMemHandle", {"hipIpcGetMemHandle", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaIpcOpenEventHandle", {"hipIpcOpenEventHandle", "", CONV_DEVICE, API_RUNTIME}}, - {"cudaIpcOpenMemHandle", {"hipIpcOpenMemHandle", "", CONV_DEVICE, API_RUNTIME}}, + // 5.23. Graphics Interoperability + // cuGraphicsMapResources + {"cudaGraphicsMapResources", {"hipGraphicsMapResources", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsResourceGetMappedMipmappedArray + {"cudaGraphicsResourceGetMappedMipmappedArray", {"hipGraphicsResourceGetMappedMipmappedArray", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsResourceGetMappedPointer + {"cudaGraphicsResourceGetMappedPointer", {"hipGraphicsResourceGetMappedPointer", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsResourceSetMapFlags + {"cudaGraphicsResourceSetMapFlags", {"hipGraphicsResourceSetMapFlags", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsSubResourceGetMappedArray + {"cudaGraphicsSubResourceGetMappedArray", {"hipGraphicsSubResourceGetMappedArray", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsUnmapResources + {"cudaGraphicsUnmapResources", {"hipGraphicsUnmapResources", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphicsUnregisterResource + {"cudaGraphicsUnregisterResource", {"hipGraphicsUnregisterResource", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, - // OpenGL Interoperability - {"cudaGLGetDevices", {"hipGLGetDevices", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaGraphicsGLRegisterBuffer", {"hipGraphicsGLRegisterBuffer", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaGraphicsGLRegisterImage", {"hipGraphicsGLRegisterImage", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaWGLGetDevice", {"hipWGLGetDevice", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, + // 5.24. Texture Reference Management + // no analogue + {"cudaBindTexture", {"hipBindTexture", "", CONV_TEXTURE, API_RUNTIME}}, + // no analogue + {"cudaBindTexture2D", {"hipBindTexture2D", "", CONV_TEXTURE, API_RUNTIME}}, + // no analogue + {"cudaBindTextureToArray", {"hipBindTextureToArray", "", CONV_TEXTURE, API_RUNTIME}}, + // no analogue + // NOTE: Unsupported yet on NVCC path + {"cudaBindTextureToMipmappedArray", {"hipBindTextureToMipmappedArray", "", CONV_TEXTURE, API_RUNTIME}}, + // no analogue + {"cudaCreateChannelDesc", {"hipCreateChannelDesc", "", CONV_TEXTURE, API_RUNTIME}}, + // no analogue + {"cudaGetChannelDesc", {"hipGetChannelDesc", "", CONV_TEXTURE, API_RUNTIME}}, + // no analogue + {"cudaGetTextureAlignmentOffset", {"hipGetTextureAlignmentOffset", "", CONV_TEXTURE, API_RUNTIME}}, + // TODO: double check cuModuleGetTexRef + // NOTE: Unsupported yet on NVCC path + {"cudaGetTextureReference", {"hipGetTextureReference", "", CONV_TEXTURE, API_RUNTIME}}, + // no analogue + {"cudaUnbindTexture", {"hipUnbindTexture", "", CONV_TEXTURE, API_RUNTIME}}, - // Graphics Interoperability - {"cudaGraphicsMapResources", {"hipGraphicsMapResources", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsMapResources) - {"cudaGraphicsResourceGetMappedMipmappedArray", {"hipGraphicsResourceGetMappedMipmappedArray", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsResourceGetMappedMipmappedArray) - {"cudaGraphicsResourceGetMappedPointer", {"hipGraphicsResourceGetMappedPointer", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsResourceGetMappedPointer) - {"cudaGraphicsResourceSetMapFlags", {"hipGraphicsResourceSetMapFlags", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsResourceSetMapFlags) - {"cudaGraphicsSubResourceGetMappedArray", {"hipGraphicsSubResourceGetMappedArray", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsSubResourceGetMappedArray) - {"cudaGraphicsUnmapResources", {"hipGraphicsUnmapResources", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsUnmapResources) - {"cudaGraphicsUnregisterResource", {"hipGraphicsUnregisterResource", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsUnregisterResource) + // 5.25. Surface Reference Management + // no analogue + {"cudaBindSurfaceToArray", {"hipBindSurfaceToArray", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}}, + // TODO: double check cuModuleGetSurfRef + {"cudaGetSurfaceReference", {"hipGetSurfaceReference", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaGLGetDevices", {"hipGLGetDevices", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLGetDevices) - {"cudaGraphicsGLRegisterBuffer", {"hipGraphicsGLRegisterBuffer", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsGLRegisterBuffer) - {"cudaGraphicsGLRegisterImage", {"hipGraphicsGLRegisterImage", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsGLRegisterImage) - {"cudaWGLGetDevice", {"hipWGLGetDevice", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuWGLGetDevice) + // 5.26. Texture Object Management + // no analogue + // NOTE: Not equal to cuTexObjectCreate due to different signatures + {"cudaCreateTextureObject", {"hipCreateTextureObject", "", CONV_TEXTURE, API_RUNTIME}}, + // cuTexObjectDestroy + {"cudaDestroyTextureObject", {"hipDestroyTextureObject", "", CONV_TEXTURE, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuTexObjectGetResourceDesc due to different signatures + {"cudaGetTextureObjectResourceDesc", {"hipGetTextureObjectResourceDesc", "", CONV_TEXTURE, API_RUNTIME}}, + // cuTexObjectGetResourceViewDesc + {"cudaGetTextureObjectResourceViewDesc", {"hipGetTextureObjectResourceViewDesc", "", CONV_TEXTURE, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cudaGetTextureObjectTextureDesc due to different signatures + {"cuTexObjectGetTextureDesc", {"hipGetTextureObjectTextureDesc", "", CONV_TEXTURE, API_RUNTIME}}, - // OpenGL Interoperability [DEPRECATED] + // 5.27. Surface Object Management + // no analogue + // NOTE: Not equal to cuSurfObjectCreate due to different signatures + {"cudaCreateSurfaceObject", {"hipCreateSurfaceObject", "", CONV_SURFACE, API_RUNTIME}}, + // cuSurfObjectDestroy + {"cudaDestroySurfaceObject", {"hipDestroySurfaceObject", "", CONV_SURFACE, API_RUNTIME}}, + // no analogue + // NOTE: Not equal to cuSurfObjectGetResourceDesc due to different signatures + {"cudaGetSurfaceObjectResourceDesc", {"hipGetSurfaceObjectResourceDesc", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaGLMapBufferObject", {"hipGLMapBufferObject__", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // Not equal to cuGLMapBufferObject due to different signatures - {"cudaGLMapBufferObjectAsync", {"hipGLMapBufferObjectAsync__", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // Not equal to cuGLMapBufferObjectAsync due to different signatures - {"cudaGLRegisterBufferObject", {"hipGLRegisterBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLRegisterBufferObject) - {"cudaGLSetBufferObjectMapFlags", {"hipGLSetBufferObjectMapFlags", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLSetBufferObjectMapFlags) - {"cudaGLSetGLDevice", {"hipGLSetGLDevice", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // no API_Driver ANALOGUE - {"cudaGLUnmapBufferObject", {"hipGLUnmapBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLUnmapBufferObject) - {"cudaGLUnmapBufferObjectAsync", {"hipGLUnmapBufferObjectAsync", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLUnmapBufferObjectAsync) - {"cudaGLUnregisterBufferObject", {"hipGLUnregisterBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLUnregisterBufferObject) + // 5.28.Version Management + // cuDriverGetVersion + {"cudaDriverGetVersion", {"hipDriverGetVersion", "", CONV_VERSION, API_RUNTIME}}, + // no analogue + {"cudaRuntimeGetVersion", {"hipRuntimeGetVersion", "", CONV_VERSION, API_RUNTIME}}, - // Direct3D 9 Interoperability + // 5.29. Graph Management + // cuGraphAddChildGraphNode + {"cudaGraphAddChildGraphNode", {"hipGraphAddChildGraphNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphAddDependencies + {"cudaGraphAddDependencies", {"hipGraphAddDependencies", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphAddEmptyNode + {"cudaGraphAddEmptyNode", {"hipGraphAddEmptyNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphAddHostNode + {"cudaGraphAddHostNode", {"hipGraphAddHostNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphAddKernelNode + {"cudaGraphAddKernelNode", {"hipGraphAddKernelNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphAddMemcpyNode + {"cudaGraphAddMemcpyNode", {"hipGraphAddMemcpyNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphAddMemsetNode + {"cudaGraphAddMemsetNode", {"hipGraphAddMemsetNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphChildGraphNodeGetGraph + {"cudaGraphChildGraphNodeGetGraph", {"hipGraphChildGraphNodeGetGraph", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphClone + {"cudaGraphClone", {"hipGraphClone", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphCreate + {"cudaGraphCreate", {"hipGraphCreate", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphDestroy + {"cudaGraphDestroy", {"hipGraphDestroy", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphDestroyNode + {"cudaGraphDestroyNode", {"hipGraphDestroyNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphExecDestroy + {"cudaGraphExecDestroy", {"hipGraphExecDestroy", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphGetEdges + {"cudaGraphGetEdges", {"hipGraphGetEdges", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphGetNodes + {"cudaGraphGetNodes", {"hipGraphGetNodes", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphGetRootNodes + {"cudaGraphGetRootNodes", {"hipGraphGetRootNodes", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphHostNodeGetParams + {"cudaGraphHostNodeGetParams", {"hipGraphHostNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphHostNodeSetParams + {"cudaGraphHostNodeSetParams", {"hipGraphHostNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphInstantiate + {"cudaGraphInstantiate", {"hipGraphInstantiate", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphKernelNodeGetParams + {"cudaGraphKernelNodeGetParams", {"hipGraphKernelNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphKernelNodeSetParams + {"cudaGraphKernelNodeSetParams", {"hipGraphKernelNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphLaunch + {"cudaGraphLaunch", {"hipGraphLaunch", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphMemcpyNodeGetParams + {"cudaGraphMemcpyNodeGetParams", {"hipGraphMemcpyNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphMemcpyNodeSetParams + {"cudaGraphMemcpyNodeSetParams", {"hipGraphMemcpyNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphMemsetNodeGetParams + {"cudaGraphMemsetNodeGetParams", {"hipGraphMemsetNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphMemsetNodeSetParams + {"cudaGraphMemsetNodeSetParams", {"hipGraphMemsetNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphNodeFindInClone + {"cudaGraphNodeFindInClone", {"hipGraphNodeFindInClone", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphNodeGetDependencies + {"cudaGraphNodeGetDependencies", {"hipGraphNodeGetDependencies", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphNodeGetDependentNodes + {"cudaGraphNodeGetDependentNodes", {"hipGraphNodeGetDependentNodes", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphNodeGetType + {"cudaGraphNodeGetType", {"hipGraphNodeGetType", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuGraphRemoveDependencies + {"cudaGraphRemoveDependencies", {"hipGraphRemoveDependencies", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaD3D9GetDevice", {"hipD3D9GetDevice", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9GetDevice) - {"cudaD3D9GetDevices", {"hipD3D9GetDevices", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9GetDevices) - {"cudaD3D9GetDirect3DDevice", {"hipD3D9GetDirect3DDevice", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9GetDirect3DDevice) - {"cudaD3D9SetDirect3DDevice", {"hipD3D9SetDirect3DDevice", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // no API_Driver ANALOGUE - {"cudaGraphicsD3D9RegisterResource", {"hipGraphicsD3D9RegisterResource", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsD3D9RegisterResource) - - {"cudaD3D9MapResources", {"hipD3D9MapResources", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9MapResources) - {"cudaD3D9RegisterResource", {"hipD3D9RegisterResource", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9RegisterResource) - {"cudaD3D9ResourceGetMappedArray", {"hipD3D9ResourceGetMappedArray", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9ResourceGetMappedArray) - {"cudaD3D9ResourceGetMappedPitch", {"hipD3D9ResourceGetMappedPitch", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cudaD3D9ResourceGetMappedPitch) - {"cudaD3D9ResourceGetMappedPointer", {"hipD3D9ResourceGetMappedPointer", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9ResourceGetMappedPointer) - {"cudaD3D9ResourceGetMappedSize", {"hipD3D9ResourceGetMappedSize", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9ResourceGetMappedSize) - {"cudaD3D9ResourceGetSurfaceDimensions", {"hipD3D9ResourceGetSurfaceDimensions", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9ResourceGetSurfaceDimensions) - {"cudaD3D9ResourceSetMapFlags", {"hipD3D9ResourceSetMapFlags", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9ResourceSetMapFlags) - {"cudaD3D9UnmapResources", {"hipD3D9UnmapResources", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9UnmapResources) - {"cudaD3D9UnregisterResource", {"hipD3D9UnregisterResource", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D9UnregisterResource) - - // Direct3D 10 Interoperability - - {"cudaD3D10GetDevice", {"hipD3D10GetDevice", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10GetDevice) - {"cudaD3D10GetDevices", {"hipD3D10GetDevices", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10GetDevices) - {"cudaGraphicsD3D10RegisterResource", {"hipGraphicsD3D10RegisterResource", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsD3D10RegisterResource) - - // Direct3D 10 Interoperability [DEPRECATED] - - {"cudaD3D10GetDirect3DDevice", {"hipD3D10GetDirect3DDevice", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cudaD3D10GetDirect3DDevice) - {"cudaD3D10MapResources", {"hipD3D10MapResources", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10MapResources) - {"cudaD3D10RegisterResource", {"hipD3D10RegisterResource", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10RegisterResource) - {"cudaD3D10ResourceGetMappedArray", {"hipD3D10ResourceGetMappedArray", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10ResourceGetMappedArray) - {"cudaD3D10ResourceGetMappedPitch", {"hipD3D10ResourceGetMappedPitch", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cudaD3D10ResourceGetMappedPitch) - {"cudaD3D10ResourceGetMappedPointer", {"hipD3D10ResourceGetMappedPointer", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10ResourceGetMappedPointer) - {"cudaD3D10ResourceGetMappedSize", {"hipD3D10ResourceGetMappedSize", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10ResourceGetMappedSize) - {"cudaD3D10ResourceGetSurfaceDimensions", {"hipD3D10ResourceGetSurfaceDimensions", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10ResourceGetSurfaceDimensions) - {"cudaD3D10ResourceSetMapFlags", {"hipD3D10ResourceSetMapFlags", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10ResourceSetMapFlags) - {"cudaD3D10SetDirect3DDevice", {"hipD3D10SetDirect3DDevice", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // no API_Driver ANALOGUE - {"cudaD3D10UnmapResources", {"hipD3D10UnmapResources", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10UnmapResources) - {"cudaD3D10UnregisterResource", {"hipD3D10UnregisterResource", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D10UnregisterResource) - - // Direct3D 11 Interoperability - - {"cudaD3D11GetDevice", {"hipD3D11GetDevice", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D11GetDevice) - {"cudaD3D11GetDevices", {"hipD3D11GetDevices", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D11GetDevices) - {"cudaGraphicsD3D11RegisterResource", {"hipGraphicsD3D11RegisterResource", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsD3D11RegisterResource) - - // Direct3D 11 Interoperability [DEPRECATED] - {"cudaD3D11GetDevice", {"hipD3D11GetDevice", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D11GetDevice) - {"cudaD3D11GetDevices", {"hipD3D11GetDevices", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuD3D11GetDevices) - {"cudaGraphicsD3D11RegisterResource", {"hipGraphicsD3D11RegisterResource", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsD3D11RegisterResource) - - // VDPAU Interoperability - {"cudaGraphicsVDPAURegisterOutputSurface", {"hipGraphicsVDPAURegisterOutputSurface", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsVDPAURegisterOutputSurface) - {"cudaGraphicsVDPAURegisterVideoSurface", {"hipGraphicsVDPAURegisterVideoSurface", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsVDPAURegisterVideoSurface) - {"cudaVDPAUGetDevice", {"hipVDPAUGetDevice", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuVDPAUGetDevice) - {"cudaVDPAUSetVDPAUDevice", {"hipVDPAUSetDevice", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, // no API_Driver ANALOGUE - - // EGL Interoperability - {"cudaEGLStreamConsumerAcquireFrame", {"hipEGLStreamConsumerAcquireFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuEGLStreamConsumerAcquireFrame) - {"cudaEGLStreamConsumerConnect", {"hipEGLStreamConsumerConnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuEGLStreamConsumerConnect) - {"cudaEGLStreamConsumerConnectWithFlags", {"hipEGLStreamConsumerConnectWithFlags", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuEGLStreamConsumerConnectWithFlags) - {"cudaEGLStreamConsumerReleaseFrame", {"hipEGLStreamConsumerReleaseFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuEGLStreamConsumerReleaseFrame) - {"cudaEGLStreamProducerConnect", {"hipEGLStreamProducerConnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuEGLStreamProducerConnect) - {"cudaEGLStreamProducerDisconnect", {"hipEGLStreamProducerDisconnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuEGLStreamProducerDisconnect) - {"cudaEGLStreamProducerPresentFrame", {"hipEGLStreamProducerPresentFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuEGLStreamProducerPresentFrame) - {"cudaEGLStreamProducerReturnFrame", {"hipEGLStreamProducerReturnFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuEGLStreamProducerReturnFrame) - {"cudaGraphicsEGLRegisterImage", {"hipGraphicsEGLRegisterImage", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsEGLRegisterImage) - {"cudaGraphicsResourceGetMappedEglFrame", {"hipGraphicsResourceGetMappedEglFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsResourceGetMappedEglFrame) + // 5.32. Profiler Control + // cuProfilerInitialize + {"cudaProfilerInitialize", {"hipProfilerInitialize", "", CONV_PROFILER, API_RUNTIME, HIP_UNSUPPORTED}}, + // cuProfilerStart + {"cudaProfilerStart", {"hipProfilerStart", "", CONV_PROFILER, API_RUNTIME}}, + // cuProfilerStop + {"cudaProfilerStop", {"hipProfilerStop", "", CONV_PROFILER, API_RUNTIME}}, }; diff --git a/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp b/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp index 9fb77dcf3e..efdecf96a6 100644 --- a/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp +++ b/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp @@ -283,7 +283,7 @@ int main(int argc, char* argv[]) { CURAND_CALL(curandGetVersion(&version)); int runtime_version; // cudaRuntimeGetVersion is yet unsupported by HIP - // CHECK-NOT: CUDA_CALL(hipRuntimeGetVersion(&runtime_version)); + // CHECK: CUDA_CALL(hipRuntimeGetVersion(&runtime_version)); CUDA_CALL(cudaRuntimeGetVersion(&runtime_version)); int device_id; // CHECK: CUDA_CALL(hipGetDevice(&device_id)); diff --git a/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp b/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp index 4442fb634c..9cb1a72420 100644 --- a/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp +++ b/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp @@ -621,7 +621,7 @@ int main(int argc, char *argv[]) CURAND_CALL(curandGetVersion(&version)); int runtime_version; // cudaRuntimeGetVersion is yet unsupported by HIP - // CHECK-NOT: CUDA_CALL(hipRuntimeGetVersion(&runtime_version)); + // CHECK: CUDA_CALL(hipRuntimeGetVersion(&runtime_version)); CUDA_CALL(cudaRuntimeGetVersion(&runtime_version)); int device_id; // CHECK: CUDA_CALL(hipGetDevice(&device_id));