From 3ba72e8accbaeb4ba8a04c923b612224bed98650 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Tue, 10 Oct 2023 21:22:01 +0200 Subject: [PATCH] [HIPIFY][6.0.0] Support for ROCm HIP 6.0.0 - Step 1 - Data types + Updated synthetic tests, the regenerated hipify-perl, and docs --- bin/hipify-perl | 51 ++++++++++++------- ...A_Driver_API_functions_supported_by_HIP.md | 22 ++++---- ..._Runtime_API_functions_supported_by_HIP.md | 10 ++-- src/CUDA2HIP_Driver_API_types.cpp | 25 +++++---- src/CUDA2HIP_Runtime_API_types.cpp | 10 ++-- src/Statistics.cpp | 1 + src/Statistics.h | 3 +- tests/unit_tests/synthetic/driver_enums.cu | 5 +- tests/unit_tests/synthetic/driver_structs.cu | 26 ++++++++++ tests/unit_tests/synthetic/runtime_enums.cu | 3 ++ tests/unit_tests/synthetic/runtime_structs.cu | 14 +++++ 11 files changed, 116 insertions(+), 54 deletions(-) diff --git a/bin/hipify-perl b/bin/hipify-perl index 840e6e44..703d0e51 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1076,7 +1076,22 @@ my %removed_funcs = ( ); my %experimental_funcs = ( - + "cudaExternalSemaphoreWaitNodeParamsV2" => "6.0.0", + "cudaExternalSemaphoreWaitNodeParams" => "6.0.0", + "cudaExternalSemaphoreSignalNodeParamsV2" => "6.0.0", + "cudaExternalSemaphoreSignalNodeParams" => "6.0.0", + "cudaDevAttrHostRegisterSupported" => "6.0.0", + "CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED" => "6.0.0", + "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st" => "6.0.0", + "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2" => "6.0.0", + "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1" => "6.0.0", + "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st" => "6.0.0", + "CUDA_EXT_SEM_WAIT_NODE_PARAMS" => "6.0.0", + "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st" => "6.0.0", + "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2" => "6.0.0", + "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1" => "6.0.0", + "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st" => "6.0.0", + "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS" => "6.0.0" ); $print_stats = 1 if $examine; @@ -1214,6 +1229,22 @@ sub subst { } sub experimentalSubstitutions { + subst("CUDA_EXT_SEM_SIGNAL_NODE_PARAMS", "hipExternalSemaphoreSignalNodeParams", "type"); + subst("CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st", "hipExternalSemaphoreSignalNodeParams", "type"); + subst("CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1", "hipExternalSemaphoreSignalNodeParams", "type"); + subst("CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2", "hipExternalSemaphoreSignalNodeParams", "type"); + subst("CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st", "hipExternalSemaphoreSignalNodeParams", "type"); + subst("CUDA_EXT_SEM_WAIT_NODE_PARAMS", "hipExternalSemaphoreWaitNodeParams", "type"); + subst("CUDA_EXT_SEM_WAIT_NODE_PARAMS_st", "hipExternalSemaphoreWaitNodeParams", "type"); + subst("CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1", "hipExternalSemaphoreWaitNodeParams", "type"); + subst("CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2", "hipExternalSemaphoreWaitNodeParams", "type"); + subst("CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st", "hipExternalSemaphoreWaitNodeParams", "type"); + subst("cudaExternalSemaphoreSignalNodeParams", "hipExternalSemaphoreSignalNodeParams", "type"); + subst("cudaExternalSemaphoreSignalNodeParamsV2", "hipExternalSemaphoreSignalNodeParams", "type"); + subst("cudaExternalSemaphoreWaitNodeParams", "hipExternalSemaphoreWaitNodeParams", "type"); + subst("cudaExternalSemaphoreWaitNodeParamsV2", "hipExternalSemaphoreWaitNodeParams", "type"); + subst("CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED", "hipDeviceAttributeHostRegisterSupported", "numeric_literal"); + subst("cudaDevAttrHostRegisterSupported", "hipDeviceAttributeHostRegisterSupported", "numeric_literal"); } sub rocSubstitutions { @@ -7355,11 +7386,7 @@ sub warnUnsupportedFunctions { "cudaFlushGPUDirectRDMAWritesOptionMemOps", "cudaFlushGPUDirectRDMAWritesOptionHost", "cudaExternalSemaphoreWaitSkipNvSciBufMemSync", - "cudaExternalSemaphoreWaitNodeParamsV2", - "cudaExternalSemaphoreWaitNodeParams", "cudaExternalSemaphoreSignalSkipNvSciBufMemSync", - "cudaExternalSemaphoreSignalNodeParamsV2", - "cudaExternalSemaphoreSignalNodeParams", "cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32", "cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd", "cudaExternalSemaphoreHandleTypeNvSciSync", @@ -7571,7 +7598,6 @@ sub warnUnsupportedFunctions { "cudaDevAttrMaxAccessPolicyWindowSize", "cudaDevAttrMax", "cudaDevAttrIpcEventSupport", - "cudaDevAttrHostRegisterSupported", "cudaDevAttrHostRegisterReadOnlySupported", "cudaDevAttrHostNumaId", "cudaDevAttrGPUDirectRDMAWritesOrdering", @@ -8382,7 +8408,6 @@ sub warnUnsupportedFunctions { "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS", "CU_DEVICE_ATTRIBUTE_MAX", "CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED", - "CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED", "CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID", "CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED", "CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED", @@ -9142,16 +9167,6 @@ sub warnUnsupportedFunctions { "CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED", "CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE", "CUDA_GRAPH_INSTANTIATE_ERROR", - "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st", - "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2", - "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1", - "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st", - "CUDA_EXT_SEM_WAIT_NODE_PARAMS", - "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st", - "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2", - "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1", - "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st", - "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS", "CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC", "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC", "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1", @@ -10379,7 +10394,7 @@ if ($help) { print STDERR "$USAGE\n"; } if ($version) { - print STDERR "HIP version 5.7.0\n"; + print STDERR "HIP version 6.0.0\n"; } while (@ARGV) { $fileName=shift (@ARGV); diff --git a/docs/tables/CUDA_Driver_API_functions_supported_by_HIP.md b/docs/tables/CUDA_Driver_API_functions_supported_by_HIP.md index dca42564..98b87720 100644 --- a/docs/tables/CUDA_Driver_API_functions_supported_by_HIP.md +++ b/docs/tables/CUDA_Driver_API_functions_supported_by_HIP.md @@ -155,16 +155,16 @@ |`CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st`|10.0| | |`hipExternalSemaphoreWaitParams_st`|4.4.0| | | | |`CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1`|11.3| | |`hipExternalSemaphoreWaitParams`|4.4.0| | | | |`CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC`|10.2| | | | | | | | -|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS`|11.2| | | | | | | | -|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st`|11.2| | | | | | | | -|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1`|11.3| | | | | | | | -|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2`|12.2| | | | | | | | -|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st`|12.2| | | | | | | | -|`CUDA_EXT_SEM_WAIT_NODE_PARAMS`|11.2| | | | | | | | -|`CUDA_EXT_SEM_WAIT_NODE_PARAMS_st`|11.2| | | | | | | | -|`CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1`|11.3| | | | | | | | -|`CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2`|12.2| | | | | | | | -|`CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st`|12.2| | | | | | | | +|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS`|11.2| | |`hipExternalSemaphoreSignalNodeParams`|6.0.0| | |6.0.0| +|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st`|11.2| | |`hipExternalSemaphoreSignalNodeParams`|6.0.0| | |6.0.0| +|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1`|11.3| | |`hipExternalSemaphoreSignalNodeParams`|6.0.0| | |6.0.0| +|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2`|12.2| | |`hipExternalSemaphoreSignalNodeParams`|6.0.0| | |6.0.0| +|`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st`|12.2| | |`hipExternalSemaphoreSignalNodeParams`|6.0.0| | |6.0.0| +|`CUDA_EXT_SEM_WAIT_NODE_PARAMS`|11.2| | |`hipExternalSemaphoreWaitNodeParams`|6.0.0| | |6.0.0| +|`CUDA_EXT_SEM_WAIT_NODE_PARAMS_st`|11.2| | |`hipExternalSemaphoreWaitNodeParams`|6.0.0| | |6.0.0| +|`CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1`|11.3| | |`hipExternalSemaphoreWaitNodeParams`|6.0.0| | |6.0.0| +|`CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2`|12.2| | |`hipExternalSemaphoreWaitNodeParams`|6.0.0| | |6.0.0| +|`CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st`|12.2| | |`hipExternalSemaphoreWaitNodeParams`|6.0.0| | |6.0.0| |`CUDA_GRAPH_INSTANTIATE_ERROR`|12.0| | | | | | | | |`CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`|11.4| | |`hipGraphInstantiateFlagAutoFreeOnLaunch`|5.2.0| | | | |`CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH`|12.0| | |`hipGraphInstantiateFlagDeviceLaunch`|5.6.0| | | | @@ -375,7 +375,7 @@ |`CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED`|10.2| | | | | | | | |`CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED`|8.0| | |`hipDeviceAttributeHostNativeAtomicSupported`|4.3.0| | | | |`CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID`|12.2| | | | | | | | -|`CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED`|9.2| | | | | | | | +|`CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED`|9.2| | |`hipDeviceAttributeHostRegisterSupported`|6.0.0| | |6.0.0| |`CU_DEVICE_ATTRIBUTE_INTEGRATED`| | | |`hipDeviceAttributeIntegrated`|1.9.0| | | | |`CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED`|12.0| | | | | | | | |`CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT`| | | |`hipDeviceAttributeKernelExecTimeout`|2.10.0| | | | diff --git a/docs/tables/CUDA_Runtime_API_functions_supported_by_HIP.md b/docs/tables/CUDA_Runtime_API_functions_supported_by_HIP.md index 4f8a4eb3..18ffa507 100644 --- a/docs/tables/CUDA_Runtime_API_functions_supported_by_HIP.md +++ b/docs/tables/CUDA_Runtime_API_functions_supported_by_HIP.md @@ -665,7 +665,7 @@ |`cudaDevAttrHostNativeAtomicSupported`|8.0| | |`hipDeviceAttributeHostNativeAtomicSupported`|4.3.0| | | | |`cudaDevAttrHostNumaId`|12.2| | | | | | | | |`cudaDevAttrHostRegisterReadOnlySupported`|11.1| | | | | | | | -|`cudaDevAttrHostRegisterSupported`|9.2| | | | | | | | +|`cudaDevAttrHostRegisterSupported`|9.2| | |`hipDeviceAttributeHostRegisterSupported`|6.0.0| | |6.0.0| |`cudaDevAttrIntegrated`| | | |`hipDeviceAttributeIntegrated`|1.9.0| | | | |`cudaDevAttrIpcEventSupport`|12.0| | | | | | | | |`cudaDevAttrIsMultiGpuBoard`| | | |`hipDeviceAttributeIsMultiGpuBoard`|1.6.0| | | | @@ -1046,13 +1046,13 @@ |`cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt`|10.0| | |`hipExternalSemaphoreHandleTypeOpaqueWin32Kmt`|4.4.0| | | | |`cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd`|11.2| | | | | | | | |`cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32`|11.2| | | | | | | | -|`cudaExternalSemaphoreSignalNodeParams`|11.2| | | | | | | | -|`cudaExternalSemaphoreSignalNodeParamsV2`|12.2| | | | | | | | +|`cudaExternalSemaphoreSignalNodeParams`|11.2| | |`hipExternalSemaphoreSignalNodeParams`|6.0.0| | |6.0.0| +|`cudaExternalSemaphoreSignalNodeParamsV2`|12.2| | |`hipExternalSemaphoreSignalNodeParams`|6.0.0| | |6.0.0| |`cudaExternalSemaphoreSignalParams`|10.0| | |`hipExternalSemaphoreSignalParams`|4.4.0| | | | |`cudaExternalSemaphoreSignalParams_v1`|11.2| | |`hipExternalSemaphoreSignalParams`|4.4.0| | | | |`cudaExternalSemaphoreSignalSkipNvSciBufMemSync`|10.2| | | | | | | | -|`cudaExternalSemaphoreWaitNodeParams`|11.2| | | | | | | | -|`cudaExternalSemaphoreWaitNodeParamsV2`|12.2| | | | | | | | +|`cudaExternalSemaphoreWaitNodeParams`|11.2| | |`hipExternalSemaphoreWaitNodeParams`|6.0.0| | |6.0.0| +|`cudaExternalSemaphoreWaitNodeParamsV2`|12.2| | |`hipExternalSemaphoreWaitNodeParams`|6.0.0| | |6.0.0| |`cudaExternalSemaphoreWaitParams`|10.0| | |`hipExternalSemaphoreWaitParams`|4.4.0| | | | |`cudaExternalSemaphoreWaitParams_v1`|11.2| | |`hipExternalSemaphoreWaitParams`|4.4.0| | | | |`cudaExternalSemaphoreWaitSkipNvSciBufMemSync`|10.2| | | | | | | | diff --git a/src/CUDA2HIP_Driver_API_types.cpp b/src/CUDA2HIP_Driver_API_types.cpp index 15e8748f..217aea4d 100644 --- a/src/CUDA2HIP_Driver_API_types.cpp +++ b/src/CUDA2HIP_Driver_API_types.cpp @@ -278,20 +278,20 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CUmemoryPool", {"hipMemPool_t", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES}}, // cudaExternalSemaphoreSignalNodeParams - {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, - {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, - {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, + {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, + {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, + {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // cudaExternalSemaphoreSignalNodeParamsV2 - {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st", {"hipExternalSemaphoreSignalNodeParams_v2", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, - {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2", {"hipExternalSemaphoreSignalNodeParams_v2", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, + {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, + {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // cudaExternalSemaphoreWaitNodeParams - {"CUDA_EXT_SEM_WAIT_NODE_PARAMS_st", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, - {"CUDA_EXT_SEM_WAIT_NODE_PARAMS", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, - {"CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, + {"CUDA_EXT_SEM_WAIT_NODE_PARAMS_st", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, + {"CUDA_EXT_SEM_WAIT_NODE_PARAMS", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, + {"CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // cudaExternalSemaphoreWaitNodeParamsV2 - {"CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st", {"hipExternalSemaphoreWaitNodeParams_v2", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, - {"CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2", {"hipExternalSemaphoreWaitNodeParams_v2", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, + {"CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, + {"CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // cudaMemPoolProps {"CUmemPoolProps_st", {"hipMemPoolProps", "", CONV_TYPE, API_DRIVER, SEC::DATA_TYPES}}, @@ -814,7 +814,7 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { // cudaDevAttrCanFlushRemoteWrites {"CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES", {"hipDeviceAttributeCanFlushRemoteWrites", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 98 // cudaDevAttrHostRegisterSupported - {"CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED", {"hipDeviceAttributeHostRegisterSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 99 + {"CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED", {"hipDeviceAttributeHostRegisterSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // 99 // cudaDevAttrPageableMemoryAccessUsesHostPageTables {"CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES", {"hipDeviceAttributePageableMemoryAccessUsesHostPageTables", "", CONV_NUMERIC_LITERAL, API_DRIVER, SEC::DATA_TYPES}}, // 100 // cudaDevAttrDirectManagedMemAccessFromHost @@ -3967,4 +3967,7 @@ const std::map HIP_DRIVER_TYPE_NAME_VER_MAP { {"hiprtcLinkState", {HIP_5030, HIP_0, HIP_0 }}, {"hipFunctionLaunchParams_t", {HIP_5050, HIP_0, HIP_0 }}, {"hipFunctionLaunchParams", {HIP_5050, HIP_0, HIP_0 }}, + {"hipDeviceAttributeHostRegisterSupported", {HIP_6000, HIP_0, HIP_0, HIP_LATEST}}, + {"hipExternalSemaphoreSignalNodeParams", {HIP_6000, HIP_0, HIP_0, HIP_LATEST}}, + {"hipExternalSemaphoreWaitNodeParams", {HIP_6000, HIP_0, HIP_0, HIP_LATEST}}, }; diff --git a/src/CUDA2HIP_Runtime_API_types.cpp b/src/CUDA2HIP_Runtime_API_types.cpp index 9428a1eb..a8bd0051 100644 --- a/src/CUDA2HIP_Runtime_API_types.cpp +++ b/src/CUDA2HIP_Runtime_API_types.cpp @@ -215,14 +215,14 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaMemPoolPtrExportData", {"hipMemPoolPtrExportData", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES}}, // CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st - {"cudaExternalSemaphoreSignalNodeParams", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, + {"cudaExternalSemaphoreSignalNodeParams", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st - {"cudaExternalSemaphoreSignalNodeParamsV2", {"hipExternalSemaphoreSignalNodeParams_v2", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, + {"cudaExternalSemaphoreSignalNodeParamsV2", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // CUDA_EXT_SEM_WAIT_NODE_PARAMS_st - {"cudaExternalSemaphoreWaitNodeParams", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, + {"cudaExternalSemaphoreWaitNodeParams", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st - {"cudaExternalSemaphoreWaitNodeParamsV2", {"hipExternalSemaphoreWaitNodeParams_v2", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, + {"cudaExternalSemaphoreWaitNodeParamsV2", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // CUDA_MEM_ALLOC_NODE_PARAMS_st {"cudaMemAllocNodeParams", {"hipMemAllocNodeParams", "", CONV_TYPE, API_RUNTIME, SEC::DATA_TYPES}}, @@ -580,7 +580,7 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { // CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES {"cudaDevAttrCanFlushRemoteWrites", {"hipDeviceAttributeCanFlushRemoteWrites", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 98 // CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED - {"cudaDevAttrHostRegisterSupported", {"hipDeviceAttributeHostRegisterSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_UNSUPPORTED}}, // 99 + {"cudaDevAttrHostRegisterSupported", {"hipDeviceAttributeHostRegisterSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES, HIP_EXPERIMENTAL}}, // 99 // CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES {"cudaDevAttrPageableMemoryAccessUsesHostPageTables", {"hipDeviceAttributePageableMemoryAccessUsesHostPageTables", "", CONV_NUMERIC_LITERAL, API_RUNTIME, SEC::DATA_TYPES}}, // 100 // CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST diff --git a/src/Statistics.cpp b/src/Statistics.cpp index c1d30a5b..5b357c01 100644 --- a/src/Statistics.cpp +++ b/src/Statistics.cpp @@ -598,6 +598,7 @@ std::string Statistics::getHipVersion(const hipVersions& ver) { case HIP_5050: return "5.5.0"; case HIP_5060: return "5.6.0"; case HIP_5070: return "5.7.0"; + case HIP_6000: return "6.0.0"; } return ""; } diff --git a/src/Statistics.h b/src/Statistics.h index f1e6524f..b322a601 100644 --- a/src/Statistics.h +++ b/src/Statistics.h @@ -350,7 +350,8 @@ enum hipVersions { HIP_5050 = 5050, HIP_5060 = 5060, HIP_5070 = 5070, - HIP_LATEST = HIP_5070, + HIP_6000 = 6000, + HIP_LATEST = HIP_6000, }; struct cudaAPIversions { diff --git a/tests/unit_tests/synthetic/driver_enums.cu b/tests/unit_tests/synthetic/driver_enums.cu index 73fc6783..5c7ffc9c 100644 --- a/tests/unit_tests/synthetic/driver_enums.cu +++ b/tests/unit_tests/synthetic/driver_enums.cu @@ -715,11 +715,10 @@ int main() { #if CUDA_VERSION >= 9020 // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = hipDeviceAttributePageableMemoryAccessUsesHostPageTables; // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = hipDeviceAttributeDirectManagedMemAccessFromHost; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = hipDeviceAttributeHostRegisterSupported; CUdevice_attribute DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES; CUdevice_attribute DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST; - - // CHECK: hipPointer_attribute POINTER_ATTRIBUTE_DEVICE_ORDINAL = HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL; - CUpointer_attribute POINTER_ATTRIBUTE_DEVICE_ORDINAL = CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL; + CUdevice_attribute DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED; #endif #if CUDA_VERSION >= 10000 diff --git a/tests/unit_tests/synthetic/driver_structs.cu b/tests/unit_tests/synthetic/driver_structs.cu index 16f7f1c6..08211570 100644 --- a/tests/unit_tests/synthetic/driver_structs.cu +++ b/tests/unit_tests/synthetic/driver_structs.cu @@ -210,6 +210,16 @@ int main() { // CHECK-NEXT: hipMemPoolPtrExportData memPoolPtrExportData; CUmemPoolPtrExportData_st memPoolPtrExportData_st; CUmemPoolPtrExportData memPoolPtrExportData; + + // CHECK: hipExternalSemaphoreSignalNodeParams EXT_SEM_SIGNAL_NODE_PARAMS_st; + // CHECK-NEXT: hipExternalSemaphoreSignalNodeParams EXT_SEM_SIGNAL_NODE_PARAMS; + CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st EXT_SEM_SIGNAL_NODE_PARAMS_st; + CUDA_EXT_SEM_SIGNAL_NODE_PARAMS EXT_SEM_SIGNAL_NODE_PARAMS; + + // CHECK: hipExternalSemaphoreWaitNodeParams EXT_SEM_WAIT_NODE_PARAMS_st; + // CHECK-NEXT: hipExternalSemaphoreWaitNodeParams EXT_SEM_WAIT_NODE_PARAMS; + CUDA_EXT_SEM_WAIT_NODE_PARAMS_st EXT_SEM_WAIT_NODE_PARAMS_st; + CUDA_EXT_SEM_WAIT_NODE_PARAMS EXT_SEM_WAIT_NODE_PARAMS; #endif #if CUDA_VERSION >= 11030 @@ -280,6 +290,12 @@ int main() { // CHECK: hipFunctionLaunchParams LAUNCH_PARAMS_v1; CUDA_LAUNCH_PARAMS_v1 LAUNCH_PARAMS_v1; + + // CHECK: hipExternalSemaphoreSignalNodeParams EXT_SEM_SIGNAL_NODE_PARAMS_v1; + CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 EXT_SEM_SIGNAL_NODE_PARAMS_v1; + + // CHECK: hipExternalSemaphoreWaitNodeParams EXT_SEM_WAIT_NODE_PARAMS_v1; + CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 EXT_SEM_WAIT_NODE_PARAMS_v1; #endif #if CUDA_VERSION >= 11040 @@ -297,6 +313,16 @@ int main() { // CHECK-NEXT: hipMemAllocNodeParams MEM_ALLOC_NODE_PARAMS_v1; CUDA_MEM_ALLOC_NODE_PARAMS_v1_st MEM_ALLOC_NODE_PARAMS_v1_st; CUDA_MEM_ALLOC_NODE_PARAMS_v1 MEM_ALLOC_NODE_PARAMS_v1; + + // CHECK: hipExternalSemaphoreSignalNodeParams EXT_SEM_SIGNAL_NODE_PARAMS_v2_st; + // CHECK-NEXT: hipExternalSemaphoreSignalNodeParams EXT_SEM_SIGNAL_NODE_PARAMS_v2; + CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st EXT_SEM_SIGNAL_NODE_PARAMS_v2_st; + CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 EXT_SEM_SIGNAL_NODE_PARAMS_v2; + + // CHECK: hipExternalSemaphoreWaitNodeParams EXT_SEM_WAIT_NODE_PARAMS_v2_st; + // CHECK-NEXT: hipExternalSemaphoreWaitNodeParams EXT_SEM_WAIT_NODE_PARAMS_v2; + CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st EXT_SEM_WAIT_NODE_PARAMS_v2_st; + CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 EXT_SEM_WAIT_NODE_PARAMS_v2; #endif return 0; diff --git a/tests/unit_tests/synthetic/runtime_enums.cu b/tests/unit_tests/synthetic/runtime_enums.cu index 863309ca..d58cdd08 100644 --- a/tests/unit_tests/synthetic/runtime_enums.cu +++ b/tests/unit_tests/synthetic/runtime_enums.cu @@ -562,6 +562,9 @@ int main() { // CHECK: hipDeviceP2PAttr DevP2PAttrCudaArrayAccessSupported = hipDevP2PAttrHipArrayAccessSupported; cudaDeviceP2PAttr DevP2PAttrCudaArrayAccessSupported = cudaDevP2PAttrCudaArrayAccessSupported; + + // CHECK: hipDeviceAttribute_t DevAttrHostRegisterSupported = hipDeviceAttributeHostRegisterSupported; + cudaDeviceAttr DevAttrHostRegisterSupported = cudaDevAttrHostRegisterSupported; #endif #if CUDA_VERSION >= 10000 diff --git a/tests/unit_tests/synthetic/runtime_structs.cu b/tests/unit_tests/synthetic/runtime_structs.cu index 6baa8612..6ddecfbf 100644 --- a/tests/unit_tests/synthetic/runtime_structs.cu +++ b/tests/unit_tests/synthetic/runtime_structs.cu @@ -163,6 +163,12 @@ int main() { // CHECK: hipMemPoolProps MemPoolProps; cudaMemPoolProps MemPoolProps; + + // CHECK: hipExternalSemaphoreSignalNodeParams ExternalSemaphoreSignalNodeParams; + cudaExternalSemaphoreSignalNodeParams ExternalSemaphoreSignalNodeParams; + + // CHECK: hipExternalSemaphoreWaitNodeParams ExternalSemaphoreWaitNodeParams; + cudaExternalSemaphoreWaitNodeParams ExternalSemaphoreWaitNodeParams; #endif #if CUDA_VERSION >= 11030 @@ -183,5 +189,13 @@ int main() { surfaceReference surfaceRef; #endif +#if CUDA_VERSION >= 12020 + // CHECK: hipExternalSemaphoreSignalNodeParams ExternalSemaphoreSignalNodeParams_v2; + cudaExternalSemaphoreSignalNodeParamsV2 ExternalSemaphoreSignalNodeParams_v2; + + // CHECK: hipExternalSemaphoreWaitNodeParams ExternalSemaphoreWaitNodeParams_v2; + cudaExternalSemaphoreWaitNodeParamsV2 ExternalSemaphoreWaitNodeParams_v2; +#endif + return 0; }