Skip to content

Commit

Permalink
[HIPIFY] Sync with CUDA 12.3.0 - Step 2 - Driver 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 2, 2023
1 parent daecafd commit 82cb2e5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -8624,6 +8624,7 @@ sub warnUnsupportedFunctions {
"CU_MEM_LOCATION_TYPE_HOST_NUMA",
"CU_MEM_LOCATION_TYPE_HOST",
"CU_MEM_HANDLE_TYPE_MAX",
"CU_MEM_HANDLE_TYPE_FABRIC",
"CU_MEM_CREATE_USAGE_TILE_POOL",
"CU_MEM_ACCESS_FLAGS_PROT_MAX",
"CU_LIMIT_PERSISTING_L2_CACHE_SIZE",
Expand All @@ -8646,6 +8647,7 @@ sub warnUnsupportedFunctions {
"CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP",
"CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN",
"CU_LAUNCH_ATTRIBUTE_MAX",
"CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT",
"CU_LAUNCH_ATTRIBUTE_IGNORE",
"CU_LAUNCH_ATTRIBUTE_COOPERATIVE",
"CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE",
Expand Down Expand Up @@ -8685,6 +8687,7 @@ sub warnUnsupportedFunctions {
"CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS",
"CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS",
"CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO",
"CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS",
"CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS",
"CU_GRAPH_COND_TYPE_WHILE",
"CU_GRAPH_COND_TYPE_IF",
Expand Down Expand Up @@ -9667,6 +9670,7 @@ sub warnUnsupportedFunctions {
"CUDA_ERROR_MPS_CONNECTION_FAILED",
"CUDA_ERROR_MPS_CLIENT_TERMINATED",
"CUDA_ERROR_MISALIGNED_ADDRESS",
"CUDA_ERROR_LOSSY_QUERY",
"CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING",
"CUDA_ERROR_JIT_COMPILER_NOT_FOUND",
"CUDA_ERROR_JIT_COMPILATION_DISABLED",
Expand Down
4 changes: 4 additions & 0 deletions docs/tables/CUDA_Driver_API_functions_supported_by_HIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
|`CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`| | | | | | | | | | |
|`CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`| | | | |`hipErrorLaunchOutOfResources`|1.6.0| | | | |
|`CUDA_ERROR_LAUNCH_TIMEOUT`| | | | |`hipErrorLaunchTimeOut`|1.6.0| | | | |
|`CUDA_ERROR_LOSSY_QUERY`| | | | | | | | | | |
|`CUDA_ERROR_MAP_FAILED`| | | | |`hipErrorMapFailed`|1.6.0| | | | |
|`CUDA_ERROR_MISALIGNED_ADDRESS`| | | | | | | | | | |
|`CUDA_ERROR_MPS_CLIENT_TERMINATED`|11.8| | | | | | | | | |
Expand Down Expand Up @@ -652,6 +653,7 @@
|`CU_GRAPH_COND_TYPE_IF`|12.3| | | | | | | | | |
|`CU_GRAPH_COND_TYPE_WHILE`|12.3| | | | | | | | | |
|`CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS`|11.7| | | | | | | | | |
|`CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS`|12.3| | | | | | | | | |
|`CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS`|11.3| | | |`hipGraphDebugDotFlagsEventNodeParams`|5.5.0| | | | |
|`CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO`|12.0| | | | | | | | | |
|`CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS`|11.3| | | |`hipGraphDebugDotFlagsExtSemasSignalNodeParams`|5.5.0| | | | |
Expand Down Expand Up @@ -757,6 +759,7 @@
|`CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE`|11.8| | | | | | | | | |
|`CU_LAUNCH_ATTRIBUTE_COOPERATIVE`|11.8| | | | | | | | | |
|`CU_LAUNCH_ATTRIBUTE_IGNORE`|11.8| | | | | | | | | |
|`CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT`|12.3| | | | | | | | | |
|`CU_LAUNCH_ATTRIBUTE_MAX`|12.1| | | | | | | | | |
|`CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN`|12.0| | | | | | | | | |
|`CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP`|12.0| | | | | | | | | |
Expand Down Expand Up @@ -821,6 +824,7 @@
|`CU_MEM_ATTACH_HOST`| | | | |`hipMemAttachHost`|2.5.0| | | | |
|`CU_MEM_ATTACH_SINGLE`| | | | |`hipMemAttachSingle`|3.7.0| | | | |
|`CU_MEM_CREATE_USAGE_TILE_POOL`|11.1| | | | | | | | | |
|`CU_MEM_HANDLE_TYPE_FABRIC`|12.3| | | | | | | | | |
|`CU_MEM_HANDLE_TYPE_GENERIC`|11.1| | | |`hipMemHandleTypeGeneric`|5.2.0| | | | |
|`CU_MEM_HANDLE_TYPE_MAX`|10.2| | | | | | | | | |
|`CU_MEM_HANDLE_TYPE_NONE`|11.2| | | |`hipMemHandleTypeNone`|5.2.0| | | | |
Expand Down
14 changes: 13 additions & 1 deletion src/CUDA2HIP_Driver_API_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
{"CUDA_ERROR_INVALID_HANDLE", {"hipErrorInvalidHandle", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES}}, // 400
// cudaErrorIllegalState
{"CUDA_ERROR_ILLEGAL_STATE", {"hipErrorIllegalState", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES}}, // 401
//
{"CUDA_ERROR_LOSSY_QUERY", {"hipErrorIllegalState", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 402
// cudaErrorSymbolNotFound
{"CUDA_ERROR_NOT_FOUND", {"hipErrorNotFound", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES}}, // 500
// cudaErrorNotReady
Expand Down Expand Up @@ -1999,6 +2001,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
{"CU_MEM_HANDLE_TYPE_WIN32", {"hipMemHandleTypeWin32", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES}}, // 0x2
// cudaMemHandleTypeWin32Kmt
{"CU_MEM_HANDLE_TYPE_WIN32_KMT", {"hipMemHandleTypeWin32Kmt", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES}}, // 0x4
//
{"CU_MEM_HANDLE_TYPE_FABRIC", {"hipMemHandleTypeFabric", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 0x8
// no analogue
{"CU_MEM_HANDLE_TYPE_MAX", {"hipMemHandleTypeMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 0x7FFFFFFF

Expand Down Expand Up @@ -2260,7 +2264,9 @@ 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<<13
{"CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO", {"hipGraphDebugDotFlagsExtraTopoInfo", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 1<<14
//
{"CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS", {"hipGraphDebugDotFlagsConditionalNodeParams", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 1<<15

// cudaUserObjectFlags
{"CUuserObject_flags", {"hipUserObjectFlags", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES}},
Expand Down Expand Up @@ -2407,6 +2413,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_TYPE_NAME_MAP {
// cudaLaunchAttributeMemSyncDomain
{"CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN", {"hipLaunchAttributeMemSyncDomain", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}},
//
{"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}},

// cudaGraphInstantiateResult
Expand Down Expand Up @@ -3600,6 +3608,10 @@ const std::map<llvm::StringRef, cudaAPIversions> CUDA_DRIVER_TYPE_NAME_VER_MAP {
{"CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER", {CUDA_123, CUDA_0, CUDA_0 }},
{"CUgraphEdgeData_st", {CUDA_123, CUDA_0, CUDA_0 }},
{"CUgraphEdgeData", {CUDA_123, CUDA_0, CUDA_0 }},
{"CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT", {CUDA_123, CUDA_0, CUDA_0 }},
{"CUDA_ERROR_ILLEGAL_STATE", {CUDA_123, CUDA_0, CUDA_0 }},
{"CU_MEM_HANDLE_TYPE_FABRIC", {CUDA_123, CUDA_0, CUDA_0 }},
{"CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS", {CUDA_123, CUDA_0, CUDA_0 }},
};

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

0 comments on commit 82cb2e5

Please sign in to comment.