[HIPIFY] Modify HIP types to conform to CUDA's ones

This commit is contained in:
Evgeny Mankov
2018-10-29 20:51:25 +03:00
parent 25aae88fd5
commit f83eabfa9e
11 changed files with 1132 additions and 1058 deletions
@@ -9,74 +9,72 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
{"cudaGetErrorString", {"hipGetErrorString", CONV_ERROR, API_RUNTIME}},
// memcpy functions
{"cudaMemcpy", {"hipMemcpy", CONV_MEM, API_RUNTIME}},
{"cudaMemcpyToArray", {"hipMemcpyToArray", CONV_MEM, API_RUNTIME}},
{"cudaMemcpyToSymbol", {"hipMemcpyToSymbol", CONV_MEM, API_RUNTIME}},
{"cudaMemcpyToSymbolAsync", {"hipMemcpyToSymbolAsync", CONV_MEM, API_RUNTIME}},
{"cudaMemcpyAsync", {"hipMemcpyAsync", CONV_MEM, API_RUNTIME}},
{"cudaMemcpy2D", {"hipMemcpy2D", CONV_MEM, API_RUNTIME}},
{"cudaMemcpy2DAsync", {"hipMemcpy2DAsync", CONV_MEM, API_RUNTIME}},
{"cudaMemcpy2DToArray", {"hipMemcpy2DToArray", CONV_MEM, API_RUNTIME}},
{"cudaMemcpy2DArrayToArray", {"hipMemcpy2DArrayToArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpy2DFromArray", {"hipMemcpy2DFromArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpy2DFromArrayAsync", {"hipMemcpy2DFromArrayAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpy2DToArrayAsync", {"hipMemcpy2DToArrayAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpy3D", {"hipMemcpy3D", CONV_MEM, API_RUNTIME}},
{"cudaMemcpy3DAsync", {"hipMemcpy3DAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpy3DPeer", {"hipMemcpy3DPeer", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpy3DPeerAsync", {"hipMemcpy3DPeerAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpyArrayToArray", {"hipMemcpyArrayToArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpyFromArrayAsync", {"hipMemcpyFromArrayAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpyFromSymbol", {"hipMemcpyFromSymbol", CONV_MEM, API_RUNTIME}},
{"cudaMemcpyFromSymbolAsync", {"hipMemcpyFromSymbolAsync", CONV_MEM, API_RUNTIME}},
{"cudaMemAdvise", {"hipMemAdvise", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}}, //
{"cudaMemRangeGetAttribute", {"hipMemRangeGetAttribute", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}}, //
{"cudaMemRangeGetAttributes", {"hipMemRangeGetAttributes", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}}, //
{"cudaMemcpy", {"hipMemcpy", CONV_MEMORY, API_RUNTIME}},
{"cudaMemcpyToArray", {"hipMemcpyToArray", CONV_MEMORY, API_RUNTIME}},
{"cudaMemcpyToSymbol", {"hipMemcpyToSymbol", CONV_MEMORY, API_RUNTIME}},
{"cudaMemcpyToSymbolAsync", {"hipMemcpyToSymbolAsync", CONV_MEMORY, API_RUNTIME}},
{"cudaMemcpyAsync", {"hipMemcpyAsync", CONV_MEMORY, API_RUNTIME}},
{"cudaMemcpy2D", {"hipMemcpy2D", CONV_MEMORY, API_RUNTIME}},
{"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}},
{"cudaMemcpy3D", {"hipMemcpy3D", CONV_MEMORY, API_RUNTIME}},
{"cudaMemcpy3DAsync", {"hipMemcpy3DAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpy3DPeer", {"hipMemcpy3DPeer", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemcpy3DPeerAsync", {"hipMemcpy3DPeerAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
{"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}},
{"cudaMemAdvise", {"hipMemAdvise", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, //
{"cudaMemRangeGetAttribute", {"hipMemRangeGetAttribute", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, //
{"cudaMemRangeGetAttributes", {"hipMemRangeGetAttributes", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, //
// memset
{"cudaMemset", {"hipMemset", CONV_MEM, API_RUNTIME}},
{"cudaMemsetAsync", {"hipMemsetAsync", CONV_MEM, API_RUNTIME}},
{"cudaMemset2D", {"hipMemset2D", CONV_MEM, API_RUNTIME}},
{"cudaMemset2DAsync", {"hipMemset2DAsync", CONV_MEM, API_RUNTIME}},
{"cudaMemset3D", {"hipMemset3D", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemset3DAsync", {"hipMemset3DAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"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
{"cudaMemGetInfo", {"hipMemGetInfo", CONV_MEM, API_RUNTIME}},
{"cudaArrayGetInfo", {"hipArrayGetInfo", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaFreeMipmappedArray", {"hipFreeMipmappedArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaGetMipmappedArrayLevel", {"hipGetMipmappedArrayLevel", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaGetSymbolAddress", {"hipGetSymbolAddress", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaGetSymbolSize", {"hipGetSymbolSize", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemPrefetchAsync", {"hipMemPrefetchAsync", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}}, // // API_Driver ANALOGUE (cuMemPrefetchAsync)
{"cudaMemGetInfo", {"hipMemGetInfo", CONV_MEMORY, API_RUNTIME}},
{"cudaArrayGetInfo", {"hipArrayGetInfo", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaFreeMipmappedArray", {"hipFreeMipmappedArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaGetMipmappedArrayLevel", {"hipGetMipmappedArrayLevel", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaGetSymbolAddress", {"hipGetSymbolAddress", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaGetSymbolSize", {"hipGetSymbolSize", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMemPrefetchAsync", {"hipMemPrefetchAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, // // API_Driver ANALOGUE (cuMemPrefetchAsync)
// malloc
{"cudaMalloc", {"hipMalloc", CONV_MEM, API_RUNTIME}},
{"cudaMallocHost", {"hipHostMalloc", CONV_MEM, API_RUNTIME}},
{"cudaMallocArray", {"hipMallocArray", CONV_MEM, API_RUNTIME}},
{"cudaMalloc3D", {"hipMalloc3D", CONV_MEM, API_RUNTIME}},
{"cudaMalloc3DArray", {"hipMalloc3DArray", CONV_MEM, API_RUNTIME}},
{"cudaMallocManaged", {"hipMallocManaged", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMallocMipmappedArray", {"hipMallocMipmappedArray", CONV_MEM, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMallocPitch", {"hipMallocPitch", CONV_MEM, API_RUNTIME}},
{"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}},
{"cudaMallocMipmappedArray", {"hipMallocMipmappedArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaMallocPitch", {"hipMallocPitch", CONV_MEMORY, API_RUNTIME}},
{"cudaFree", {"hipFree", CONV_MEM, API_RUNTIME}},
{"cudaFreeHost", {"hipHostFree", CONV_MEM, API_RUNTIME}},
{"cudaFreeArray", {"hipFreeArray", CONV_MEM, API_RUNTIME}},
{"cudaHostRegister", {"hipHostRegister", CONV_MEM, API_RUNTIME}},
{"cudaHostUnregister", {"hipHostUnregister", CONV_MEM, API_RUNTIME}},
{"cudaFree", {"hipFree", CONV_MEMORY, API_RUNTIME}},
{"cudaFreeHost", {"hipHostFree", CONV_MEMORY, API_RUNTIME}},
{"cudaFreeArray", {"hipFreeArray", CONV_MEMORY, API_RUNTIME}},
{"cudaHostRegister", {"hipHostRegister", CONV_MEMORY, API_RUNTIME}},
{"cudaHostUnregister", {"hipHostUnregister", CONV_MEMORY, API_RUNTIME}},
// hipHostAlloc deprecated - use hipHostMalloc instead
{"cudaHostAlloc", {"hipHostMalloc", CONV_MEM, API_RUNTIME}},
{"cudaHostAlloc", {"hipHostMalloc", CONV_MEMORY, API_RUNTIME}},
// make memory functions
{"make_cudaExtent", {"make_hipExtent", CONV_MEM, API_RUNTIME}},
{"make_cudaPitchedPtr", {"make_hipPitchedPtr", CONV_MEM, API_RUNTIME}},
{"make_cudaPos", {"make_hipPos", CONV_MEM, API_RUNTIME}},
{"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
{"cudaHostGetFlags", {"hipHostGetFlags", CONV_MEM, API_RUNTIME}},
{"warpSize", {"hipWarpSize", CONV_SPECIAL_FUNC, API_RUNTIME}},
{"cudaHostGetFlags", {"hipHostGetFlags", CONV_MEMORY, API_RUNTIME}},
// Events
{"cudaEventCreate", {"hipEventCreate", CONV_EVENT, API_RUNTIME}},
@@ -121,9 +119,9 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
// Pointer Attributes
// struct cudaPointerAttributes
{"cudaPointerGetAttributes", {"hipPointerGetAttributes", CONV_MEM, API_RUNTIME}},
{"cudaPointerGetAttributes", {"hipPointerGetAttributes", CONV_MEMORY, API_RUNTIME}},
{"cudaHostGetDevicePointer", {"hipHostGetDevicePointer", CONV_MEM, API_RUNTIME}},
{"cudaHostGetDevicePointer", {"hipHostGetDevicePointer", CONV_MEMORY, API_RUNTIME}},
// Device
{"cudaGetDeviceProperties", {"hipGetDeviceProperties", CONV_DEVICE, API_RUNTIME}},
@@ -137,22 +135,22 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
{"cudaSetDeviceFlags", {"hipSetDeviceFlags", CONV_DEVICE, API_RUNTIME}},
// Cache config
{"cudaDeviceSetCacheConfig", {"hipDeviceSetCacheConfig", CONV_CACHE, API_RUNTIME}},
{"cudaDeviceGetCacheConfig", {"hipDeviceGetCacheConfig", CONV_CACHE, API_RUNTIME}},
{"cudaFuncSetCacheConfig", {"hipFuncSetCacheConfig", CONV_CACHE, API_RUNTIME}},
{"cudaDeviceSetCacheConfig", {"hipDeviceSetCacheConfig", CONV_DEVICE, API_RUNTIME}},
{"cudaDeviceGetCacheConfig", {"hipDeviceGetCacheConfig", CONV_DEVICE, API_RUNTIME}},
{"cudaFuncSetCacheConfig", {"hipFuncSetCacheConfig", CONV_DEVICE, API_RUNTIME}},
// Execution control functions
{"cudaFuncGetAttributes", {"hipFuncGetAttributes", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaFuncSetSharedMemConfig", {"hipFuncSetSharedMemConfig", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaGetParameterBuffer", {"hipGetParameterBuffer", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaSetDoubleForDevice", {"hipSetDoubleForDevice", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaSetDoubleForHost", {"hipSetDoubleForHost", CONV_EXEC, API_RUNTIME, HIP_UNSUPPORTED}},
{"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_EXEC, API_RUNTIME}},
{"cudaLaunch", {"hipLaunchByPtr", CONV_EXEC, API_RUNTIME}},
{"cudaSetupArgument", {"hipSetupArgument", CONV_EXEC, API_RUNTIME}},
{"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}},
@@ -171,8 +169,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
{"cudaDeviceDisablePeerAccess", {"hipDeviceDisablePeerAccess", CONV_PEER, API_RUNTIME}},
{"cudaDeviceEnablePeerAccess", {"hipDeviceEnablePeerAccess", CONV_PEER, API_RUNTIME}},
{"cudaMemcpyPeerAsync", {"hipMemcpyPeerAsync", CONV_MEM, API_RUNTIME}},
{"cudaMemcpyPeer", {"hipMemcpyPeer", CONV_MEM, API_RUNTIME}},
{"cudaMemcpyPeerAsync", {"hipMemcpyPeerAsync", CONV_MEMORY, API_RUNTIME}},
{"cudaMemcpyPeer", {"hipMemcpyPeer", CONV_MEMORY, API_RUNTIME}},
// Shared memory
{"cudaDeviceSetSharedMemConfig", {"hipDeviceSetSharedMemConfig", CONV_DEVICE, API_RUNTIME}},
@@ -185,35 +183,35 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
{"cudaDeviceGetLimit", {"hipDeviceGetLimit", CONV_DEVICE, API_RUNTIME}},
// Profiler
{"cudaProfilerInitialize", {"hipProfilerInitialize", CONV_OTHER, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuProfilerInitialize)
{"cudaProfilerStart", {"hipProfilerStart", CONV_OTHER, API_RUNTIME}}, // API_Driver ANALOGUE (cuProfilerStart)
{"cudaProfilerStop", {"hipProfilerStop", CONV_OTHER, API_RUNTIME}}, // API_Driver ANALOGUE (cuProfilerStop)
{"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)
{"cudaBindTexture", {"hipBindTexture", CONV_TEX, API_RUNTIME}},
{"cudaUnbindTexture", {"hipUnbindTexture", CONV_TEX, API_RUNTIME}},
{"cudaBindTexture2D", {"hipBindTexture2D", CONV_TEX, API_RUNTIME}},
{"cudaBindTextureToArray", {"hipBindTextureToArray", CONV_TEX, API_RUNTIME}},
{"cudaBindTextureToMipmappedArray", {"hipBindTextureToMipmappedArray", CONV_TEX, API_RUNTIME}}, // Unsupported yet on NVCC path
{"cudaGetTextureAlignmentOffset", {"hipGetTextureAlignmentOffset", CONV_TEX, API_RUNTIME}}, // Unsupported yet on NVCC path
{"cudaGetTextureReference", {"hipGetTextureReference", CONV_TEX, API_RUNTIME}}, // Unsupported yet on NVCC path
{"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
{"cudaCreateChannelDesc", {"hipCreateChannelDesc", CONV_TEX, API_RUNTIME}},
{"cudaGetChannelDesc", {"hipGetChannelDesc", CONV_TEX, API_RUNTIME}},
{"cudaCreateChannelDesc", {"hipCreateChannelDesc", CONV_TEXTURE, API_RUNTIME}},
{"cudaGetChannelDesc", {"hipGetChannelDesc", CONV_TEXTURE, API_RUNTIME}},
// Texture Object Management
{"cudaAddressModeWrap", {"hipAddressModeWrap", CONV_TEX, API_RUNTIME}},
{"cudaAddressModeClamp", {"hipAddressModeClamp", CONV_TEX, API_RUNTIME}},
{"cudaAddressModeMirror", {"hipAddressModeMirror", CONV_TEX, API_RUNTIME}},
{"cudaAddressModeBorder", {"hipAddressModeBorder", CONV_TEX, API_RUNTIME}},
{"cudaAddressModeWrap", {"hipAddressModeWrap", CONV_TEXTURE, API_RUNTIME}},
{"cudaAddressModeClamp", {"hipAddressModeClamp", CONV_TEXTURE, API_RUNTIME}},
{"cudaAddressModeMirror", {"hipAddressModeMirror", CONV_TEXTURE, API_RUNTIME}},
{"cudaAddressModeBorder", {"hipAddressModeBorder", CONV_TEXTURE, API_RUNTIME}},
// functions
{"cudaCreateTextureObject", {"hipCreateTextureObject", CONV_TEX, API_RUNTIME}},
{"cudaDestroyTextureObject", {"hipDestroyTextureObject", CONV_TEX, API_RUNTIME}},
{"cudaGetTextureObjectResourceDesc", {"hipGetTextureObjectResourceDesc", CONV_TEX, API_RUNTIME}},
{"cudaGetTextureObjectResourceViewDesc", {"hipGetTextureObjectResourceViewDesc", CONV_TEX, API_RUNTIME}},
{"cudaGetTextureObjectTextureDesc", {"hipGetTextureObjectTextureDesc", CONV_TEX, API_RUNTIME}},
{"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}},
// Surface Reference Management
{"cudaBindSurfaceToArray", {"hipBindSurfaceToArray", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}},
@@ -233,10 +231,10 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
{"cudaIpcOpenMemHandle", {"hipIpcOpenMemHandle", CONV_DEVICE, API_RUNTIME}},
// OpenGL Interoperability
{"cudaGLGetDevices", {"hipGLGetDevices", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaGraphicsGLRegisterBuffer", {"hipGraphicsGLRegisterBuffer", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaGraphicsGLRegisterImage", {"hipGraphicsGLRegisterImage", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}},
{"cudaWGLGetDevice", {"hipWGLGetDevice", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}},
{"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}},
// Graphics Interoperability
{"cudaGraphicsMapResources", {"hipGraphicsMapResources", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsMapResources)
@@ -247,21 +245,21 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
{"cudaGraphicsUnmapResources", {"hipGraphicsUnmapResources", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsUnmapResources)
{"cudaGraphicsUnregisterResource", {"hipGraphicsUnregisterResource", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsUnregisterResource)
{"cudaGLGetDevices", {"hipGLGetDevices", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLGetDevices)
{"cudaGraphicsGLRegisterBuffer", {"hipGraphicsGLRegisterBuffer", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsGLRegisterBuffer)
{"cudaGraphicsGLRegisterImage", {"hipGraphicsGLRegisterImage", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGraphicsGLRegisterImage)
{"cudaWGLGetDevice", {"hipWGLGetDevice", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuWGLGetDevice)
{"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)
// OpenGL Interoperability [DEPRECATED]
{"cudaGLMapBufferObject", {"hipGLMapBufferObject__", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // Not equal to cuGLMapBufferObject due to different signatures
{"cudaGLMapBufferObjectAsync", {"hipGLMapBufferObjectAsync__", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // Not equal to cuGLMapBufferObjectAsync due to different signatures
{"cudaGLRegisterBufferObject", {"hipGLRegisterBufferObject", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLRegisterBufferObject)
{"cudaGLSetBufferObjectMapFlags", {"hipGLSetBufferObjectMapFlags", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLSetBufferObjectMapFlags)
{"cudaGLSetGLDevice", {"hipGLSetGLDevice", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // no API_Driver ANALOGUE
{"cudaGLUnmapBufferObject", {"hipGLUnmapBufferObject", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLUnmapBufferObject)
{"cudaGLUnmapBufferObjectAsync", {"hipGLUnmapBufferObjectAsync", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLUnmapBufferObjectAsync)
{"cudaGLUnregisterBufferObject", {"hipGLUnregisterBufferObject", CONV_GL, API_RUNTIME, HIP_UNSUPPORTED}}, // API_Driver ANALOGUE (cuGLUnregisterBufferObject)
{"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)
// Direct3D 9 Interoperability