Skip to content

Commit

Permalink
[HIPIFY] Sync with CUDA 12.3.0 - Step 5 - Runtime API data types
Browse files Browse the repository at this point in the history
+ Updated the regenerated `hipify-perl` and `CUDA2HIP` docs accordingly
  • Loading branch information
emankov committed Dec 28, 2023
1 parent b990189 commit 9b8007b
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 13 deletions.
11 changes: 11 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -8420,6 +8420,7 @@ sub warnUnsupportedFunctions {
"cudaLaunchAttributePriority",
"cudaLaunchAttributeMemSyncDomainMap",
"cudaLaunchAttributeMemSyncDomain",
"cudaLaunchAttributeLaunchCompletionEvent",
"cudaLaunchAttributeIgnore",
"cudaLaunchAttributeID",
"cudaLaunchAttributeCooperative",
Expand Down Expand Up @@ -8460,6 +8461,9 @@ sub warnUnsupportedFunctions {
"cudaGraphicsCubeFace",
"cudaGraphNodeSetParams",
"cudaGraphNodeParams",
"cudaGraphKernelNodePortProgrammatic",
"cudaGraphKernelNodePortLaunchCompletion",
"cudaGraphKernelNodePortDefault",
"cudaGraphInstantiateWithParams",
"cudaGraphInstantiateSuccess",
"cudaGraphInstantiateResult",
Expand All @@ -8474,6 +8478,13 @@ sub warnUnsupportedFunctions {
"cudaGraphExecUpdateErrorAttributesChanged",
"cudaGraphExecNodeSetParams",
"cudaGraphExecGetFlags",
"cudaGraphEdgeData_st",
"cudaGraphEdgeData",
"cudaGraphDependencyType_enum",
"cudaGraphDependencyTypeProgrammatic",
"cudaGraphDependencyTypeDefault",
"cudaGraphDependencyType",
"cudaGraphDebugDotFlagsConditionalNodeParams",
"cudaGraphConditionalNodeType",
"cudaGraphConditionalHandleFlags",
"cudaGraphConditionalHandle",
Expand Down
11 changes: 11 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 @@ -1109,6 +1109,7 @@
|`cudaGraphConditionalHandleFlags`|12.3| | | | | | | | | |
|`cudaGraphConditionalNodeType`|12.3| | | | | | | | | |
|`cudaGraphDebugDotFlags`|11.3| | | |`hipGraphDebugDotFlags`|5.5.0| | | | |
|`cudaGraphDebugDotFlagsConditionalNodeParams`|12.3| | | | | | | | | |
|`cudaGraphDebugDotFlagsEventNodeParams`|11.3| | | |`hipGraphDebugDotFlagsEventNodeParams`|5.5.0| | | | |
|`cudaGraphDebugDotFlagsExtSemasSignalNodeParams`|11.3| | | |`hipGraphDebugDotFlagsExtSemasSignalNodeParams`|5.5.0| | | | |
|`cudaGraphDebugDotFlagsExtSemasWaitNodeParams`|11.3| | | |`hipGraphDebugDotFlagsExtSemasWaitNodeParams`|5.5.0| | | | |
Expand All @@ -1119,6 +1120,12 @@
|`cudaGraphDebugDotFlagsMemcpyNodeParams`|11.3| | | |`hipGraphDebugDotFlagsMemcpyNodeParams`|5.5.0| | | | |
|`cudaGraphDebugDotFlagsMemsetNodeParams`|11.3| | | |`hipGraphDebugDotFlagsMemsetNodeParams`|5.5.0| | | | |
|`cudaGraphDebugDotFlagsVerbose`|11.3| | | |`hipGraphDebugDotFlagsVerbose`|5.5.0| | | | |
|`cudaGraphDependencyType`|12.3| | | | | | | | | |
|`cudaGraphDependencyTypeDefault`|12.3| | | | | | | | | |
|`cudaGraphDependencyTypeProgrammatic`|12.3| | | | | | | | | |
|`cudaGraphDependencyType_enum`|12.3| | | | | | | | | |
|`cudaGraphEdgeData`|12.3| | | | | | | | | |
|`cudaGraphEdgeData_st`|12.3| | | | | | | | | |
|`cudaGraphExecUpdateError`|10.2| | | |`hipGraphExecUpdateError`|4.3.0| | | | |
|`cudaGraphExecUpdateErrorAttributesChanged`|11.6| | | | | | | | | |
|`cudaGraphExecUpdateErrorFunctionChanged`|10.2| | | |`hipGraphExecUpdateErrorFunctionChanged`|4.3.0| | | | |
Expand All @@ -1145,6 +1152,9 @@
|`cudaGraphInstantiateParams_st`|12.0| | | | | | | | | |
|`cudaGraphInstantiateResult`|12.0| | | | | | | | | |
|`cudaGraphInstantiateSuccess`|12.0| | | | | | | | | |
|`cudaGraphKernelNodePortDefault`|12.3| | | | | | | | | |
|`cudaGraphKernelNodePortLaunchCompletion`|12.3| | | | | | | | | |
|`cudaGraphKernelNodePortProgrammatic`|12.3| | | | | | | | | |
|`cudaGraphMemAttrReservedMemCurrent`|11.4| | | |`hipGraphMemAttrReservedMemCurrent`|5.3.0| | | | |
|`cudaGraphMemAttrReservedMemHigh`|11.4| | | |`hipGraphMemAttrReservedMemHigh`|5.3.0| | | | |
|`cudaGraphMemAttrUsedMemCurrent`|11.4| | | |`hipGraphMemAttrUsedMemCurrent`|5.3.0| | | | |
Expand Down Expand Up @@ -1227,6 +1237,7 @@
|`cudaLaunchAttributeCooperative`|11.8| | | | | | | | | |
|`cudaLaunchAttributeID`|11.8| | | | | | | | | |
|`cudaLaunchAttributeIgnore`|11.8| | | | | | | | | |
|`cudaLaunchAttributeLaunchCompletionEvent`|12.3| | | | | | | | | |
|`cudaLaunchAttributeMemSyncDomain`|12.0| | | | | | | | | |
|`cudaLaunchAttributeMemSyncDomainMap`|12.0| | | | | | | | | |
|`cudaLaunchAttributePriority`|11.8| | | | | | | | | |
Expand Down
27 changes: 14 additions & 13 deletions src/CUDA2HIP_Driver_API_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,9 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
// cudaConditionalNodeParams
{"CUDA_CONDITIONAL_NODE_PARAMS", {"hipConditionalNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

//
// cudaGraphEdgeData_st
{"CUgraphEdgeData_st", {"hipGraphEdgeData", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
//
// cudaGraphEdgeData
{"CUgraphEdgeData", {"hipGraphEdgeData", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

// 2. Unions
Expand Down Expand Up @@ -2265,7 +2265,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
{"CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS", {"hipGraphDebugDotFlagsBatchMemOpNodeParams", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 1<<13
//
{"CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO", {"hipGraphDebugDotFlagsExtraTopoInfo", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 1<<14
//
// cudaGraphDebugDotFlagsConditionalNodeParams
{"CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS", {"hipGraphDebugDotFlagsConditionalNodeParams", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 1<<15

// cudaUserObjectFlags
Expand Down Expand Up @@ -2412,7 +2412,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
{"CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP", {"hipLaunchAttributeMemSyncDomainMap", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// cudaLaunchAttributeMemSyncDomain
{"CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN", {"hipLaunchAttributeMemSyncDomain", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
//
// cudaLaunchAttributeLaunchCompletionEvent
{"CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT", {"hipLaunchAttributeLaunchCompletionEvent", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
//
{"CU_LAUNCH_ATTRIBUTE_MAX", {"hipLaunchAttributeMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
Expand Down Expand Up @@ -2585,13 +2585,14 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
// cudaGraphCondTypeWhile
{"CU_GRAPH_COND_TYPE_WHILE", {"hipGraphCondTypeWhile", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

//
// cudaGraphDependencyType
{"CUgraphDependencyType", {"hipGraphDependencyType", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// cudaGraphDependencyType_enum
{"CUgraphDependencyType_enum", {"hipGraphDependencyType", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// CUgraphDependencyType enum values
//
// cudaGraphDependencyTypeDefault
{"CU_GRAPH_DEPENDENCY_TYPE_DEFAULT", {"hipGraphDependencyTypeDefault", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
//
// cudaGraphDependencyTypeProgrammatic
{"CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC", {"hipGraphDependencyTypeProgrammatic", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

// 4. Typedefs
Expand Down Expand Up @@ -2725,12 +2726,12 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
{"CU_TENSOR_MAP_NUM_QWORDS", {"HIP_TENSOR_MAP_NUM_QWORDS", "", CONV_DEFINE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 16
//
{"CU_GRAPH_COND_ASSIGN_DEFAULT", {"HIP_GRAPH_COND_ASSIGN_DEFAULT", "", CONV_DEFINE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 0x1
//
{"CU_GRAPH_KERNEL_NODE_PORT_DEFAULT", {"HIP_GRAPH_KERNEL_NODE_PORT_DEFAULT", "", CONV_DEFINE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 0
//
{"CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC", {"HIP_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC", "", CONV_DEFINE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 1
//
{"CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER", {"HIP_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER", "", CONV_DEFINE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 2
// cudaGraphKernelNodePortDefault
{"CU_GRAPH_KERNEL_NODE_PORT_DEFAULT", {"hipGraphKernelNodePortDefault", "", CONV_DEFINE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 0
// cudaGraphKernelNodePortProgrammatic
{"CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC", {"hipGraphKernelNodePortProgrammatic", "", CONV_DEFINE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 1
// cudaGraphKernelNodePortLaunchCompletion
{"CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER", {"hipGraphKernelNodePortLaunchCompletion", "", CONV_DEFINE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 2
};

const std::map<llvm::StringRef, cudaAPIversions> CUDA_DRIVER_TYPE_NAME_VER_MAP {
Expand Down
36 changes: 36 additions & 0 deletions src/CUDA2HIP_Runtime_API_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_TYPE_NAME_MAP {
// CUDA_CONDITIONAL_NODE_PARAMS
{"cudaConditionalNodeParams", {"hipConditionalNodeParams", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

// CUgraphEdgeData_st
{"cudaGraphEdgeData_st", {"hipGraphEdgeData", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// CUgraphEdgeData
{"cudaGraphEdgeData", {"hipGraphEdgeData", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

// 2. Unions

// CUstreamAttrValue
Expand Down Expand Up @@ -1793,6 +1798,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_TYPE_NAME_MAP {
{"cudaGraphDebugDotFlagsKernelNodeAttributes", {"hipGraphDebugDotFlagsKernelNodeAttributes", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES}}, // 1<<9
// CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES
{"cudaGraphDebugDotFlagsHandles", {"hipGraphDebugDotFlagsHandles", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES}}, // 1<<10
// CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS
{"cudaGraphDebugDotFlagsConditionalNodeParams", {"hipGraphDebugDotFlagsConditionalNodeParams", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 1<<15

// CUgraphMem_attribute
{"cudaGraphMemAttributeType", {"hipGraphMemAttributeType", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES}},
Expand Down Expand Up @@ -1853,6 +1860,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_TYPE_NAME_MAP {
{"cudaLaunchAttributeMemSyncDomainMap", {"hipLaunchAttributeMemSyncDomainMap", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN
{"cudaLaunchAttributeMemSyncDomain", {"hipLaunchAttributeMemSyncDomain", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT
{"cudaLaunchAttributeLaunchCompletionEvent", {"hipLaunchAttributeLaunchCompletionEvent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

// CUgraphInstantiateResult
{"cudaGraphInstantiateResult", {"hipGraphInstantiateResult", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
Expand Down Expand Up @@ -1905,6 +1914,16 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_TYPE_NAME_MAP {
// CU_GRAPH_COND_TYPE_WHILE
{"cudaGraphCondTypeWhile", {"hipGraphCondTypeWhile", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

// CUgraphDependencyType
{"cudaGraphDependencyType", {"hipGraphDependencyType", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// CUgraphDependencyType_enum
{"cudaGraphDependencyType_enum", {"hipGraphDependencyType", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// CUgraphDependencyType enum values
// CU_GRAPH_DEPENDENCY_TYPE_DEFAULT
{"cudaGraphDependencyTypeDefault", {"hipGraphDependencyTypeDefault", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
// CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC
{"cudaGraphDependencyTypeProgrammatic", {"hipGraphDependencyTypeProgrammatic", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}},

// 4. Typedefs

// CUhostFn
Expand Down Expand Up @@ -2087,6 +2106,12 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_TYPE_NAME_MAP {
{"cudaStreamAttributeMemSyncDomainMap", {"hipStreamAttributeMemSyncDomainMap", "", CONV_DEFINE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // cudaLaunchAttributeMemSyncDomainMap
// CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN
{"cudaStreamAttributeMemSyncDomain", {"hipStreamAttributeMemSyncDomain", "", CONV_DEFINE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // cudaLaunchAttributeMemSyncDomain
// CU_GRAPH_KERNEL_NODE_PORT_DEFAULT
{"cudaGraphKernelNodePortDefault", {"hipGraphKernelNodePortDefault", "", CONV_DEFINE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 0
// CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC
{"cudaGraphKernelNodePortProgrammatic", {"hipGraphKernelNodePortProgrammatic", "", CONV_DEFINE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 1
// CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER
{"cudaGraphKernelNodePortLaunchCompletion", {"hipGraphKernelNodePortLaunchCompletion", "", CONV_DEFINE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 2
};

const std::map<llvm::StringRef, cudaAPIversions> CUDA_RUNTIME_TYPE_NAME_VER_MAP {
Expand Down Expand Up @@ -2634,6 +2659,17 @@ const std::map<llvm::StringRef, cudaAPIversions> CUDA_RUNTIME_TYPE_NAME_VER_MAP
{"cudaGraphCondTypeWhile", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaConditionalNodeParams", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphNodeTypeConditional", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphDependencyType", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphDependencyType_enum", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphDependencyTypeDefault", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphDependencyTypeProgrammatic", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphEdgeData_st", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphEdgeData", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphKernelNodePortDefault", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphKernelNodePortProgrammatic", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphKernelNodePortLaunchCompletion", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaGraphDebugDotFlagsConditionalNodeParams", {CUDA_123, CUDA_0, CUDA_0 }},
{"cudaLaunchAttributeLaunchCompletionEvent", {CUDA_123, CUDA_0, CUDA_0 }},
};

const std::map<llvm::StringRef, hipAPIversions> HIP_RUNTIME_TYPE_NAME_VER_MAP {
Expand Down

0 comments on commit 9b8007b

Please sign in to comment.