Skip to content

Commit

Permalink
[HIPIFY] Sync with CUDA 12.2.0 - Part 5 - Runtime API - data types
Browse files Browse the repository at this point in the history
+ Synced with Driver API
+ Updated the regenerated hipify-perl and docs accordingly
+ Fixed typos
  • Loading branch information
emankov committed Jul 13, 2023
1 parent dcef62a commit d18ffb6
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 19 deletions.
10 changes: 10 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -6764,14 +6764,20 @@ sub warnUnsupportedFunctions {
"cudaOccupancyAvailableDynamicSMemPerBlock",
"cudaNvSciSyncAttrWait",
"cudaNvSciSyncAttrSignal",
"cudaMemsetParamsV2",
"cudaMemoryTypeUnregistered",
"cudaMemcpyToArrayAsync",
"cudaMemcpyNodeParams",
"cudaMemcpyFromArrayAsync",
"cudaMemcpyArrayToArray",
"cudaMemcpy3DPeerParms",
"cudaMemcpy3DPeerAsync",
"cudaMemcpy3DPeer",
"cudaMemcpy2DArrayToArray",
"cudaMemRangeAttributePreferredLocationType",
"cudaMemRangeAttributePreferredLocationId",
"cudaMemRangeAttributeLastPrefetchLocationType",
"cudaMemRangeAttributeLastPrefetchLocationId",
"cudaMemPrefetchAsync_v2",
"cudaMemAdvise_v2",
"cudaLimitPersistingL2CacheSize",
Expand Down Expand Up @@ -6810,6 +6816,7 @@ sub warnUnsupportedFunctions {
"cudaKernelNodeAttributeClusterDimension",
"cudaInitDeviceFlagsAreValid",
"cudaInitDevice",
"cudaHostNodeParamsV2",
"cudaGraphicsVDPAURegisterVideoSurface",
"cudaGraphicsVDPAURegisterOutputSurface",
"cudaGraphicsResourceSetMapFlags",
Expand Down Expand Up @@ -7090,6 +7097,8 @@ sub warnUnsupportedFunctions {
"cudaDevAttrReserved124",
"cudaDevAttrReserved123",
"cudaDevAttrReserved122",
"cudaDevAttrNumaId",
"cudaDevAttrNumaConfig",
"cudaDevAttrMemoryPoolSupportedHandleTypes",
"cudaDevAttrMemSyncDomainCount",
"cudaDevAttrMaxTimelineSemaphoreInteropSupported",
Expand All @@ -7105,6 +7114,7 @@ sub warnUnsupportedFunctions {
"cudaDevAttrIpcEventSupport",
"cudaDevAttrHostRegisterSupported",
"cudaDevAttrHostRegisterReadOnlySupported",
"cudaDevAttrHostNumaId",
"cudaDevAttrGPUDirectRDMAWritesOrdering",
"cudaDevAttrGPUDirectRDMASupported",
"cudaDevAttrGPUDirectRDMAFlushWritesOptions",
Expand Down
10 changes: 10 additions & 0 deletions docs/tables/CUDA_Runtime_API_functions_supported_by_HIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@
|`cudaDevAttrGlobalMemoryBusWidth`| | | |`hipDeviceAttributeMemoryBusWidth`|1.6.0| | | |
|`cudaDevAttrGpuOverlap`| | | |`hipDeviceAttributeAsyncEngineCount`|4.3.0| | | |
|`cudaDevAttrHostNativeAtomicSupported`|8.0| | |`hipDeviceAttributeHostNativeAtomicSupported`|4.3.0| | | |
|`cudaDevAttrHostNumaId`|12.2| | | | | | | |
|`cudaDevAttrHostRegisterReadOnlySupported`|11.1| | | | | | | |
|`cudaDevAttrHostRegisterSupported`|9.2| | | | | | | |
|`cudaDevAttrIntegrated`| | | |`hipDeviceAttributeIntegrated`|1.9.0| | | |
Expand Down Expand Up @@ -736,6 +737,8 @@
|`cudaDevAttrMemoryPoolsSupported`|11.2| | |`hipDeviceAttributeMemoryPoolsSupported`|5.2.0| | | |
|`cudaDevAttrMultiGpuBoardGroupID`| | | |`hipDeviceAttributeMultiGpuBoardGroupID`|5.0.0| | | |
|`cudaDevAttrMultiProcessorCount`| | | |`hipDeviceAttributeMultiprocessorCount`|1.6.0| | | |
|`cudaDevAttrNumaConfig`|12.2| | | | | | | |
|`cudaDevAttrNumaId`|12.2| | | | | | | |
|`cudaDevAttrPageableMemoryAccess`|8.0| | |`hipDeviceAttributePageableMemoryAccess`|3.10.0| | | |
|`cudaDevAttrPageableMemoryAccessUsesHostPageTables`|9.2| | |`hipDeviceAttributePageableMemoryAccessUsesHostPageTables`|3.10.0| | | |
|`cudaDevAttrPciBusId`| | | |`hipDeviceAttributePciBusId`|1.6.0| | | |
Expand Down Expand Up @@ -1172,6 +1175,7 @@
|`cudaHostAllocWriteCombined`| | | |`hipHostMallocWriteCombined`|1.6.0| | | |
|`cudaHostFn_t`|10.0| | |`hipHostFn_t`|4.3.0| | | |
|`cudaHostNodeParams`|10.0| | |`hipHostNodeParams`|4.3.0| | | |
|`cudaHostNodeParamsV2`|12.2| | | | | | | |
|`cudaHostRegisterDefault`| | | |`hipHostRegisterDefault`|1.6.0| | | |
|`cudaHostRegisterIoMemory`|7.5| | |`hipHostRegisterIoMemory`|1.6.0| | | |
|`cudaHostRegisterMapped`| | | |`hipHostRegisterMapped`|1.6.0| | | |
Expand Down Expand Up @@ -1270,7 +1274,11 @@
|`cudaMemRangeAttribute`|8.0| | |`hipMemRangeAttribute`|3.7.0| | | |
|`cudaMemRangeAttributeAccessedBy`|8.0| | |`hipMemRangeAttributeAccessedBy`|3.7.0| | | |
|`cudaMemRangeAttributeLastPrefetchLocation`|8.0| | |`hipMemRangeAttributeLastPrefetchLocation`|3.7.0| | | |
|`cudaMemRangeAttributeLastPrefetchLocationId`|12.2| | | | | | | |
|`cudaMemRangeAttributeLastPrefetchLocationType`|12.2| | | | | | | |
|`cudaMemRangeAttributePreferredLocation`|8.0| | |`hipMemRangeAttributePreferredLocation`|3.7.0| | | |
|`cudaMemRangeAttributePreferredLocationId`|12.2| | | | | | | |
|`cudaMemRangeAttributePreferredLocationType`|12.2| | | | | | | |
|`cudaMemRangeAttributeReadMostly`|8.0| | |`hipMemRangeAttributeReadMostly`|3.7.0| | | |
|`cudaMemcpy3DParms`| | | |`hipMemcpy3DParms`|1.7.0| | | |
|`cudaMemcpy3DPeerParms`| | | | | | | | |
Expand All @@ -1280,13 +1288,15 @@
|`cudaMemcpyHostToDevice`| | | |`hipMemcpyHostToDevice`|1.5.0| | | |
|`cudaMemcpyHostToHost`| | | |`hipMemcpyHostToHost`|1.5.0| | | |
|`cudaMemcpyKind`| | | |`hipMemcpyKind`|1.5.0| | | |
|`cudaMemcpyNodeParams`|12.2| | | | | | | |
|`cudaMemoryAdvise`|8.0| | |`hipMemoryAdvise`|3.7.0| | | |
|`cudaMemoryType`| | | |`hipMemoryType`|1.6.0| | | |
|`cudaMemoryTypeDevice`| | | |`hipMemoryTypeDevice`|1.6.0| | | |
|`cudaMemoryTypeHost`| | | |`hipMemoryTypeHost`|1.6.0| | | |
|`cudaMemoryTypeManaged`|10.0| | |`hipMemoryTypeManaged`|5.3.0| | | |
|`cudaMemoryTypeUnregistered`| | | | | | | | |
|`cudaMemsetParams`|10.0| | |`hipMemsetParams`|4.3.0| | | |
|`cudaMemsetParamsV2`|12.2| | | | | | | |
|`cudaMipmappedArray`| | | |`hipMipmappedArray`|1.7.0| | | |
|`cudaMipmappedArray_const_t`| | | |`hipMipmappedArray_const_t`|1.6.0| | | |
|`cudaMipmappedArray_t`| | | |`hipMipmappedArray_t`|1.7.0| | | |
Expand Down
33 changes: 18 additions & 15 deletions src/CUDA2HIP_Driver_API_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
{"CUDA_HOST_NODE_PARAMS", {"hipHostNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES}},
{"CUDA_HOST_NODE_PARAMS_v1", {"hipHostNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES}},
{"CUDA_HOST_NODE_PARAMS_v2_st", {"hipHostNodeParams_v2", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// cudaHostNodeParamsV2
{"CUDA_HOST_NODE_PARAMS_v2", {"hipHostNodeParams_v2", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

// cudaKernelNodeParams
Expand Down Expand Up @@ -109,13 +110,15 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
{"CUDA_MEMCPY3D_PEER_v1", {"hip_Memcpy3D_Peer", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

{"CUDA_MEMCPY_NODE_PARAMS_st", {"hiMemcpyNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// cudaMemcpyNodeParams
{"CUDA_MEMCPY_NODE_PARAMS", {"hiMemcpyNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

// cudaMemsetParams
{"CUDA_MEMSET_NODE_PARAMS_st", {"hipMemsetParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES}},
// cudaMemsetParams
{"CUDA_MEMSET_NODE_PARAMS", {"hipMemsetParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES}},
{"CUDA_MEMSET_NODE_PARAMS_v1", {"hipMemsetParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES}},
{"CUDA_MEMSET_NODE_PARAMS_v2_st", {"hipMemsetParams_v2", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// cudaMemsetParamsV2
{"CUDA_MEMSET_NODE_PARAMS_v2", {"hipMemsetParams_v2", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

{"CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st", {"HIP_POINTER_ATTRIBUTE_P2P_TOKENS", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
Expand Down Expand Up @@ -855,27 +858,27 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
{"CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH", {"hipDeviceAttributeClusterLaunch", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 120
// cudaDevAttrDeferredMappingCudaArraySupported
{"CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED", {"hipDeviceAttributeDeferredMappingCudaArraySupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 121
//
// cudaDevAttrReserved122
{"CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V2", {"hipDeviceAttributeCanUse64BitStreamMemOpsV2", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED | CUDA_REMOVED}}, // 122
//
// cudaDevAttrReserved123
{"CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2", {"hipDeviceAttributeCanUseStreamWaitValueNorV2", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED | CUDA_REMOVED}}, // 123
//
// cudaDevAttrReserved124
{"CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED", {"hipDeviceAttributeDmaBufSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 124
// cudaDevAttrIpcEventSupport
{"CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED", {"hipDeviceAttributeIpcEventSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 125
// cudaDevAttrMemSyncDomainCount
{"CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT", {"hipDeviceAttributeMemSyncDomainCount", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 126
//
// cudaDevAttrReserved127
{"CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED", {"hipDeviceAttributeTensorMapAccessSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 127
//
// cudaDevAttrReserved129
{"CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS", {"hipDeviceAttributeUnifiedFunctionPointers", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 129
//
// cudaDevAttrNumaConfig
{"CU_DEVICE_ATTRIBUTE_NUMA_CONFIG", {"hipDeviceAttributeNumaConfig", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 130
//
// cudaDevAttrNumaId
{"CU_DEVICE_ATTRIBUTE_NUMA_ID", {"hipDeviceAttributeNumaId", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 131
//
{"CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED", {"hipDeviceAttributeMulticastSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 132
//
// cudaDevAttrHostNumaId
{"CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID", {"hipDeviceAttributeHostNumaId", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 134
// cudaDevAttrMax
{"CU_DEVICE_ATTRIBUTE_MAX", {"hipDeviceAttributeMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
Expand Down Expand Up @@ -1453,14 +1456,14 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
{"CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY", {"hipMemRangeAttributeAccessedBy", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES}}, // 3
// cudaMemRangeAttributeLastPrefetchLocation
{"CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION", {"hipMemRangeAttributeLastPrefetchLocation", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES}}, // 4
//
// cudaMemRangeAttributePreferredLocationType
{"CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE", {"hipMemRangeAttributePreferredLocationType", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 5
//
// cudaMemRangeAttributePreferredLocationId
{"CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID", {"hipMemRangeAttributePreferredLocationId", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 6
//
{"CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE", {"hipMemRangeAttributeLastPreferredLocationType", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 7
//
{"CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID", {"hipMemRangeAttributeLastPreferredLocationId", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 8
// cudaMemRangeAttributeLastPrefetchLocationType
{"CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE", {"hipMemRangeAttributeLastPrefetchLocationType", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 7
// cudaMemRangeAttributeLastPrefetchLocationId
{"CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID", {"hipMemRangeAttributeLastPrefetchLocationId", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 8

// no analogue
{"CUoccupancy_flags", {"hipOccupancyFlags", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
Expand Down
Loading

0 comments on commit d18ffb6

Please sign in to comment.