From d9ff15985e03843d8ad08c709e981c024d2b08e9 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Thu, 10 Oct 2024 23:52:31 +0100 Subject: [PATCH] [HIPIFY][hipSPARSE] Sync with 6.3.0 - Step 1 --- bin/hipify-perl | 24 ++++++++++++------- docs/tables/CUSOLVER_API_supported_by_HIP.md | 14 +++++------ .../CUSOLVER_API_supported_by_HIP_and_ROC.md | 14 +++++------ src/CUDA2HIP_SOLVER_API_functions.cpp | 21 ++++++++++------ src/Statistics.cpp | 1 + src/Statistics.h | 3 ++- .../synthetic/runtime_functions_12000.cu | 2 +- 7 files changed, 47 insertions(+), 32 deletions(-) diff --git a/bin/hipify-perl b/bin/hipify-perl index bc2f7b74..a876ab2d 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1392,7 +1392,13 @@ my %removed_funcs = ( ); my %experimental_funcs = ( - + "cusolverDnXpotrs" => "6.3.0", + "cusolverDnXpotrf_bufferSize" => "6.3.0", + "cusolverDnXpotrf" => "6.3.0", + "cusolverDnXgeqrf_bufferSize" => "6.3.0", + "cusolverDnXgeqrf" => "6.3.0", + "cusolverDnSetDeterministicMode" => "6.3.0", + "cusolverDnGetDeterministicMode" => "6.3.0" ); $print_stats = 1 if $examine; @@ -1530,6 +1536,13 @@ sub subst { } sub experimentalSubstitutions { + subst("cusolverDnGetDeterministicMode", "hipsolverDnGetDeterministicMode", "library"); + subst("cusolverDnSetDeterministicMode", "hipsolverDnSetDeterministicMode", "library"); + subst("cusolverDnXgeqrf", "hipsolverDnXgeqrf", "library"); + subst("cusolverDnXgeqrf_bufferSize", "hipsolverDnXgeqrf_bufferSize", "library"); + subst("cusolverDnXpotrf", "hipsolverDnXpotrf", "library"); + subst("cusolverDnXpotrf_bufferSize", "hipsolverDnXpotrf_bufferSize", "library"); + subst("cusolverDnXpotrs", "hipsolverDnXpotrs", "library"); } sub rocSubstitutions { @@ -9387,9 +9400,6 @@ sub warnUnsupportedFunctions { "cusolverDnXsyevdx", "cusolverDnXsyevd_bufferSize", "cusolverDnXsyevd", - "cusolverDnXpotrs", - "cusolverDnXpotrf_bufferSize", - "cusolverDnXpotrf", "cusolverDnXlarft_bufferSize", "cusolverDnXlarft", "cusolverDnXgesvdr_bufferSize", @@ -9398,8 +9408,6 @@ sub warnUnsupportedFunctions { "cusolverDnXgesvdp", "cusolverDnXgesvd_bufferSize", "cusolverDnXgesvd", - "cusolverDnXgeqrf_bufferSize", - "cusolverDnXgeqrf", "cusolverDnSyevdx_bufferSize", "cusolverDnSyevdx", "cusolverDnSyevd_bufferSize", @@ -9409,7 +9417,6 @@ sub warnUnsupportedFunctions { "cusolverDnSlauum_bufferSize", "cusolverDnSlauum", "cusolverDnSlaswp", - "cusolverDnSetDeterministicMode", "cusolverDnSXgesv_bufferSize", "cusolverDnSXgesv", "cusolverDnSXgels_bufferSize", @@ -9464,7 +9471,6 @@ sub warnUnsupportedFunctions { "cusolverDnGetrs", "cusolverDnGetrf_bufferSize", "cusolverDnGetrf", - "cusolverDnGetDeterministicMode", "cusolverDnGesvd_bufferSize", "cusolverDnGesvd", "cusolverDnGeqrf_bufferSize", @@ -13276,7 +13282,7 @@ if ($help) { print STDERR "$USAGE\n"; } if ($version) { - print STDERR "HIP version 6.2.0\n"; + print STDERR "HIP version 6.3.0\n"; } while (@ARGV) { $fileName=shift (@ARGV); diff --git a/docs/tables/CUSOLVER_API_supported_by_HIP.md b/docs/tables/CUSOLVER_API_supported_by_HIP.md index 06eee6a8..7dcddf1e 100644 --- a/docs/tables/CUSOLVER_API_supported_by_HIP.md +++ b/docs/tables/CUSOLVER_API_supported_by_HIP.md @@ -310,7 +310,7 @@ |`cusolverDnGeqrf_bufferSize`|11.0|11.1| | | | | | | | | |`cusolverDnGesvd`|11.0|11.1| | | | | | | | | |`cusolverDnGesvd_bufferSize`|11.0|11.1| | | | | | | | | -|`cusolverDnGetDeterministicMode`|12.2| | | | | | | | | | +|`cusolverDnGetDeterministicMode`|12.2| | | |`hipsolverDnGetDeterministicMode`|6.3.0| | | |6.3.0| |`cusolverDnGetStream`| | | | |`hipsolverGetStream`|4.5.0| | | | | |`cusolverDnGetrf`|11.0|11.1| | | | | | | | | |`cusolverDnGetrf_bufferSize`|11.0|11.1| | | | | | | | | @@ -365,7 +365,7 @@ |`cusolverDnSXgesv`|11.0| | | | | | | | | | |`cusolverDnSXgesv_bufferSize`|11.0| | | | | | | | | | |`cusolverDnSetAdvOptions`|11.0| | | |`hipsolverDnSetAdvOptions`|6.2.0| | | | | -|`cusolverDnSetDeterministicMode`|12.2| | | | | | | | | | +|`cusolverDnSetDeterministicMode`|12.2| | | |`hipsolverDnSetDeterministicMode`|6.3.0| | | |6.3.0| |`cusolverDnSetStream`| | | | |`hipsolverSetStream`|4.5.0| | | | | |`cusolverDnSgebrd`| | | | |`hipsolverDnSgebrd`|5.1.0| | | | | |`cusolverDnSgebrd_bufferSize`| | | | |`hipsolverDnSgebrd_bufferSize`|5.1.0| | | | | @@ -426,8 +426,8 @@ |`cusolverDnSyevd_bufferSize`|11.0|11.1| | | | | | | | | |`cusolverDnSyevdx`|11.0|11.1| | | | | | | | | |`cusolverDnSyevdx_bufferSize`|11.0|11.1| | | | | | | | | -|`cusolverDnXgeqrf`|11.1| | | | | | | | | | -|`cusolverDnXgeqrf_bufferSize`|11.1| | | | | | | | | | +|`cusolverDnXgeqrf`|11.1| | | |`hipsolverDnXgeqrf`|6.3.0| | | |6.3.0| +|`cusolverDnXgeqrf_bufferSize`|11.1| | | |`hipsolverDnXgeqrf_bufferSize`|6.3.0| | | |6.3.0| |`cusolverDnXgesvd`|11.1| | | | | | | | | | |`cusolverDnXgesvd_bufferSize`|11.1| | | | | | | | | | |`cusolverDnXgesvdjGetResidual`|9.0| | | |`hipsolverDnXgesvdjGetResidual`|5.1.0| | | | | @@ -444,9 +444,9 @@ |`cusolverDnXgetrs`|11.1| | | |`hipsolverDnXgetrs`|6.2.0| | | | | |`cusolverDnXlarft`|12.4| | | | | | | | | | |`cusolverDnXlarft_bufferSize`|12.4| | | | | | | | | | -|`cusolverDnXpotrf`|11.1| | | | | | | | | | -|`cusolverDnXpotrf_bufferSize`|11.1| | | | | | | | | | -|`cusolverDnXpotrs`|11.1| | | | | | | | | | +|`cusolverDnXpotrf`|11.1| | | |`hipsolverDnXpotrf`|6.3.0| | | |6.3.0| +|`cusolverDnXpotrf_bufferSize`|11.1| | | |`hipsolverDnXpotrf_bufferSize`|6.3.0| | | |6.3.0| +|`cusolverDnXpotrs`|11.1| | | |`hipsolverDnXpotrs`|6.3.0| | | |6.3.0| |`cusolverDnXsyevd`|11.1| | | | | | | | | | |`cusolverDnXsyevd_bufferSize`|11.1| | | | | | | | | | |`cusolverDnXsyevdx`|11.1| | | | | | | | | | diff --git a/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md b/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md index 1b491d6e..01d7d7aa 100644 --- a/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUSOLVER_API_supported_by_HIP_and_ROC.md @@ -310,7 +310,7 @@ |`cusolverDnGeqrf_bufferSize`|11.0|11.1| | | | | | | | | | | | | | | |`cusolverDnGesvd`|11.0|11.1| | | | | | | | | | | | | | | |`cusolverDnGesvd_bufferSize`|11.0|11.1| | | | | | | | | | | | | | | -|`cusolverDnGetDeterministicMode`|12.2| | | | | | | | | | | | | | | | +|`cusolverDnGetDeterministicMode`|12.2| | | |`hipsolverDnGetDeterministicMode`|6.3.0| | | |6.3.0| | | | | | | |`cusolverDnGetStream`| | | | |`hipsolverGetStream`|4.5.0| | | | |`rocblas_get_stream`| | | | | | |`cusolverDnGetrf`|11.0|11.1| | | | | | | | | | | | | | | |`cusolverDnGetrf_bufferSize`|11.0|11.1| | | | | | | | | | | | | | | @@ -365,7 +365,7 @@ |`cusolverDnSXgesv`|11.0| | | | | | | | | | | | | | | | |`cusolverDnSXgesv_bufferSize`|11.0| | | | | | | | | | | | | | | | |`cusolverDnSetAdvOptions`|11.0| | | |`hipsolverDnSetAdvOptions`|6.2.0| | | | | | | | | | | -|`cusolverDnSetDeterministicMode`|12.2| | | | | | | | | | | | | | | | +|`cusolverDnSetDeterministicMode`|12.2| | | |`hipsolverDnSetDeterministicMode`|6.3.0| | | |6.3.0| | | | | | | |`cusolverDnSetStream`| | | | |`hipsolverSetStream`|4.5.0| | | | |`rocblas_set_stream`| | | | | | |`cusolverDnSgebrd`| | | | |`hipsolverDnSgebrd`|5.1.0| | | | | | | | | | | |`cusolverDnSgebrd_bufferSize`| | | | |`hipsolverDnSgebrd_bufferSize`|5.1.0| | | | | | | | | | | @@ -426,8 +426,8 @@ |`cusolverDnSyevd_bufferSize`|11.0|11.1| | | | | | | | | | | | | | | |`cusolverDnSyevdx`|11.0|11.1| | | | | | | | | | | | | | | |`cusolverDnSyevdx_bufferSize`|11.0|11.1| | | | | | | | | | | | | | | -|`cusolverDnXgeqrf`|11.1| | | | | | | | | | | | | | | | -|`cusolverDnXgeqrf_bufferSize`|11.1| | | | | | | | | | | | | | | | +|`cusolverDnXgeqrf`|11.1| | | |`hipsolverDnXgeqrf`|6.3.0| | | |6.3.0| | | | | | | +|`cusolverDnXgeqrf_bufferSize`|11.1| | | |`hipsolverDnXgeqrf_bufferSize`|6.3.0| | | |6.3.0| | | | | | | |`cusolverDnXgesvd`|11.1| | | | | | | | | | | | | | | | |`cusolverDnXgesvd_bufferSize`|11.1| | | | | | | | | | | | | | | | |`cusolverDnXgesvdjGetResidual`|9.0| | | |`hipsolverDnXgesvdjGetResidual`|5.1.0| | | | | | | | | | | @@ -444,9 +444,9 @@ |`cusolverDnXgetrs`|11.1| | | |`hipsolverDnXgetrs`|6.2.0| | | | | | | | | | | |`cusolverDnXlarft`|12.4| | | | | | | | | | | | | | | | |`cusolverDnXlarft_bufferSize`|12.4| | | | | | | | | | | | | | | | -|`cusolverDnXpotrf`|11.1| | | | | | | | | | | | | | | | -|`cusolverDnXpotrf_bufferSize`|11.1| | | | | | | | | | | | | | | | -|`cusolverDnXpotrs`|11.1| | | | | | | | | | | | | | | | +|`cusolverDnXpotrf`|11.1| | | |`hipsolverDnXpotrf`|6.3.0| | | |6.3.0| | | | | | | +|`cusolverDnXpotrf_bufferSize`|11.1| | | |`hipsolverDnXpotrf_bufferSize`|6.3.0| | | |6.3.0| | | | | | | +|`cusolverDnXpotrs`|11.1| | | |`hipsolverDnXpotrs`|6.3.0| | | |6.3.0| | | | | | | |`cusolverDnXsyevd`|11.1| | | | | | | | | | | | | | | | |`cusolverDnXsyevd_bufferSize`|11.1| | | | | | | | | | | | | | | | |`cusolverDnXsyevdx`|11.1| | | | | | | | | | | | | | | | diff --git a/src/CUDA2HIP_SOLVER_API_functions.cpp b/src/CUDA2HIP_SOLVER_API_functions.cpp index c5f6f720..0eaf1c92 100644 --- a/src/CUDA2HIP_SOLVER_API_functions.cpp +++ b/src/CUDA2HIP_SOLVER_API_functions.cpp @@ -49,8 +49,8 @@ const std::map CUDA_SOLVER_FUNCTION_MAP { {"cusolverDnSetAdvOptions", {"hipsolverDnSetAdvOptions", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED}}, {"cusolverDnSetStream", {"hipsolverSetStream", "rocblas_set_stream", CONV_LIB_FUNC, API_SOLVER, 2}}, {"cusolverDnGetStream", {"hipsolverGetStream", "rocblas_get_stream", CONV_LIB_FUNC, API_SOLVER, 2}}, - {"cusolverDnSetDeterministicMode", {"hipsolverDnSetDeterministicMode", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, - {"cusolverDnGetDeterministicMode", {"hipsolverDnGetDeterministicMode", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, + {"cusolverDnSetDeterministicMode", {"hipsolverDnSetDeterministicMode", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnGetDeterministicMode", {"hipsolverDnGetDeterministicMode", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, {"cusolverDnIRSParamsCreate", {"hipsolverDnIRSParamsCreate", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnIRSParamsDestroy", {"hipsolverDnIRSParamsDestroy", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnIRSParamsSetRefinementSolver", {"hipsolverDnIRSParamsSetRefinementSolver", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, @@ -452,11 +452,11 @@ const std::map CUDA_SOLVER_FUNCTION_MAP { {"cusolverDnSyevdx", {"hipsolverDnSyevdx", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnGesvd_bufferSize", {"hipsolverDnGesvd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnGesvd", {"hipsolverDnGesvd", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, - {"cusolverDnXpotrf_bufferSize", {"hipsolverDnXpotrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, - {"cusolverDnXpotrf", {"hipsolverDnXpotrf", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, - {"cusolverDnXpotrs", {"hipsolverDnXpotrs", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, - {"cusolverDnXgeqrf_bufferSize", {"hipsolverDnXgeqrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, - {"cusolverDnXgeqrf", {"hipsolverDnXgeqrf", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, + {"cusolverDnXpotrf_bufferSize", {"hipsolverDnXpotrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnXpotrf", {"hipsolverDnXpotrf", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnXpotrs", {"hipsolverDnXpotrs", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnXgeqrf_bufferSize", {"hipsolverDnXgeqrf_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, + {"cusolverDnXgeqrf", {"hipsolverDnXgeqrf", "", CONV_LIB_FUNC, API_SOLVER, 2, ROC_UNSUPPORTED | HIP_EXPERIMENTAL}}, {"cusolverDnXsyevd_bufferSize", {"hipsolverDnXsyevd_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnXsyevd", {"hipsolverDnXsyevd", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, {"cusolverDnXsyevdx_bufferSize", {"hipsolverDnXsyevdx_bufferSize", "", CONV_LIB_FUNC, API_SOLVER, 2, UNSUPPORTED}}, @@ -1436,6 +1436,13 @@ const std::map HIP_SOLVER_FUNCTION_VER_MAP { {"hipsolverDnXgetrf", {HIP_6020, HIP_0, HIP_0, }}, {"hipsolverDnXgetrf_bufferSize", {HIP_6020, HIP_0, HIP_0, }}, {"hipsolverDnXgetrs", {HIP_6020, HIP_0, HIP_0, }}, + {"hipsolverDnSetDeterministicMode", {HIP_6030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnGetDeterministicMode", {HIP_6030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnXgeqrf_bufferSize", {HIP_6030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnXgeqrf", {HIP_6030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnXpotrf_bufferSize", {HIP_6030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnXpotrf", {HIP_6030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipsolverDnXpotrs", {HIP_6030, HIP_0, HIP_0, HIP_LATEST}}, {"rocsolver_spotrf", {HIP_3020, HIP_0, HIP_0 }}, {"rocsolver_dpotrf", {HIP_3020, HIP_0, HIP_0 }}, diff --git a/src/Statistics.cpp b/src/Statistics.cpp index 49680e35..97f76c57 100644 --- a/src/Statistics.cpp +++ b/src/Statistics.cpp @@ -618,6 +618,7 @@ std::string Statistics::getHipVersion(const hipVersions &ver) { case HIP_6010: return "6.1.0"; case HIP_6011: return "6.1.1"; case HIP_6020: return "6.2.0"; + case HIP_6030: return "6.3.0"; } return ""; } diff --git a/src/Statistics.h b/src/Statistics.h index b91ea6a0..fa114715 100644 --- a/src/Statistics.h +++ b/src/Statistics.h @@ -369,7 +369,8 @@ enum hipVersions { HIP_6010 = 6010, HIP_6011 = 6011, HIP_6020 = 6020, - HIP_LATEST = HIP_6020, + HIP_6030 = 6030, + HIP_LATEST = HIP_6030, }; struct cudaAPIversions { diff --git a/tests/unit_tests/synthetic/runtime_functions_12000.cu b/tests/unit_tests/synthetic/runtime_functions_12000.cu index 9cce4fad..d2e646ae 100644 --- a/tests/unit_tests/synthetic/runtime_functions_12000.cu +++ b/tests/unit_tests/synthetic/runtime_functions_12000.cu @@ -46,7 +46,7 @@ int main() { // TODO: detect cudaGetDriverEntryPoint signature and report warning/error for old (before CUDA 12.0) signature // HIP: hipError_t hipGetProcAddress(const char* symbol, void** pfn, int hipVersion, uint64_t flags, hipDriverProcAddressQueryResult* symbolStatus); // TODO: add an explicit static_cast for ull - // CHECK: result = hipGetProcAddress(symbol.c_str(), &pfn, 602, ull, &driverProcAddressQueryResult); + // CHECK: result = hipGetProcAddress(symbol.c_str(), &pfn, 603, ull, &driverProcAddressQueryResult); result = cudaGetDriverEntryPoint(symbol.c_str(), &pfn, ull, &driverProcAddressQueryResult); #endif