Merge pull request #1712 from emankov/hipify
[HIPIFY] CUDA 10.2 (functions only)
Этот коммит содержится в:
@@ -73,7 +73,7 @@ $no_output = 1 if $examine;
|
||||
|
||||
push(@whitelist, split(',', $whitelist));
|
||||
|
||||
@statNames = ("error", "init", "version", "device", "context", "module", "memory", "addressing", "stream", "event", "external_resource_interop", "stream_memory", "execution", "graph", "occupancy", "texture", "surface", "peer", "graphics", "profiler", "openGL", "D3D9", "D3D10", "D3D11", "VDPAU", "EGL", "thread", "complex", "library", "device_library", "device_function", "include", "include_cuda_main_header", "type", "literal", "numeric_literal", "define", "extern_shared", "kernel_launch");
|
||||
@statNames = ("error", "init", "version", "device", "context", "module", "memory", "virtual_memory", "addressing", "stream", "event", "external_resource_interop", "stream_memory", "execution", "graph", "occupancy", "texture", "surface", "peer", "graphics", "profiler", "openGL", "D3D9", "D3D10", "D3D11", "VDPAU", "EGL", "thread", "complex", "library", "device_library", "device_function", "include", "include_cuda_main_header", "type", "literal", "numeric_literal", "define", "extern_shared", "kernel_launch");
|
||||
|
||||
sub totalStats {
|
||||
my %count = %{ shift() };
|
||||
@@ -2437,7 +2437,7 @@ while (@ARGV) {
|
||||
transformHostFunctions();
|
||||
# TODO: would like to move this code outside loop but it uses $_ which contains the whole file
|
||||
unless ($no_output) {
|
||||
my $apiCalls = $ft{'error'} + $ft{'init'} + $ft{'version'} + $ft{'device'} + $ft{'context'} + $ft{'module'} + $ft{'memory'} + $ft{'addressing'} + $ft{'stream'} + $ft{'event'} + $ft{'external_resource_interop'} + $ft{'stream_memory'} + $ft{'execution'} + $ft{'graph'} + $ft{'occupancy'} + $ft{'texture'} + $ft{'surface'} + $ft{'peer'} + $ft{'graphics'} + $ft{'profiler'} + $ft{'openGL'} + $ft{'D3D9'} + $ft{'D3D10'} + $ft{'D3D11'} + $ft{'VDPAU'} + $ft{'EGL'} + $ft{'thread'} + $ft{'complex'} + $ft{'library'} + $ft{'device_library'} + $ft{'include'} + $ft{'include_cuda_main_header'} + $ft{'type'} + $ft{'literal'} + $ft{'numeric_literal'} + $ft{'define'};
|
||||
my $apiCalls = $ft{'error'} + $ft{'init'} + $ft{'version'} + $ft{'device'} + $ft{'context'} + $ft{'module'} + $ft{'memory'} + $ft{'virtual_memory'} + $ft{'addressing'} + $ft{'stream'} + $ft{'event'} + $ft{'external_resource_interop'} + $ft{'stream_memory'} + $ft{'execution'} + $ft{'graph'} + $ft{'occupancy'} + $ft{'texture'} + $ft{'surface'} + $ft{'peer'} + $ft{'graphics'} + $ft{'profiler'} + $ft{'openGL'} + $ft{'D3D9'} + $ft{'D3D10'} + $ft{'D3D11'} + $ft{'VDPAU'} + $ft{'EGL'} + $ft{'thread'} + $ft{'complex'} + $ft{'library'} + $ft{'device_library'} + $ft{'include'} + $ft{'include_cuda_main_header'} + $ft{'type'} + $ft{'literal'} + $ft{'numeric_literal'} + $ft{'define'};
|
||||
my $kernStuff = $hasDeviceCode + $ft{'kernel_launch'} + $ft{'device_function'};
|
||||
my $totalCalls = $apiCalls + $kernStuff;
|
||||
$is_dos = m/\r\n$/;
|
||||
|
||||
@@ -829,6 +829,7 @@
|
||||
| `cuDeviceGetAttribute` | `hipDeviceGetAttribute` |
|
||||
| `cuDeviceGetCount` | `hipGetDeviceCount` |
|
||||
| `cuDeviceGetName` | `hipDeviceGetName` |
|
||||
| `cuDeviceGetNvSciSyncAttributes` | | 10.2 |
|
||||
| `cuDeviceTotalMem` | `hipDeviceTotalMem` |
|
||||
| `cuDeviceGetLuid` | | 10.0 |
|
||||
| `cuDeviceGetUuid` | | 9.2 |
|
||||
@@ -967,7 +968,25 @@
|
||||
| `cuMipmappedArrayDestroy` | |
|
||||
| `cuMipmappedArrayGetLevel` | |
|
||||
|
||||
## **12. Unified Addressing**
|
||||
## **12. Virtual Memory Management**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
| `cuMemAddressFree` | | 10.2 |
|
||||
| `cuMemAddressReserve` | | 10.2 |
|
||||
| `cuMemCreate` | | 10.2 |
|
||||
| `cuMemExportToShareableHandle` | | 10.2 |
|
||||
|
||||
| `cuMemGetAccess` | | 10.2 |
|
||||
| `cuMemGetAllocationGranularity` | | 10.2 |
|
||||
| `cuMemGetAllocationPropertiesFromHandle` | | 10.2 |
|
||||
| `cuMemImportFromShareableHandle` | | 10.2 |
|
||||
| `cuMemMap` | | 10.2 |
|
||||
| `cuMemRelease` | | 10.2 |
|
||||
| `cuMemSetAccess` | | 10.2 |
|
||||
| `cuMemUnmap` | | 10.2 |
|
||||
|
||||
## **13. Unified Addressing**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
@@ -979,7 +998,7 @@
|
||||
| `cuPointerGetAttributes` | |
|
||||
| `cuPointerSetAttribute` | |
|
||||
|
||||
## **13. Stream Management**
|
||||
## **14. Stream Management**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
@@ -1000,7 +1019,7 @@
|
||||
| `cuStreamIsCapturing` | | 10.0 |
|
||||
| `cuThreadExchangeStreamCaptureMode` | | 10.1 |
|
||||
|
||||
## **14. Event Management**
|
||||
## **15. Event Management**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|------------------|
|
||||
@@ -1011,7 +1030,7 @@
|
||||
| `cuEventRecord` | `hipEventRecord` |
|
||||
| `cuEventSynchronize` | `hipEventSynchronize` |
|
||||
|
||||
## **15. External Resource Interoperability**
|
||||
## **16. External Resource Interoperability**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
@@ -1024,7 +1043,7 @@
|
||||
| `cuImportExternalSemaphore` | | 10.0 |
|
||||
| `cuDestroyExternalSemaphore` | | 10.0 |
|
||||
|
||||
## **16. Stream Memory Operations**
|
||||
## **17. Stream Memory Operations**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
@@ -1034,7 +1053,7 @@
|
||||
| `cuStreamWriteValue32` | | 8.0 |
|
||||
| `cuStreamWriteValue64` | | 9.0 |
|
||||
|
||||
## **17. Execution Control**
|
||||
## **18. Execution Control**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
@@ -1047,7 +1066,7 @@
|
||||
| `cuLaunchCooperativeKernel` | | 9.0 |
|
||||
| `cuLaunchCooperativeKernelMultiDevice` | | 9.0 |
|
||||
|
||||
## **18. Execution Control [DEPRECATED]**
|
||||
## **19. Execution Control [DEPRECATED]**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|------------------|
|
||||
@@ -1061,7 +1080,7 @@
|
||||
| `cuParamSetTexRef` | |
|
||||
| `cuParamSetv` | |
|
||||
|
||||
## **19. Graph Management**
|
||||
## **20. Graph Management**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
@@ -1096,9 +1115,13 @@
|
||||
| `cuGraphInstantiate` | | 10.0 |
|
||||
| `cuGraphExecDestroy` | | 10.0 |
|
||||
| `cuGraphExecKernelNodeSetParams` | | 10.1 |
|
||||
| `cuGraphExecMemcpyNodeSetParams` | | 10.2 |
|
||||
| `cuGraphExecMemsetNodeSetParams` | | 10.2 |
|
||||
| `cuGraphExecHostNodeSetParams` | | 10.2 |
|
||||
| `cuGraphExecUpdate` | | 10.2 |
|
||||
| `cuGraphDestroy` | | 10.0 |
|
||||
|
||||
## **20. Occupancy**
|
||||
## **21. Occupancy**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|---------------------------------------------------------|------------------|
|
||||
@@ -1107,7 +1130,7 @@
|
||||
| `cuOccupancyMaxPotentialBlockSize` |`hipOccupancyMaxPotentialBlockSize` |
|
||||
| `cuOccupancyMaxPotentialBlockSizeWithFlags` | |
|
||||
|
||||
## **21. Texture Reference Management**
|
||||
## **22. Texture Reference Management [DEPRECATED]**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
@@ -1136,15 +1159,10 @@
|
||||
| `cuTexRefSetMipmapLevelBias` | |
|
||||
| `cuTexRefSetMipmapLevelClamp` | |
|
||||
| `cuTexRefSetMipmappedArray` | |
|
||||
|
||||
## **22. Texture Reference Management [DEPRECATED]**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|------------------|
|
||||
| `cuTexRefCreate` | |
|
||||
| `cuTexRefDestroy` | |
|
||||
|
||||
## **23. Surface Reference Management**
|
||||
## **23. Surface Reference Management [DEPRECATED]**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|------------------|
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
| `cudaDeviceGetByPCIBusId` | `hipDeviceGetByPCIBusId` |
|
||||
| `cudaDeviceGetCacheConfig` | `hipDeviceGetCacheConfig` |
|
||||
| `cudaDeviceGetLimit` | `hipDeviceGetLimit` |
|
||||
| `cudaDeviceGetNvSciSyncAttributes` | | 10.2 |
|
||||
| `cudaDeviceGetPCIBusId` | `hipDeviceGetPCIBusId` |
|
||||
| `cudaDeviceGetSharedMemConfig` | `hipDeviceGetSharedMemConfig` |
|
||||
| `cudaDeviceGetStreamPriorityRange` | `hipDeviceGetStreamPriorityRange` |
|
||||
@@ -121,15 +122,15 @@
|
||||
| `cudaOccupancyMaxActiveBlocksPerMultiprocessor` |`hipOccupancyMaxActiveBlocksPerMultiprocessor` |
|
||||
| `cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` |`hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`|
|
||||
|
||||
## **9. Execution Control [DEPRECATED since 7.0]**
|
||||
## **Former 9. Execution Control [DEPRECATED since 7.0, REMOVED since 10.1]**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
| `cudaConfigureCall` | `hipConfigureCall` |
|
||||
| `cudaLaunch` | `hipLaunchByPtr` |
|
||||
| `cudaSetupArgument` | `hipSetupArgument` | 7.0 - 10.0 |
|
||||
| `cudaSetupArgument` | `hipSetupArgument` |
|
||||
|
||||
## **10. Memory Management**
|
||||
## **9. Memory Management**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
@@ -168,16 +169,11 @@
|
||||
| `cudaMemcpy3DAsync` | |
|
||||
| `cudaMemcpy3DPeer` | |
|
||||
| `cudaMemcpy3DPeerAsync` | |
|
||||
| `cudaMemcpyArrayToArray` | |
|
||||
| `cudaMemcpyAsync` | `hipMemcpyAsync` |
|
||||
| `cudaMemcpyFromArray` | `hipMemcpyFromArray` |
|
||||
| `cudaMemcpyFromArrayAsync` | |
|
||||
| `cudaMemcpyFromSymbol` | `hipMemcpyFromSymbol` |
|
||||
| `cudaMemcpyFromSymbolAsync` | `hipMemcpyFromSymbolAsync` |
|
||||
| `cudaMemcpyPeer` | `hipMemcpyPeer` |
|
||||
| `cudaMemcpyPeerAsync` | `hipMemcpyPeerAsync` |
|
||||
| `cudaMemcpyToArray` | `hipMemcpyToArray` |
|
||||
| `cudaMemcpyToArrayAsync` | |
|
||||
| `cudaMemcpyToSymbol` | `hipMemcpyToSymbol` |
|
||||
| `cudaMemcpyToSymbolAsync` | `hipMemcpyToSymbolAsync` |
|
||||
| `cudaMemset` | `hipMemset` |
|
||||
@@ -190,6 +186,16 @@
|
||||
| `make_cudaPitchedPtr` | `make_hipPitchedPtr` |
|
||||
| `make_cudaPos` | `make_hipPos` |
|
||||
|
||||
## **10. Memory Management [DEPRECATED since 10.1]**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
| `cudaMemcpyArrayToArray` | |
|
||||
| `cudaMemcpyFromArray` | `hipMemcpyFromArray` |
|
||||
| `cudaMemcpyFromArrayAsync` | |
|
||||
| `cudaMemcpyToArray` | `hipMemcpyToArray` |
|
||||
| `cudaMemcpyToArrayAsync` | |
|
||||
|
||||
## **11. Unified Addressing**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
@@ -329,7 +335,7 @@
|
||||
| `cudaGraphicsUnmapResources` | |
|
||||
| `cudaGraphicsUnregisterResource` | |
|
||||
|
||||
## **24. Texture Reference Management**
|
||||
## **24. Texture Reference Management [DEPRECATED]**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|----------------------------------|:----------------:|
|
||||
@@ -343,7 +349,7 @@
|
||||
| `cudaGetTextureReference` | `hipGetTextureReference` |
|
||||
| `cudaUnbindTexture` | `hipUnbindTexture` |
|
||||
|
||||
## **25. Surface Reference Management**
|
||||
## **25. Surface Reference Management [DEPRECATED]**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------|:----------------:|
|
||||
@@ -399,6 +405,10 @@
|
||||
| `cudaGraphHostNodeSetParams` | | 10.0 |
|
||||
| `cudaGraphInstantiate` | | 10.0 |
|
||||
| `cudaGraphExecKernelNodeSetParams` | | 10.1 |
|
||||
| `cudaGraphExecMemcpyNodeSetParams` | | 10.2 |
|
||||
| `cudaGraphExecMemsetNodeSetParams` | | 10.2 |
|
||||
| `cudaGraphExecHostNodeSetParams` | | 10.2 |
|
||||
| `cudaGraphExecUpdate` | | 10.2 |
|
||||
| `cudaGraphKernelNodeGetParams` | | 10.0 |
|
||||
| `cudaGraphKernelNodeSetParams` | | 10.0 |
|
||||
| `cudaGraphLaunch` | | 10.0 |
|
||||
@@ -412,8 +422,7 @@
|
||||
| `cudaGraphNodeGetType` | | 10.0 |
|
||||
| `cudaGraphRemoveDependencies` | | 10.0 |
|
||||
|
||||
## **30. C++ API Routines**
|
||||
*(7.0 contains, 7.5 doesn't)*
|
||||
## **30. C++ API Routines [DEPRECATED since 7.5]**
|
||||
|
||||
| **CUDA** | **HIP** |**CUDA version\***|
|
||||
|-----------------------------------------------------------|-------------------------------------------------------|:----------------:|
|
||||
|
||||
@@ -52,6 +52,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
{"cuDeviceGetLuid", {"hipDeviceGetLuid", "", CONV_DEVICE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// no analogue
|
||||
{"cuDeviceGetName", {"hipDeviceGetName", "", CONV_DEVICE, API_DRIVER}},
|
||||
// cudaDeviceGetNvSciSyncAttributes
|
||||
{"cuDeviceGetNvSciSyncAttributes", {"hipDeviceGetNvSciSyncAttributes", "", CONV_DEVICE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// no analogue
|
||||
{"cuDeviceGetUuid", {"hipDeviceGetUuid", "", CONV_DEVICE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// no analogue
|
||||
@@ -310,7 +312,22 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
// NOTE: Not equal to cudaGetMipmappedArrayLevel due to different signatures
|
||||
{"cuMipmappedArrayGetLevel", {"hipMipmappedArrayGetLevel", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.12. Unified Addressing
|
||||
// 5.12. Virtual Memory Management
|
||||
// no analogue
|
||||
{"cuMemAddressFree", {"hipMemAddressFree", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemAddressReserve", {"hipMemAddressReserve", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemCreate", {"hipMemCreate", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemExportToShareableHandle", {"hipMemExportToShareableHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemGetAccess", {"hipMemGetAccess", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemGetAllocationGranularity", {"hipMemGetAllocationGranularity", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemGetAllocationPropertiesFromHandle", {"hipMemGetAllocationPropertiesFromHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemImportFromShareableHandle", {"hipMemImportFromShareableHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemMap", {"hipMemMap", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemRelease", {"hipMemRelease", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemSetAccess", {"hipMemSetAccess", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuMemUnmap", {"hipMemUnmap", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.13. Unified Addressing
|
||||
// cudaMemAdvise
|
||||
{"cuMemAdvise", {"hipMemAdvise", "", CONV_ADDRESSING, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// TODO: double check cudaMemPrefetchAsync
|
||||
@@ -327,7 +344,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
// no analogue
|
||||
{"cuPointerSetAttribute", {"hipPointerSetAttribute", "", CONV_ADDRESSING, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.13. Stream Management
|
||||
// 5.14. Stream Management
|
||||
// cudaStreamAddCallback
|
||||
{"cuStreamAddCallback", {"hipStreamAddCallback", "", CONV_STREAM, API_DRIVER}},
|
||||
// cudaStreamAttachMemAsync
|
||||
@@ -364,7 +381,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
// cudaThreadExchangeStreamCaptureMode
|
||||
{"cuThreadExchangeStreamCaptureMode", {"hipThreadExchangeStreamCaptureMode", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.14. Event Management
|
||||
// 5.15. Event Management
|
||||
// cudaEventCreateWithFlags
|
||||
{"cuEventCreate", {"hipEventCreateWithFlags", "", CONV_EVENT, API_DRIVER}},
|
||||
// cudaEventDestroy
|
||||
@@ -379,7 +396,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
// cudaEventSynchronize
|
||||
{"cuEventSynchronize", {"hipEventSynchronize", "", CONV_EVENT, API_DRIVER}},
|
||||
|
||||
// 5.15. External Resource Interoperability
|
||||
// 5.16. External Resource Interoperability
|
||||
// cudaDestroyExternalMemory
|
||||
{"cuDestroyExternalMemory", {"hipDestroyExternalMemory", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// cudaDestroyExternalSemaphore
|
||||
@@ -397,7 +414,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
// cudaWaitExternalSemaphoresAsync
|
||||
{"cuWaitExternalSemaphoresAsync", {"hipWaitExternalSemaphoresAsync", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.16. Stream Memory Operations
|
||||
// 5.17. Stream Memory Operations
|
||||
// no analogues
|
||||
{"cuStreamBatchMemOp", {"hipStreamBatchMemOp", "", CONV_STREAM_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuStreamWaitValue32", {"hipStreamWaitValue32", "", CONV_STREAM_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
@@ -405,7 +422,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
{"cuStreamWriteValue32", {"hipStreamWriteValue32", "", CONV_STREAM_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuStreamWriteValue64", {"hipStreamWriteValue64", "", CONV_STREAM_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.17.Execution Control
|
||||
// 5.18.Execution Control
|
||||
// no analogue
|
||||
{"cuFuncGetAttribute", {"hipFuncGetAttribute", "", CONV_EXECUTION, API_DRIVER}},
|
||||
// no analogue
|
||||
@@ -429,7 +446,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
// NOTE: Not equal to cudaLaunchKernel due to different signatures
|
||||
{"cuLaunchKernel", {"hipModuleLaunchKernel", "", CONV_EXECUTION, API_DRIVER}},
|
||||
|
||||
// 5.18.Execution Control [DEPRECATED]
|
||||
// 5.19.Execution Control [DEPRECATED]
|
||||
// no analogue
|
||||
{"cuFuncSetBlockShape", {"hipFuncSetBlockShape", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// no analogue
|
||||
@@ -452,7 +469,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
// no analogue
|
||||
{"cuParamSetv", {"hipParamSetv", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.19. Graph Management
|
||||
// 5.20. Graph Management
|
||||
// cudaGraphAddChildGraphNode
|
||||
{"cuGraphAddChildGraphNode", {"hipGraphAddChildGraphNode", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// cudaGraphAddDependencies
|
||||
@@ -517,8 +534,16 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
{"cuGraphNodeGetType", {"hipGraphNodeGetType", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// cudaGraphRemoveDependencies
|
||||
{"cuGraphRemoveDependencies", {"hipGraphRemoveDependencies", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// cudaGraphExecMemcpyNodeSetParams
|
||||
{"cuGraphExecMemcpyNodeSetParams", {"hipGraphExecMemcpyNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// cudaGraphExecMemsetNodeSetParams
|
||||
{"cuGraphExecMemsetNodeSetParams", {"hipGraphExecMemsetNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// cudaGraphExecHostNodeSetParams
|
||||
{"cuGraphExecHostNodeSetParams", {"hipGraphExecHostNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
// cudaGraphExecUpdate
|
||||
{"cuGraphExecUpdate", {"hipGraphExecUpdate", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.20. Occupancy
|
||||
// 5.21. Occupancy
|
||||
// cudaOccupancyMaxActiveBlocksPerMultiprocessor
|
||||
{"cuOccupancyMaxActiveBlocksPerMultiprocessor", {"hipOccupancyMaxActiveBlocksPerMultiprocessor", "", CONV_OCCUPANCY, API_DRIVER}},
|
||||
// cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
|
||||
@@ -528,7 +553,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
// cudaOccupancyMaxPotentialBlockSizeWithFlags
|
||||
{"cuOccupancyMaxPotentialBlockSizeWithFlags", {"hipOccupancyMaxPotentialBlockSizeWithFlags", "", CONV_OCCUPANCY, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.21. Texture Reference Management
|
||||
// 5.22. Texture Reference Management [DEPRECATED]
|
||||
// no analogues
|
||||
{"cuTexRefGetAddress", {"hipTexRefGetAddress", "", CONV_TEXTURE, API_DRIVER}},
|
||||
{"cuTexRefGetAddress_v2", {"hipTexRefGetAddress", "", CONV_TEXTURE, API_DRIVER}},
|
||||
@@ -559,13 +584,10 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
|
||||
{"cuTexRefSetMipmapLevelBias", {"hipTexRefSetMipmapLevelBias", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuTexRefSetMipmapLevelClamp", {"hipTexRefSetMipmapLevelClamp", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuTexRefSetMipmappedArray", {"hipTexRefSetMipmappedArray", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.22. Texture Reference Management [DEPRECATED]
|
||||
// no analogues
|
||||
{"cuTexRefCreate", {"hipTexRefCreate", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuTexRefDestroy", {"hipTexRefDestroy", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.23. Surface Reference Management
|
||||
// 5.23. Surface Reference Management [DEPRECATED]
|
||||
// no analogues
|
||||
{"cuSurfRefGetArray", {"hipSurfRefGetArray", "", CONV_SURFACE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
{"cuSurfRefSetArray", {"hipSurfRefSetArray", "", CONV_SURFACE, API_DRIVER, HIP_UNSUPPORTED}},
|
||||
|
||||
@@ -35,6 +35,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
{"cudaDeviceGetCacheConfig", {"hipDeviceGetCacheConfig", "", CONV_DEVICE, API_RUNTIME}},
|
||||
// cuCtxGetLimit
|
||||
{"cudaDeviceGetLimit", {"hipDeviceGetLimit", "", CONV_DEVICE, API_RUNTIME}},
|
||||
// cuDeviceGetNvSciSyncAttributes
|
||||
{"cudaDeviceGetNvSciSyncAttributes", {"hipDeviceGetNvSciSyncAttributes", "", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuDeviceGetP2PAttribute
|
||||
{"cudaDeviceGetP2PAttribute", {"hipDeviceGetP2PAttribute", "", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuDeviceGetPCIBusId
|
||||
@@ -209,7 +211,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
{"cudaSetDoubleForHost", {"hipSetDoubleForHost", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.8. Occupancy
|
||||
//
|
||||
// cuOccupancyMaxActiveBlocksPerMultiprocessor
|
||||
{"cudaOccupancyMaxActiveBlocksPerMultiprocessor", {"hipOccupancyMaxActiveBlocksPerMultiprocessor", "", CONV_OCCUPANCY, API_RUNTIME}},
|
||||
// cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
|
||||
{"cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", {"hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", "", CONV_OCCUPANCY, API_RUNTIME}},
|
||||
@@ -222,7 +224,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
// no analogue
|
||||
{"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags", {"hipOccupancyMaxPotentialBlockSizeVariableSMemWithFlags", "", CONV_OCCUPANCY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.9. Execution Control [DEPRECATED]
|
||||
// Former 5.9. Execution Control [DEPRECATED]
|
||||
// NOTE: Removed in CUDA 10.1
|
||||
// no analogue
|
||||
{"cudaConfigureCall", {"hipConfigureCall", "", CONV_EXECUTION, API_RUNTIME}},
|
||||
// no analogue
|
||||
@@ -231,7 +234,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
// no analogue
|
||||
{"cudaSetupArgument", {"hipSetupArgument", "", CONV_EXECUTION, API_RUNTIME}},
|
||||
|
||||
// 5.10. Memory Management
|
||||
// 5.9. Memory Management
|
||||
// no analogue
|
||||
{"cudaArrayGetInfo", {"hipArrayGetInfo", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuMemFree
|
||||
@@ -313,16 +316,9 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
// 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}},
|
||||
@@ -333,10 +329,6 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
// 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}},
|
||||
@@ -367,6 +359,19 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
// no analogue
|
||||
{"make_cudaPos", {"make_hipPos", "", CONV_MEMORY, API_RUNTIME}},
|
||||
|
||||
// 5.10. Memory Management [DEPRECATED]
|
||||
// no analogue
|
||||
// NOTE: Not equal to cuMemcpyAtoA due to different signatures
|
||||
{"cudaMemcpyArrayToArray", {"hipMemcpyArrayToArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// no analogue
|
||||
{"cudaMemcpyFromArray", {"hipMemcpyFromArray", "", CONV_MEMORY, API_RUNTIME}},
|
||||
// no analogue
|
||||
{"cudaMemcpyFromArrayAsync", {"hipMemcpyFromArrayAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// no analogue
|
||||
{"cudaMemcpyToArray", {"hipMemcpyToArray", "", CONV_MEMORY, API_RUNTIME}},
|
||||
// no analogue
|
||||
{"cudaMemcpyToArrayAsync", {"hipMemcpyToArrayAsync", "", CONV_MEMORY, API_RUNTIME}},
|
||||
|
||||
// 5.11.Unified Addressing
|
||||
// no analogue
|
||||
// NOTE: Not equal to cuPointerGetAttributes due to different signatures
|
||||
@@ -546,7 +551,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
// cuGraphicsUnregisterResource
|
||||
{"cudaGraphicsUnregisterResource", {"hipGraphicsUnregisterResource", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
|
||||
// 5.24. Texture Reference Management
|
||||
// 5.24. Texture Reference Management [DEPRECATED]
|
||||
// no analogue
|
||||
{"cudaBindTexture", {"hipBindTexture", "", CONV_TEXTURE, API_RUNTIME}},
|
||||
// no analogue
|
||||
@@ -568,7 +573,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
// no analogue
|
||||
{"cudaUnbindTexture", {"hipUnbindTexture", "", CONV_TEXTURE, API_RUNTIME}},
|
||||
|
||||
// 5.25. Surface Reference Management
|
||||
// 5.25. Surface Reference Management [DEPRECATED]
|
||||
// no analogue
|
||||
{"cudaBindSurfaceToArray", {"hipBindSurfaceToArray", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// TODO: double check cuModuleGetSurfRef
|
||||
@@ -646,6 +651,14 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_FUNCTION_MAP{
|
||||
{"cudaGraphInstantiate", {"hipGraphInstantiate", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuGraphExecKernelNodeSetParams
|
||||
{"cudaGraphExecKernelNodeSetParams", {"hipGraphExecKernelNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuGraphExecMemcpyNodeSetParams
|
||||
{"cudaGraphExecMemcpyNodeSetParams", {"hipGraphExecMemcpyNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuGraphExecMemsetNodeSetParams
|
||||
{"cudaGraphExecMemsetNodeSetParams", {"hipGraphExecMemsetNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuGraphExecHostNodeSetParams
|
||||
{"cudaGraphExecHostNodeSetParams", {"hipGraphExecHostNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuGraphExecUpdate
|
||||
{"cudaGraphExecUpdate", {"hipGraphExecUpdate", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuGraphKernelNodeGetParams
|
||||
{"cudaGraphKernelNodeGetParams", {"hipGraphKernelNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}},
|
||||
// cuGraphKernelNodeSetParams
|
||||
|
||||
@@ -34,6 +34,7 @@ const char *counterNames[NUM_CONV_TYPES] = {
|
||||
"context", // CONV_CONTEXT
|
||||
"module", // CONV_MODULE
|
||||
"memory", // CONV_MEMORY
|
||||
"virtual_memory", // CONV_VIRTUAL_MEMORY
|
||||
"addressing", // CONV_ADDRESSING
|
||||
"stream", // CONV_STREAM
|
||||
"event", // CONV_EVENT
|
||||
@@ -76,6 +77,7 @@ const char *counterTypes[NUM_CONV_TYPES] = {
|
||||
"CONV_CONTEXT",
|
||||
"CONV_MODULE",
|
||||
"CONV_MEMORY",
|
||||
"CONV_VIRTUAL_MEMORY",
|
||||
"CONV_ADDRESSING",
|
||||
"CONV_STREAM",
|
||||
"CONV_EVENT",
|
||||
|
||||
@@ -49,36 +49,38 @@ enum ConvTypes {
|
||||
// Driver API : 5.10. Module Management
|
||||
CONV_MODULE,
|
||||
// Driver API : 5.11. Memory Management
|
||||
// Runtime API: 5.10. Memory Management
|
||||
// Runtime API: 5.9. Memory Management, 5.10. Memory Management [DEPRECATED]
|
||||
CONV_MEMORY,
|
||||
// Driver API : 5.12. Unified Addressing
|
||||
// Driver API : 5.12. Virtual Memory Management
|
||||
CONV_VIRTUAL_MEMORY,
|
||||
// Driver API : 5.13. Unified Addressing
|
||||
// Runtime API: 5.11. Unified Addressing
|
||||
CONV_ADDRESSING,
|
||||
// Driver API : 5.13. Stream Management
|
||||
// Driver API : 5.14. Stream Management
|
||||
// Runtime API: 5.4. Stream Management
|
||||
CONV_STREAM,
|
||||
// Driver API : 5.14. Event Management
|
||||
// Driver API : 5.15. Event Management
|
||||
// Runtime API: 5.5. Event Management
|
||||
CONV_EVENT,
|
||||
// Driver API : 5.15. External Resource Interoperability
|
||||
// Driver API : 5.16. External Resource Interoperability
|
||||
// Runtime API: 5.6.External Resource Interoperability
|
||||
CONV_EXT_RES,
|
||||
// Driver API : 5.16. Stream memory operations
|
||||
// Driver API : 5.17. Stream memory operations
|
||||
CONV_STREAM_MEMORY,
|
||||
// Driver API : 5.17. Execution Control, 5.18. Execution Control [DEPRECATED]
|
||||
// Runtime API: 5.7.Execution Control, 5.9. Execution Control [DEPRECATED]
|
||||
// Driver API : 5.18. Execution Control, 5.19. Execution Control [DEPRECATED]
|
||||
// Runtime API: 5.7.Execution Control, Former 5.9. Execution Control [DEPRECATED]
|
||||
CONV_EXECUTION,
|
||||
// Driver API : 5.19. Graph Management
|
||||
// Driver API : 5.20. Graph Management
|
||||
// Runtime API: 5.29. Graph Management
|
||||
CONV_GRAPH,
|
||||
// Driver API : 5.20. Occupancy
|
||||
// Driver API : 5.21. Occupancy
|
||||
// Runtime API: 5.8. Occupancy
|
||||
CONV_OCCUPANCY,
|
||||
// Driver API : 5.21. Texture Reference Management, 5.22. Texture Reference Management [DEPRECATED], 5.24. Texture Object Management
|
||||
// Runtime API: 5.24. Texture Reference Management, 5.26. Texture Object Management
|
||||
// Driver API : 5.22. Texture Reference Management [DEPRECATED], 5.24. Texture Object Management
|
||||
// Runtime API: 5.24. Texture Reference Management [DEPRECATED], 5.26. Texture Object Management
|
||||
CONV_TEXTURE,
|
||||
// Driver API : 5.23. Surface Reference Management, 5.25. Surface Object Management
|
||||
// Runtime API: 5.25. Surface Reference Management, 5.27. Surface Object Management
|
||||
// Driver API : 5.23. Surface Reference Management [DEPRECATED], 5.25. Surface Object Management
|
||||
// Runtime API: 5.25. Surface Reference Management [DEPRECATED], 5.27. Surface Object Management
|
||||
CONV_SURFACE,
|
||||
// Driver API : 5.26. Peer Context Memory Access
|
||||
// Runtime API: 5.12. Peer Device Memory Access
|
||||
|
||||
Ссылка в новой задаче
Block a user