[HIPIFY] CUDA Driver API functions total revise (up to CUDA 10.0)
+ for all CUDA versions
+ add missing types
+ fix typos
+ sync with HIP
+ update CUDA_Driver_API_functions_supported_by_HIP.md
+ formatting, annotating
[ROCm/clr commit: 1472478194]
Bu işleme şunda yer alıyor:
+24
-19
@@ -22,8 +22,8 @@
|
|||||||
| typedef |`CUDA_RESOURCE_VIEW_DESC_st` | |
|
| typedef |`CUDA_RESOURCE_VIEW_DESC_st` | |
|
||||||
| struct |`CUDA_TEXTURE_DESC` | |
|
| struct |`CUDA_TEXTURE_DESC` | |
|
||||||
| typedef |`CUDA_TEXTURE_DESC_st` | |
|
| typedef |`CUDA_TEXTURE_DESC_st` | |
|
||||||
| struct |`CUdevprop` |`hipDeviceProp_t` |
|
| struct |`CUdevprop` | |
|
||||||
| typedef |`CUdevprop_st` |`hipDeviceProp_t` |
|
| typedef |`CUdevprop_st` | |
|
||||||
| struct |`CUipcEventHandle` |`ihipIpcEventHandle_t` |
|
| struct |`CUipcEventHandle` |`ihipIpcEventHandle_t` |
|
||||||
| typedef |`CUipcEventHandle_st` |`ihipIpcEventHandle_t` |
|
| typedef |`CUipcEventHandle_st` |`ihipIpcEventHandle_t` |
|
||||||
| struct |`CUipcMemHandle` |`hipIpcMemHandle_t` |
|
| struct |`CUipcMemHandle` |`hipIpcMemHandle_t` |
|
||||||
@@ -763,6 +763,7 @@
|
|||||||
| `cuDeviceGetName` | `hipDeviceGetName` |
|
| `cuDeviceGetName` | `hipDeviceGetName` |
|
||||||
| `cuDeviceTotalMem` | `hipDeviceTotalMem` |
|
| `cuDeviceTotalMem` | `hipDeviceTotalMem` |
|
||||||
| `cuDeviceGetLuid` | |
|
| `cuDeviceGetLuid` | |
|
||||||
|
| `cuDeviceGetUuid` | |
|
||||||
|
|
||||||
## **6. Device Management [DEPRECATED]**
|
## **6. Device Management [DEPRECATED]**
|
||||||
|
|
||||||
@@ -792,9 +793,9 @@
|
|||||||
| `cuCtxGetCurrent` | `hipCtxGetCurrent` |
|
| `cuCtxGetCurrent` | `hipCtxGetCurrent` |
|
||||||
| `cuCtxGetDevice` | `hipCtxGetDevice` |
|
| `cuCtxGetDevice` | `hipCtxGetDevice` |
|
||||||
| `cuCtxGetFlags` | `hipCtxGetFlags` |
|
| `cuCtxGetFlags` | `hipCtxGetFlags` |
|
||||||
| `cuCtxGetLimit` | |
|
| `cuCtxGetLimit` | `hipDeviceGetLimit` |
|
||||||
| `cuCtxGetSharedMemConfig` | `hipCtxGetSharedMemConfig` |
|
| `cuCtxGetSharedMemConfig` | `hipCtxGetSharedMemConfig` |
|
||||||
| `cuCtxGetStreamPriorityRange` | |
|
| `cuCtxGetStreamPriorityRange` | `hipDeviceGetStreamPriorityRange`|
|
||||||
| `cuCtxPopCurrent` | `hipCtxPopCurrent` |
|
| `cuCtxPopCurrent` | `hipCtxPopCurrent` |
|
||||||
| `cuCtxPushCurrent` | `hipCtxPushCurrent` |
|
| `cuCtxPushCurrent` | `hipCtxPushCurrent` |
|
||||||
| `cuCtxSetCacheConfig` | `hipCtxSetCacheConfig` |
|
| `cuCtxSetCacheConfig` | `hipCtxSetCacheConfig` |
|
||||||
@@ -835,16 +836,16 @@
|
|||||||
|-----------------------------------------------------------|-------------------------------|
|
|-----------------------------------------------------------|-------------------------------|
|
||||||
| `cuArray3DCreate` | `hipArray3DCreate` |
|
| `cuArray3DCreate` | `hipArray3DCreate` |
|
||||||
| `cuArray3DGetDescriptor` | |
|
| `cuArray3DGetDescriptor` | |
|
||||||
| `cuArrayCreate` | |
|
| `cuArrayCreate` | `hipArrayCreate` |
|
||||||
| `cuArrayDestroy` | |
|
| `cuArrayDestroy` | |
|
||||||
| `cuArrayGetDescriptor` | |
|
| `cuArrayGetDescriptor` | |
|
||||||
| `cuDeviceGetByPCIBusId` | `hipDeviceGetByPCIBusId` |
|
| `cuDeviceGetByPCIBusId` | `hipDeviceGetByPCIBusId` |
|
||||||
| `cuDeviceGetPCIBusId` | `hipDeviceGetPCIBusId` |
|
| `cuDeviceGetPCIBusId` | `hipDeviceGetPCIBusId` |
|
||||||
| `cuIpcCloseMemHandle` | |
|
| `cuIpcCloseMemHandle` | `hipIpcCloseMemHandle` |
|
||||||
| `cuIpcGetEventHandle` | |
|
| `cuIpcGetEventHandle` | |
|
||||||
| `cuIpcGetMemHandle` | |
|
| `cuIpcGetMemHandle` | `hipIpcGetMemHandle` |
|
||||||
| `cuIpcOpenEventHandle` | |
|
| `cuIpcOpenEventHandle` | |
|
||||||
| `cuIpcOpenMemHandle` | |
|
| `cuIpcOpenMemHandle` | `hipIpcOpenMemHandle` |
|
||||||
| `cuMemAlloc` | `hipMalloc` |
|
| `cuMemAlloc` | `hipMalloc` |
|
||||||
| `cuMemAllocHost` | |
|
| `cuMemAllocHost` | |
|
||||||
| `cuMemAllocManaged` | |
|
| `cuMemAllocManaged` | |
|
||||||
@@ -867,7 +868,7 @@
|
|||||||
| `cuMemcpyDtoDAsync` | `hipMemcpyDtoDAsync` |
|
| `cuMemcpyDtoDAsync` | `hipMemcpyDtoDAsync` |
|
||||||
| `cuMemcpyDtoH` | `hipMemcpyDtoH` |
|
| `cuMemcpyDtoH` | `hipMemcpyDtoH` |
|
||||||
| `cuMemcpyDtoHAsync` | `hipMemcpyDtoHAsync` |
|
| `cuMemcpyDtoHAsync` | `hipMemcpyDtoHAsync` |
|
||||||
| `cuMemcpyHtoA` | |
|
| `cuMemcpyHtoA` | `hipMemcpyHtoA` |
|
||||||
| `cuMemcpyHtoAAsync` | |
|
| `cuMemcpyHtoAAsync` | |
|
||||||
| `cuMemcpyHtoD` | `hipMemcpyHtoD` |
|
| `cuMemcpyHtoD` | `hipMemcpyHtoD` |
|
||||||
| `cuMemcpyHtoDAsync` | `hipMemcpyHtoDAsync` |
|
| `cuMemcpyHtoDAsync` | `hipMemcpyHtoDAsync` |
|
||||||
@@ -875,11 +876,11 @@
|
|||||||
| `cuMemcpyPeerAsync` | |
|
| `cuMemcpyPeerAsync` | |
|
||||||
| `cuMemFree` | `hipFree` |
|
| `cuMemFree` | `hipFree` |
|
||||||
| `cuMemFreeHost` | `hipFreeHost` |
|
| `cuMemFreeHost` | `hipFreeHost` |
|
||||||
| `cuMemGetAddressRange` | |
|
| `cuMemGetAddressRange` | `hipMemGetAddressRange` |
|
||||||
| `cuMemGetInfo` | `hipMemGetInfo` |
|
| `cuMemGetInfo` | `hipMemGetInfo` |
|
||||||
| `cuMemHostAlloc` | `hipHostMalloc` |
|
| `cuMemHostAlloc` | `hipHostMalloc` |
|
||||||
| `cuMemHostGetDevicePointer` | |
|
| `cuMemHostGetDevicePointer` | `hipHostGetDevicePointer` |
|
||||||
| `cuMemHostGetFlags` | |
|
| `cuMemHostGetFlags` | `hipHostGetFlags` |
|
||||||
| `cuMemHostRegister` | `hipHostRegister` |
|
| `cuMemHostRegister` | `hipHostRegister` |
|
||||||
| `cuMemHostUnregister` | `hipHostUnregister` |
|
| `cuMemHostUnregister` | `hipHostUnregister` |
|
||||||
| `cuMemsetD16` | |
|
| `cuMemsetD16` | |
|
||||||
@@ -892,8 +893,8 @@
|
|||||||
| `cuMemsetD2D8Async` | |
|
| `cuMemsetD2D8Async` | |
|
||||||
| `cuMemsetD32` | `hipMemset` |
|
| `cuMemsetD32` | `hipMemset` |
|
||||||
| `cuMemsetD32Async` | `hipMemsetAsync` |
|
| `cuMemsetD32Async` | `hipMemsetAsync` |
|
||||||
| `cuMemsetD2D8` | |
|
| `cuMemsetD8` | `hipMemsetD8` |
|
||||||
| `cuMemsetD2D8Async` | |
|
| `cuMemsetD8Async` | |
|
||||||
| `cuMipmappedArrayCreate` | |
|
| `cuMipmappedArrayCreate` | |
|
||||||
| `cuMipmappedArrayDestroy` | |
|
| `cuMipmappedArrayDestroy` | |
|
||||||
| `cuMipmappedArrayGetLevel` | |
|
| `cuMipmappedArrayGetLevel` | |
|
||||||
@@ -916,8 +917,8 @@
|
|||||||
|-----------------------------------------------------------|-------------------------------|
|
|-----------------------------------------------------------|-------------------------------|
|
||||||
| `cuStreamAddCallback` | `hipStreamAddCallback` |
|
| `cuStreamAddCallback` | `hipStreamAddCallback` |
|
||||||
| `cuStreamAttachMemAsync` | |
|
| `cuStreamAttachMemAsync` | |
|
||||||
| `cuStreamCreate` | |
|
| `cuStreamCreate` | `hipStreamCreateWithFlags` |
|
||||||
| `cuStreamCreateWithPriority` | |
|
| `cuStreamCreateWithPriority` | `hipStreamCreateWithPriority` |
|
||||||
| `cuStreamDestroy` | `hipStreamDestroy` |
|
| `cuStreamDestroy` | `hipStreamDestroy` |
|
||||||
| `cuStreamGetFlags` | `hipStreamGetFlags` |
|
| `cuStreamGetFlags` | `hipStreamGetFlags` |
|
||||||
| `cuStreamGetPriority` | `hipStreamGetPriority` |
|
| `cuStreamGetPriority` | `hipStreamGetPriority` |
|
||||||
@@ -932,7 +933,7 @@
|
|||||||
|
|
||||||
| **CUDA** | **HIP** |
|
| **CUDA** | **HIP** |
|
||||||
|-----------------------------------------------------------|-------------------------------|
|
|-----------------------------------------------------------|-------------------------------|
|
||||||
| `cuEventCreate` | `hipEventCreate` |
|
| `cuEventCreate` | `hipEventCreateWithFlags` |
|
||||||
| `cuEventDestroy` | `hipEventDestroy` |
|
| `cuEventDestroy` | `hipEventDestroy` |
|
||||||
| `cuEventElapsedTime` | `hipEventElapsedTime` |
|
| `cuEventElapsedTime` | `hipEventElapsedTime` |
|
||||||
| `cuEventQuery` | `hipEventQuery` |
|
| `cuEventQuery` | `hipEventQuery` |
|
||||||
@@ -967,10 +968,13 @@
|
|||||||
| **CUDA** | **HIP** |
|
| **CUDA** | **HIP** |
|
||||||
|-----------------------------------------------------------|-------------------------------|
|
|-----------------------------------------------------------|-------------------------------|
|
||||||
| `cuFuncGetAttribute` | |
|
| `cuFuncGetAttribute` | |
|
||||||
|
| `cuFuncSetAttribute` | |
|
||||||
| `cuFuncSetCacheConfig` | `hipFuncSetCacheConfig` |
|
| `cuFuncSetCacheConfig` | `hipFuncSetCacheConfig` |
|
||||||
| `cuFuncSetSharedMemConfig` | |
|
| `cuFuncSetSharedMemConfig` | |
|
||||||
| `cuLaunchKernel` | `hipModuleLaunchKernel` |
|
| `cuLaunchKernel` | `hipModuleLaunchKernel` |
|
||||||
| `cuLaunchHostFunc` | |
|
| `cuLaunchHostFunc` | |
|
||||||
|
| `cuLaunchCooperativeKernel` | |
|
||||||
|
| `cuLaunchCooperativeKernelMultiDevice` | |
|
||||||
|
|
||||||
## **18. Execution Control [DEPRECATED]**
|
## **18. Execution Control [DEPRECATED]**
|
||||||
|
|
||||||
@@ -1047,8 +1051,8 @@
|
|||||||
| `cuTexRefGetMipmapLevelBias` | |
|
| `cuTexRefGetMipmapLevelBias` | |
|
||||||
| `cuTexRefGetMipmapLevelClamp` | |
|
| `cuTexRefGetMipmapLevelClamp` | |
|
||||||
| `cuTexRefGetMipmappedArray` | |
|
| `cuTexRefGetMipmappedArray` | |
|
||||||
| `cuTexRefSetAddress` | |
|
| `cuTexRefSetAddress` | `hipTexRefSetAddress` |
|
||||||
| `cuTexRefSetAddress2D` | |
|
| `cuTexRefSetAddress2D` | `hipTexRefSetAddress2D` |
|
||||||
| `cuTexRefSetAddressMode` | `hipTexRefSetAddressMode` |
|
| `cuTexRefSetAddressMode` | `hipTexRefSetAddressMode` |
|
||||||
| `cuTexRefSetArray` | `hipTexRefSetArray` |
|
| `cuTexRefSetArray` | `hipTexRefSetArray` |
|
||||||
| `cuTexRefSetBorderColor` | |
|
| `cuTexRefSetBorderColor` | |
|
||||||
@@ -1233,3 +1237,4 @@
|
|||||||
| `cuEGLStreamProducerReturnFrame` | |
|
| `cuEGLStreamProducerReturnFrame` | |
|
||||||
| `cuGraphicsEGLRegisterImage` | |
|
| `cuGraphicsEGLRegisterImage` | |
|
||||||
| `cuGraphicsResourceGetMappedEglFrame` | |
|
| `cuGraphicsResourceGetMappedEglFrame` | |
|
||||||
|
| `cuEventCreateFromEGLSync` | |
|
||||||
|
|||||||
+15
-5
@@ -11,7 +11,7 @@
|
|||||||
| `cudaDeviceGetLimit` | `hipDeviceGetLimit` |
|
| `cudaDeviceGetLimit` | `hipDeviceGetLimit` |
|
||||||
| `cudaDeviceGetPCIBusId` | `hipDeviceGetPCIBusId` |
|
| `cudaDeviceGetPCIBusId` | `hipDeviceGetPCIBusId` |
|
||||||
| `cudaDeviceGetSharedMemConfig` | `hipDeviceGetSharedMemConfig` |
|
| `cudaDeviceGetSharedMemConfig` | `hipDeviceGetSharedMemConfig` |
|
||||||
| `cudaDeviceGetStreamPriorityRange` | |
|
| `cudaDeviceGetStreamPriorityRange` | `hipDeviceGetStreamPriorityRange` |
|
||||||
| `cudaDeviceReset` | `hipDeviceReset` |
|
| `cudaDeviceReset` | `hipDeviceReset` |
|
||||||
| `cudaDeviceSetCacheConfig` | `hipDeviceSetCacheConfig` |
|
| `cudaDeviceSetCacheConfig` | `hipDeviceSetCacheConfig` |
|
||||||
| `cudaDeviceSetLimit` | `hipDeviceSetLimit` |
|
| `cudaDeviceSetLimit` | `hipDeviceSetLimit` |
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
| `cudaDeviceSynchronize` | `hipDeviceSynchronize` |
|
| `cudaDeviceSynchronize` | `hipDeviceSynchronize` |
|
||||||
| `cudaGetDevice` | `hipGetDevice` |
|
| `cudaGetDevice` | `hipGetDevice` |
|
||||||
| `cudaGetDeviceCount` | `hipGetDeviceCount` |
|
| `cudaGetDeviceCount` | `hipGetDeviceCount` |
|
||||||
| `cudaGetDeviceFlags` | |
|
| `cudaGetDeviceFlags` | `hipCtxGetFlags` |
|
||||||
| `cudaGetDeviceProperties` | `hipGetDeviceProperties` |
|
| `cudaGetDeviceProperties` | `hipGetDeviceProperties` |
|
||||||
| `cudaIpcCloseMemHandle` | `hipIpcCloseMemHandle` |
|
| `cudaIpcCloseMemHandle` | `hipIpcCloseMemHandle` |
|
||||||
| `cudaIpcGetEventHandle` | `hipIpcGetEventHandle` |
|
| `cudaIpcGetEventHandle` | `hipIpcGetEventHandle` |
|
||||||
@@ -56,12 +56,15 @@
|
|||||||
|-----------------------------------------------------------|-------------------------------|
|
|-----------------------------------------------------------|-------------------------------|
|
||||||
| `cudaStreamAddCallback` | `hipStreamAddCallback` |
|
| `cudaStreamAddCallback` | `hipStreamAddCallback` |
|
||||||
| `cudaStreamAttachMemAsync` | |
|
| `cudaStreamAttachMemAsync` | |
|
||||||
|
| `cudaStreamBeginCapture` | |
|
||||||
|
| `cudaStreamEndCapture` | |
|
||||||
|
| `cudaStreamIsCapturing` | |
|
||||||
| `cudaStreamCreate` | `hipStreamCreate` |
|
| `cudaStreamCreate` | `hipStreamCreate` |
|
||||||
| `cudaStreamCreateWithFlags` | `hipStreamCreateWithFlags` |
|
| `cudaStreamCreateWithFlags` | `hipStreamCreateWithFlags` |
|
||||||
| `cudaStreamCreateWithPriority` | |
|
| `cudaStreamCreateWithPriority` | `hipStreamCreateWithPriority` |
|
||||||
| `cudaStreamDestroy` | `hipStreamDestroy` |
|
| `cudaStreamDestroy` | `hipStreamDestroy` |
|
||||||
| `cudaStreamGetFlags` | `hipStreamGetFlags` |
|
| `cudaStreamGetFlags` | `hipStreamGetFlags` |
|
||||||
| `cudaStreamGetPriority` | |
|
| `cudaStreamGetPriority` | `hipStreamGetPriority` |
|
||||||
| `cudaStreamQuery` | `hipStreamQuery` |
|
| `cudaStreamQuery` | `hipStreamQuery` |
|
||||||
| `cudaStreamSynchronize` | `hipStreamSynchronize` |
|
| `cudaStreamSynchronize` | `hipStreamSynchronize` |
|
||||||
| `cudaStreamWaitEvent` | `hipStreamWaitEvent` |
|
| `cudaStreamWaitEvent` | `hipStreamWaitEvent` |
|
||||||
@@ -82,7 +85,14 @@
|
|||||||
|
|
||||||
| **CUDA** | **HIP** |
|
| **CUDA** | **HIP** |
|
||||||
|-----------------------------------------------------------|-------------------------------|
|
|-----------------------------------------------------------|-------------------------------|
|
||||||
|
| `cudaSignalExternalSemaphoresAsync` | |
|
||||||
|
| `cudaWaitExternalSemaphoresAsync` | |
|
||||||
|
| `cudaImportExternalMemory` | |
|
||||||
|
| `cudaExternalMemoryGetMappedBuffer` | |
|
||||||
|
| `cudaExternalMemoryGetMappedMipmappedArray` | |
|
||||||
|
| `cudaDestroyExternalMemory` | |
|
||||||
|
| `cudaImportExternalSemaphore` | |
|
||||||
|
| `cudaDestroyExternalSemaphore` | |
|
||||||
|
|
||||||
## **7. Execution Control**
|
## **7. Execution Control**
|
||||||
|
|
||||||
|
|||||||
Dosya farkı çok büyük olduğundan ihmal edildi
Fark Yükle
@@ -80,8 +80,10 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP{
|
|||||||
{"CUDA_TEXTURE_DESC_st", {"HIP_TEXTURE_DESC", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}},
|
{"CUDA_TEXTURE_DESC_st", {"HIP_TEXTURE_DESC", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||||
{"CUDA_TEXTURE_DESC", {"HIP_TEXTURE_DESC", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}},
|
{"CUDA_TEXTURE_DESC", {"HIP_TEXTURE_DESC", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||||
|
|
||||||
{"CUdevprop_st", {"hipDeviceProp_t", CONV_TYPE, API_DRIVER}},
|
// no analogue
|
||||||
{"CUdevprop", {"hipDeviceProp_t", CONV_TYPE, API_DRIVER}},
|
// NOTE: cudaDeviceProp differs
|
||||||
|
{"CUdevprop_st", {"hipDeviceProp_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||||
|
{"CUdevprop", {"hipDeviceProp_t", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||||
|
|
||||||
// cudaIpcEventHandle_st
|
// cudaIpcEventHandle_st
|
||||||
{"CUipcEventHandle_st", {"ihipIpcEventHandle_t", CONV_TYPE, API_DRIVER}},
|
{"CUipcEventHandle_st", {"ihipIpcEventHandle_t", CONV_TYPE, API_DRIVER}},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "CUDA2HIP.h"
|
#include "CUDA2HIP.h"
|
||||||
|
|
||||||
// Map of all functions
|
// Map of all CUDA Runtime API functions
|
||||||
const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||||
// Error API
|
// Error API
|
||||||
{"cudaGetLastError", {"hipGetLastError", CONV_ERROR, API_RUNTIME}},
|
{"cudaGetLastError", {"hipGetLastError", CONV_ERROR, API_RUNTIME}},
|
||||||
@@ -9,29 +9,49 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
|||||||
{"cudaGetErrorString", {"hipGetErrorString", CONV_ERROR, API_RUNTIME}},
|
{"cudaGetErrorString", {"hipGetErrorString", CONV_ERROR, API_RUNTIME}},
|
||||||
|
|
||||||
// memcpy functions
|
// memcpy functions
|
||||||
|
// no analogue
|
||||||
|
// NOTE: Not equal to cuMemcpy due to different signatures
|
||||||
{"cudaMemcpy", {"hipMemcpy", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpy", {"hipMemcpy", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaMemcpyToArray", {"hipMemcpyToArray", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpyToArray", {"hipMemcpyToArray", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaMemcpyToSymbol", {"hipMemcpyToSymbol", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpyToSymbol", {"hipMemcpyToSymbol", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaMemcpyToSymbolAsync", {"hipMemcpyToSymbolAsync", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpyToSymbolAsync", {"hipMemcpyToSymbolAsync", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
|
||||||
{"cudaMemcpyAsync", {"hipMemcpyAsync", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpyAsync", {"hipMemcpyAsync", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
// no analogue
|
||||||
|
// NOTE: Not equal to cuMemcpy2D due to different signatures
|
||||||
{"cudaMemcpy2D", {"hipMemcpy2D", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpy2D", {"hipMemcpy2D", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
// no analogue
|
||||||
|
// NOTE: Not equal to cuMemcpy2DAsync due to different signatures
|
||||||
{"cudaMemcpy2DAsync", {"hipMemcpy2DAsync", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpy2DAsync", {"hipMemcpy2DAsync", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaMemcpy2DToArray", {"hipMemcpy2DToArray", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpy2DToArray", {"hipMemcpy2DToArray", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaMemcpy2DArrayToArray", {"hipMemcpy2DArrayToArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaMemcpy2DArrayToArray", {"hipMemcpy2DArrayToArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaMemcpy2DFromArray", {"hipMemcpy2DFromArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaMemcpy2DFromArray", {"hipMemcpy2DFromArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaMemcpy2DFromArrayAsync", {"hipMemcpy2DFromArrayAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaMemcpy2DFromArrayAsync", {"hipMemcpy2DFromArrayAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaMemcpy2DToArrayAsync", {"hipMemcpy2DToArrayAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"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}},
|
{"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}},
|
{"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}},
|
{"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}},
|
{"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}},
|
{"cudaMemcpyArrayToArray", {"hipMemcpyArrayToArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaMemcpyFromArrayAsync", {"hipMemcpyFromArrayAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaMemcpyFromArrayAsync", {"hipMemcpyFromArrayAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaMemcpyFromSymbol", {"hipMemcpyFromSymbol", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpyFromSymbol", {"hipMemcpyFromSymbol", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaMemcpyFromSymbolAsync", {"hipMemcpyFromSymbolAsync", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemcpyFromSymbolAsync", {"hipMemcpyFromSymbolAsync", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaMemAdvise", {"hipMemAdvise", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, //
|
// cuMemAdvise
|
||||||
{"cudaMemRangeGetAttribute", {"hipMemRangeGetAttribute", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, //
|
{"cudaMemAdvise", {"hipMemAdvise", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaMemRangeGetAttributes", {"hipMemRangeGetAttributes", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, //
|
// cuMemRangeGetAttribute
|
||||||
|
{"cudaMemRangeGetAttribute", {"hipMemRangeGetAttribute", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
// cuMemRangeGetAttributes
|
||||||
|
{"cudaMemRangeGetAttributes", {"hipMemRangeGetAttributes", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
|
||||||
// memset
|
// memset
|
||||||
{"cudaMemset", {"hipMemset", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemset", {"hipMemset", CONV_MEMORY, API_RUNTIME}},
|
||||||
@@ -42,13 +62,17 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
|||||||
{"cudaMemset3DAsync", {"hipMemset3DAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaMemset3DAsync", {"hipMemset3DAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
|
||||||
// Memory management
|
// Memory management
|
||||||
|
// cuMemGetInfo
|
||||||
{"cudaMemGetInfo", {"hipMemGetInfo", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMemGetInfo", {"hipMemGetInfo", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaArrayGetInfo", {"hipArrayGetInfo", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaArrayGetInfo", {"hipArrayGetInfo", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
// no analogue
|
||||||
|
// NOTE: Not equal to cuMipmappedArrayDestroy due to different signatures
|
||||||
{"cudaFreeMipmappedArray", {"hipFreeMipmappedArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaFreeMipmappedArray", {"hipFreeMipmappedArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaGetMipmappedArrayLevel", {"hipGetMipmappedArrayLevel", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaGetMipmappedArrayLevel", {"hipGetMipmappedArrayLevel", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaGetSymbolAddress", {"hipGetSymbolAddress", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaGetSymbolAddress", {"hipGetSymbolAddress", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaGetSymbolSize", {"hipGetSymbolSize", 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)
|
// TODO: double check cuMemPrefetchAsync
|
||||||
|
{"cudaMemPrefetchAsync", {"hipMemPrefetchAsync", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
|
||||||
// malloc
|
// malloc
|
||||||
{"cudaMalloc", {"hipMalloc", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMalloc", {"hipMalloc", CONV_MEMORY, API_RUNTIME}},
|
||||||
@@ -57,15 +81,22 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
|||||||
{"cudaMalloc3D", {"hipMalloc3D", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMalloc3D", {"hipMalloc3D", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaMalloc3DArray", {"hipMalloc3DArray", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMalloc3DArray", {"hipMalloc3DArray", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaMallocManaged", {"hipMallocManaged", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"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}},
|
{"cudaMallocMipmappedArray", {"hipMallocMipmappedArray", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaMallocPitch", {"hipMallocPitch", CONV_MEMORY, API_RUNTIME}},
|
{"cudaMallocPitch", {"hipMallocPitch", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
|
||||||
|
// cuMemFree
|
||||||
{"cudaFree", {"hipFree", CONV_MEMORY, API_RUNTIME}},
|
{"cudaFree", {"hipFree", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
// cuMemFreeHost
|
||||||
{"cudaFreeHost", {"hipHostFree", CONV_MEMORY, API_RUNTIME}},
|
{"cudaFreeHost", {"hipHostFree", CONV_MEMORY, API_RUNTIME}},
|
||||||
{"cudaFreeArray", {"hipFreeArray", CONV_MEMORY, API_RUNTIME}},
|
{"cudaFreeArray", {"hipFreeArray", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
// cuMemHostRegister
|
||||||
{"cudaHostRegister", {"hipHostRegister", CONV_MEMORY, API_RUNTIME}},
|
{"cudaHostRegister", {"hipHostRegister", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
// cuMemHostUnregister
|
||||||
{"cudaHostUnregister", {"hipHostUnregister", CONV_MEMORY, API_RUNTIME}},
|
{"cudaHostUnregister", {"hipHostUnregister", CONV_MEMORY, API_RUNTIME}},
|
||||||
// hipHostAlloc deprecated - use hipHostMalloc instead
|
// cuMemHostAlloc
|
||||||
|
// NOTE: hipHostAlloc deprecated - use hipHostMalloc instead
|
||||||
{"cudaHostAlloc", {"hipHostMalloc", CONV_MEMORY, API_RUNTIME}},
|
{"cudaHostAlloc", {"hipHostMalloc", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
|
||||||
// make memory functions
|
// make memory functions
|
||||||
@@ -74,35 +105,81 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
|||||||
{"make_cudaPos", {"make_hipPos", CONV_MEMORY, API_RUNTIME}},
|
{"make_cudaPos", {"make_hipPos", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
|
||||||
// Host Register Flags
|
// Host Register Flags
|
||||||
|
// cuMemHostGetFlags
|
||||||
{"cudaHostGetFlags", {"hipHostGetFlags", CONV_MEMORY, API_RUNTIME}},
|
{"cudaHostGetFlags", {"hipHostGetFlags", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
{"cudaEventCreate", {"hipEventCreate", CONV_EVENT, API_RUNTIME}},
|
// no analogue
|
||||||
{"cudaEventCreateWithFlags", {"hipEventCreateWithFlags", CONV_EVENT, API_RUNTIME}},
|
// NOTE: Not equal to cuEventCreate due to different signatures
|
||||||
{"cudaEventDestroy", {"hipEventDestroy", CONV_EVENT, API_RUNTIME}},
|
{"cudaEventCreate", {"hipEventCreate", CONV_EVENT, API_RUNTIME}},
|
||||||
{"cudaEventRecord", {"hipEventRecord", CONV_EVENT, API_RUNTIME}},
|
// cuEventCreate
|
||||||
{"cudaEventElapsedTime", {"hipEventElapsedTime", CONV_EVENT, API_RUNTIME}},
|
{"cudaEventCreateWithFlags", {"hipEventCreateWithFlags", CONV_EVENT, API_RUNTIME}},
|
||||||
{"cudaEventSynchronize", {"hipEventSynchronize", CONV_EVENT, API_RUNTIME}},
|
// cuEventDestroy
|
||||||
{"cudaEventQuery", {"hipEventQuery", CONV_EVENT, API_RUNTIME}},
|
{"cudaEventDestroy", {"hipEventDestroy", CONV_EVENT, API_RUNTIME}},
|
||||||
|
// cuEventRecord
|
||||||
|
{"cudaEventRecord", {"hipEventRecord", CONV_EVENT, API_RUNTIME}},
|
||||||
|
// cuEventElapsedTime
|
||||||
|
{"cudaEventElapsedTime", {"hipEventElapsedTime", CONV_EVENT, API_RUNTIME}},
|
||||||
|
// cuEventSynchronize
|
||||||
|
{"cudaEventSynchronize", {"hipEventSynchronize", CONV_EVENT, API_RUNTIME}},
|
||||||
|
// cuEventQuery
|
||||||
|
{"cudaEventQuery", {"hipEventQuery", CONV_EVENT, API_RUNTIME}},
|
||||||
|
|
||||||
|
// 5.6. External Resource Interoperability
|
||||||
|
// cuDestroyExternalMemory
|
||||||
|
{"cudaDestroyExternalMemory", {"hipDestroyExternalMemory", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
// cuDestroyExternalSemaphore
|
||||||
|
{"cudaDestroyExternalSemaphore", {"hipDestroyExternalSemaphore", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
// cuExternalMemoryGetMappedBuffer
|
||||||
|
{"cudaExternalMemoryGetMappedBuffer", {"hipExternalMemoryGetMappedBuffer", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
// cuExternalMemoryGetMappedMipmappedArray
|
||||||
|
{"cudaExternalMemoryGetMappedMipmappedArray", {"hipExternalMemoryGetMappedMipmappedArray", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
// cuImportExternalMemory
|
||||||
|
{"cudaImportExternalMemory", {"hipImportExternalMemory", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
// cuImportExternalSemaphore
|
||||||
|
{"cudaImportExternalSemaphore", {"hipImportExternalSemaphore", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
// cuSignalExternalSemaphoresAsync
|
||||||
|
{"cudaSignalExternalSemaphoresAsync", {"hipSignalExternalSemaphoresAsync", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
// cuWaitExternalSemaphoresAsync
|
||||||
|
{"cudaWaitExternalSemaphoresAsync", {"hipWaitExternalSemaphoresAsync", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
|
||||||
// Streams
|
// Streams
|
||||||
|
// no analogue
|
||||||
|
// NOTE: Not equal to cuStreamCreate due to different signatures
|
||||||
{"cudaStreamCreate", {"hipStreamCreate", CONV_STREAM, API_RUNTIME}},
|
{"cudaStreamCreate", {"hipStreamCreate", CONV_STREAM, API_RUNTIME}},
|
||||||
|
// cuStreamCreate
|
||||||
{"cudaStreamCreateWithFlags", {"hipStreamCreateWithFlags", CONV_STREAM, API_RUNTIME}},
|
{"cudaStreamCreateWithFlags", {"hipStreamCreateWithFlags", CONV_STREAM, API_RUNTIME}},
|
||||||
{"cudaStreamCreateWithPriority", {"hipStreamCreateWithPriority", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}},
|
// cuStreamCreateWithPriority
|
||||||
|
{"cudaStreamCreateWithPriority", {"hipStreamCreateWithPriority", CONV_STREAM, API_RUNTIME}},
|
||||||
|
// cuStreamDestroy
|
||||||
{"cudaStreamDestroy", {"hipStreamDestroy", CONV_STREAM, API_RUNTIME}},
|
{"cudaStreamDestroy", {"hipStreamDestroy", CONV_STREAM, API_RUNTIME}},
|
||||||
|
// cuStreamWaitEvent
|
||||||
{"cudaStreamWaitEvent", {"hipStreamWaitEvent", CONV_STREAM, API_RUNTIME}},
|
{"cudaStreamWaitEvent", {"hipStreamWaitEvent", CONV_STREAM, API_RUNTIME}},
|
||||||
|
// cuStreamSynchronize
|
||||||
{"cudaStreamSynchronize", {"hipStreamSynchronize", CONV_STREAM, API_RUNTIME}},
|
{"cudaStreamSynchronize", {"hipStreamSynchronize", CONV_STREAM, API_RUNTIME}},
|
||||||
|
// cuStreamGetFlags
|
||||||
{"cudaStreamGetFlags", {"hipStreamGetFlags", CONV_STREAM, API_RUNTIME}},
|
{"cudaStreamGetFlags", {"hipStreamGetFlags", CONV_STREAM, API_RUNTIME}},
|
||||||
|
// cuStreamQuery
|
||||||
{"cudaStreamQuery", {"hipStreamQuery", CONV_STREAM, API_RUNTIME}},
|
{"cudaStreamQuery", {"hipStreamQuery", CONV_STREAM, API_RUNTIME}},
|
||||||
|
// cuStreamAddCallback
|
||||||
{"cudaStreamAddCallback", {"hipStreamAddCallback", CONV_STREAM, API_RUNTIME}},
|
{"cudaStreamAddCallback", {"hipStreamAddCallback", CONV_STREAM, API_RUNTIME}},
|
||||||
|
// cuStreamAttachMemAsync
|
||||||
{"cudaStreamAttachMemAsync", {"hipStreamAttachMemAsync", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaStreamAttachMemAsync", {"hipStreamAttachMemAsync", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
{"cudaStreamGetPriority", {"hipStreamGetPriority", 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
|
// Other synchronization
|
||||||
{"cudaDeviceSynchronize", {"hipDeviceSynchronize", CONV_DEVICE, API_RUNTIME}},
|
{"cudaDeviceSynchronize", {"hipDeviceSynchronize", CONV_DEVICE, API_RUNTIME}},
|
||||||
{"cudaDeviceReset", {"hipDeviceReset", CONV_DEVICE, API_RUNTIME}},
|
{"cudaDeviceReset", {"hipDeviceReset", CONV_DEVICE, API_RUNTIME}},
|
||||||
{"cudaSetDevice", {"hipSetDevice", CONV_DEVICE, API_RUNTIME}},
|
{"cudaSetDevice", {"hipSetDevice", CONV_DEVICE, API_RUNTIME}},
|
||||||
{"cudaGetDevice", {"hipGetDevice", CONV_DEVICE, API_RUNTIME}},
|
{"cudaGetDevice", {"hipGetDevice", CONV_DEVICE, API_RUNTIME}},
|
||||||
|
// cuDeviceGetCount
|
||||||
{"cudaGetDeviceCount", {"hipGetDeviceCount", CONV_DEVICE, API_RUNTIME}},
|
{"cudaGetDeviceCount", {"hipGetDeviceCount", CONV_DEVICE, API_RUNTIME}},
|
||||||
{"cudaChooseDevice", {"hipChooseDevice", CONV_DEVICE, API_RUNTIME}},
|
{"cudaChooseDevice", {"hipChooseDevice", CONV_DEVICE, API_RUNTIME}},
|
||||||
|
|
||||||
@@ -118,20 +195,25 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
|||||||
{"cudaDeviceGetAttribute", {"hipDeviceGetAttribute", CONV_DEVICE, API_RUNTIME}},
|
{"cudaDeviceGetAttribute", {"hipDeviceGetAttribute", CONV_DEVICE, API_RUNTIME}},
|
||||||
|
|
||||||
// Pointer Attributes
|
// Pointer Attributes
|
||||||
// struct cudaPointerAttributes
|
// no analogue
|
||||||
{"cudaPointerGetAttributes", {"hipPointerGetAttributes", CONV_MEMORY, API_RUNTIME}},
|
// NOTE: Not equal to cuPointerGetAttributes due to different signatures
|
||||||
|
{"cudaPointerGetAttributes", {"hipPointerGetAttributes", CONV_ADDRESSING, API_RUNTIME}},
|
||||||
|
// cuMemHostGetDevicePointer
|
||||||
{"cudaHostGetDevicePointer", {"hipHostGetDevicePointer", CONV_MEMORY, API_RUNTIME}},
|
{"cudaHostGetDevicePointer", {"hipHostGetDevicePointer", CONV_MEMORY, API_RUNTIME}},
|
||||||
|
|
||||||
// Device
|
// Device
|
||||||
{"cudaGetDeviceProperties", {"hipGetDeviceProperties", CONV_DEVICE, API_RUNTIME}},
|
{"cudaGetDeviceProperties", {"hipGetDeviceProperties", CONV_DEVICE, API_RUNTIME}},
|
||||||
|
// cuDeviceGetPCIBusId
|
||||||
{"cudaDeviceGetPCIBusId", {"hipDeviceGetPCIBusId", CONV_DEVICE, API_RUNTIME}},
|
{"cudaDeviceGetPCIBusId", {"hipDeviceGetPCIBusId", CONV_DEVICE, API_RUNTIME}},
|
||||||
|
// cuDeviceGetByPCIBusId
|
||||||
{"cudaDeviceGetByPCIBusId", {"hipDeviceGetByPCIBusId", CONV_DEVICE, API_RUNTIME}},
|
{"cudaDeviceGetByPCIBusId", {"hipDeviceGetByPCIBusId", CONV_DEVICE, API_RUNTIME}},
|
||||||
{"cudaDeviceGetStreamPriorityRange", {"hipDeviceGetStreamPriorityRange", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}},
|
// cuCtxGetStreamPriorityRange
|
||||||
|
{"cudaDeviceGetStreamPriorityRange", {"hipDeviceGetStreamPriorityRange", CONV_DEVICE, API_RUNTIME}},
|
||||||
{"cudaSetValidDevices", {"hipSetValidDevices", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}},
|
{"cudaSetValidDevices", {"hipSetValidDevices", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||||
|
|
||||||
// Device Flags
|
// Device Flags
|
||||||
{"cudaGetDeviceFlags", {"hipGetDeviceFlags", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}},
|
// cuCtxGetFlags
|
||||||
|
{"cudaGetDeviceFlags", {"hipCtxGetFlags", CONV_DEVICE, API_RUNTIME}},
|
||||||
{"cudaSetDeviceFlags", {"hipSetDeviceFlags", CONV_DEVICE, API_RUNTIME}},
|
{"cudaSetDeviceFlags", {"hipSetDeviceFlags", CONV_DEVICE, API_RUNTIME}},
|
||||||
|
|
||||||
// Cache config
|
// Cache config
|
||||||
@@ -179,7 +261,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
|||||||
// {"cudaThreadGetSharedMemConfig", {"hipDeviceGetSharedMemConfig", CONV_DEVICE, API_RUNTIME}},
|
// {"cudaThreadGetSharedMemConfig", {"hipDeviceGetSharedMemConfig", CONV_DEVICE, API_RUNTIME}},
|
||||||
// {"cudaThreadSetSharedMemConfig", {"hipDeviceSetSharedMemConfig", CONV_DEVICE, API_RUNTIME}},
|
// {"cudaThreadSetSharedMemConfig", {"hipDeviceSetSharedMemConfig", CONV_DEVICE, API_RUNTIME}},
|
||||||
|
|
||||||
|
// cuCtxGetLimit
|
||||||
{"cudaDeviceGetLimit", {"hipDeviceGetLimit", CONV_DEVICE, API_RUNTIME}},
|
{"cudaDeviceGetLimit", {"hipDeviceGetLimit", CONV_DEVICE, API_RUNTIME}},
|
||||||
|
|
||||||
// Profiler
|
// Profiler
|
||||||
|
|||||||
Yeni konuda referans
Bir kullanıcı engelle