From fbcabd98071a17c4579a367a497a44d83079f681 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Thu, 1 Feb 2024 12:37:28 +0000 Subject: [PATCH] [HIPIFY][BLAS][6.1][sync] Sync with `hipBLAS` and `rocBLAS` - Step 3 - AMIN 64bit + Updated `BLAS` synthetic tests, the regenerated hipify-perl, and `BLAS` `CUDA2HIP` documentation --- bin/hipify-perl | 32 +++++++++---------- docs/tables/CUBLAS_API_supported_by_HIP.md | 16 +++++----- .../CUBLAS_API_supported_by_HIP_and_ROC.md | 16 +++++----- docs/tables/CUBLAS_API_supported_by_ROC.md | 16 +++++----- src/CUDA2HIP_BLAS_API_functions.cpp | 24 +++++++++----- .../synthetic/libraries/cublas2hipblas_v2.cu | 28 ++++++++++++++++ .../synthetic/libraries/cublas2rocblas_v2.cu | 28 ++++++++++++++++ 7 files changed, 112 insertions(+), 48 deletions(-) diff --git a/bin/hipify-perl b/bin/hipify-perl index e88a5df4..c50dca12 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1976,26 +1976,34 @@ sub rocSubstitutions { subst("cublasIcamax_v2", "rocblas_icamax", "library"); subst("cublasIcamax_v2_64", "rocblas_icamax_64", "library"); subst("cublasIcamin", "rocblas_icamin", "library"); + subst("cublasIcamin_64", "rocblas_icamin_64", "library"); subst("cublasIcamin_v2", "rocblas_icamin", "library"); + subst("cublasIcamin_v2_64", "rocblas_icamin_64", "library"); subst("cublasIdamax", "rocblas_idamax", "library"); subst("cublasIdamax_64", "rocblas_idamax_64", "library"); subst("cublasIdamax_v2", "rocblas_idamax", "library"); subst("cublasIdamax_v2_64", "rocblas_idamax_64", "library"); subst("cublasIdamin", "rocblas_idamin", "library"); + subst("cublasIdamin_64", "rocblas_idamin_64", "library"); subst("cublasIdamin_v2", "rocblas_idamin", "library"); + subst("cublasIdamin_v2_64", "rocblas_idamin_64", "library"); subst("cublasInit", "rocblas_initialize", "library"); subst("cublasIsamax", "rocblas_isamax", "library"); subst("cublasIsamax_64", "rocblas_isamax_64", "library"); subst("cublasIsamax_v2", "rocblas_isamax", "library"); subst("cublasIsamax_v2_64", "rocblas_isamax_64", "library"); subst("cublasIsamin", "rocblas_isamin", "library"); + subst("cublasIsamin_64", "rocblas_isamin_64", "library"); subst("cublasIsamin_v2", "rocblas_isamin", "library"); + subst("cublasIsamin_v2_64", "rocblas_isamin_64", "library"); subst("cublasIzamax", "rocblas_izamax", "library"); subst("cublasIzamax_64", "rocblas_izamax_64", "library"); subst("cublasIzamax_v2", "rocblas_izamax", "library"); subst("cublasIzamax_v2_64", "rocblas_izamax_64", "library"); subst("cublasIzamin", "rocblas_izamin", "library"); + subst("cublasIzamin_64", "rocblas_izamin_64", "library"); subst("cublasIzamin_v2", "rocblas_izamin", "library"); + subst("cublasIzamin_v2_64", "rocblas_izamin_64", "library"); subst("cublasNrm2Ex", "rocblas_nrm2_ex", "library"); subst("cublasRotEx", "rocblas_rot_ex", "library"); subst("cublasSasum", "rocblas_sasum", "library"); @@ -3907,25 +3915,33 @@ sub simpleSubstitutions { subst("cublasIcamax_v2", "hipblasIcamax_v2", "library"); subst("cublasIcamax_v2_64", "hipblasIcamax_v2_64", "library"); subst("cublasIcamin", "hipblasIcamin_v2", "library"); + subst("cublasIcamin_64", "hipblasIcamin_v2_64", "library"); subst("cublasIcamin_v2", "hipblasIcamin_v2", "library"); + subst("cublasIcamin_v2_64", "hipblasIcamin_v2_64", "library"); subst("cublasIdamax", "hipblasIdamax", "library"); subst("cublasIdamax_64", "hipblasIdamax_64", "library"); subst("cublasIdamax_v2", "hipblasIdamax", "library"); subst("cublasIdamax_v2_64", "hipblasIdamax_64", "library"); subst("cublasIdamin", "hipblasIdamin", "library"); + subst("cublasIdamin_64", "hipblasIdamin_64", "library"); subst("cublasIdamin_v2", "hipblasIdamin", "library"); + subst("cublasIdamin_v2_64", "hipblasIdamin_64", "library"); subst("cublasIsamax", "hipblasIsamax", "library"); subst("cublasIsamax_64", "hipblasIsamax_64", "library"); subst("cublasIsamax_v2", "hipblasIsamax", "library"); subst("cublasIsamax_v2_64", "hipblasIsamax_64", "library"); subst("cublasIsamin", "hipblasIsamin", "library"); + subst("cublasIsamin_64", "hipblasIsamin_64", "library"); subst("cublasIsamin_v2", "hipblasIsamin", "library"); + subst("cublasIsamin_v2_64", "hipblasIsamin_64", "library"); subst("cublasIzamax", "hipblasIzamax_v2", "library"); subst("cublasIzamax_64", "hipblasIzamax_v2_64", "library"); subst("cublasIzamax_v2", "hipblasIzamax_v2", "library"); subst("cublasIzamax_v2_64", "hipblasIzamax_v2_64", "library"); subst("cublasIzamin", "hipblasIzamin_v2", "library"); + subst("cublasIzamin_64", "hipblasIzamin_v2_64", "library"); subst("cublasIzamin_v2", "hipblasIzamin_v2", "library"); + subst("cublasIzamin_v2_64", "hipblasIzamin_v2_64", "library"); subst("cublasNrm2Ex", "hipblasNrm2Ex_v2", "library"); subst("cublasRotEx", "hipblasRotEx_v2", "library"); subst("cublasSasum", "hipblasSasum", "library"); @@ -10867,15 +10883,7 @@ sub warnHipOnlyUnsupportedFunctions { "cublasMigrateComputeType", "cublasLoggerConfigure", "cublasLogCallback", - "cublasIzamin_v2_64", - "cublasIzamin_64", - "cublasIsamin_v2_64", - "cublasIsamin_64", "cublasInit", - "cublasIdamin_v2_64", - "cublasIdamin_64", - "cublasIcamin_v2_64", - "cublasIcamin_64", "cublasIaminEx_64", "cublasIaminEx", "cublasIamaxEx_64", @@ -11381,14 +11389,6 @@ sub warnRocOnlyUnsupportedFunctions { "cublasMigrateComputeType", "cublasLoggerConfigure", "cublasLogCallback", - "cublasIzamin_v2_64", - "cublasIzamin_64", - "cublasIsamin_v2_64", - "cublasIsamin_64", - "cublasIdamin_v2_64", - "cublasIdamin_64", - "cublasIcamin_v2_64", - "cublasIcamin_64", "cublasIaminEx_64", "cublasIaminEx", "cublasIamaxEx_64", diff --git a/docs/tables/CUBLAS_API_supported_by_HIP.md b/docs/tables/CUBLAS_API_supported_by_HIP.md index 894fd514..d6b6c7d6 100644 --- a/docs/tables/CUBLAS_API_supported_by_HIP.md +++ b/docs/tables/CUBLAS_API_supported_by_HIP.md @@ -294,33 +294,33 @@ |`cublasIcamax_v2`| | | | |`hipblasIcamax_v2`|6.0.0| | | | | |`cublasIcamax_v2_64`|12.0| | | |`hipblasIcamax_v2_64`|6.1.0| | | | | |`cublasIcamin`| | | | |`hipblasIcamin_v2`|6.0.0| | | | | -|`cublasIcamin_64`|12.0| | | | | | | | | | +|`cublasIcamin_64`|12.0| | | |`hipblasIcamin_v2_64`|6.1.0| | | | | |`cublasIcamin_v2`| | | | |`hipblasIcamin_v2`|6.0.0| | | | | -|`cublasIcamin_v2_64`|12.0| | | | | | | | | | +|`cublasIcamin_v2_64`|12.0| | | |`hipblasIcamin_v2_64`|6.1.0| | | | | |`cublasIdamax`| | | | |`hipblasIdamax`|1.8.2| | | | | |`cublasIdamax_64`|12.0| | | |`hipblasIdamax_64`|6.1.0| | | | | |`cublasIdamax_v2`| | | | |`hipblasIdamax`|1.8.2| | | | | |`cublasIdamax_v2_64`|12.0| | | |`hipblasIdamax_64`|6.1.0| | | | | |`cublasIdamin`| | | | |`hipblasIdamin`|3.0.0| | | | | -|`cublasIdamin_64`|12.0| | | | | | | | | | +|`cublasIdamin_64`|12.0| | | |`hipblasIdamin_64`|6.1.0| | | | | |`cublasIdamin_v2`| | | | |`hipblasIdamin`|3.0.0| | | | | -|`cublasIdamin_v2_64`|12.0| | | | | | | | | | +|`cublasIdamin_v2_64`|12.0| | | |`hipblasIdamin_64`|6.1.0| | | | | |`cublasIsamax`| | | | |`hipblasIsamax`|1.8.2| | | | | |`cublasIsamax_64`|12.0| | | |`hipblasIsamax_64`|6.1.0| | | | | |`cublasIsamax_v2`| | | | |`hipblasIsamax`|1.8.2| | | | | |`cublasIsamax_v2_64`|12.0| | | |`hipblasIsamax_64`|6.1.0| | | | | |`cublasIsamin`| | | | |`hipblasIsamin`|3.0.0| | | | | -|`cublasIsamin_64`|12.0| | | | | | | | | | +|`cublasIsamin_64`|12.0| | | |`hipblasIsamin_64`|6.1.0| | | | | |`cublasIsamin_v2`| | | | |`hipblasIsamin`|3.0.0| | | | | -|`cublasIsamin_v2_64`|12.0| | | | | | | | | | +|`cublasIsamin_v2_64`|12.0| | | |`hipblasIsamin_64`|6.1.0| | | | | |`cublasIzamax`| | | | |`hipblasIzamax_v2`|6.0.0| | | | | |`cublasIzamax_64`|12.0| | | |`hipblasIzamax_v2_64`|6.1.0| | | | | |`cublasIzamax_v2`| | | | |`hipblasIzamax_v2`|6.0.0| | | | | |`cublasIzamax_v2_64`|12.0| | | |`hipblasIzamax_v2_64`|6.1.0| | | | | |`cublasIzamin`| | | | |`hipblasIzamin_v2`|6.0.0| | | | | -|`cublasIzamin_64`|12.0| | | | | | | | | | +|`cublasIzamin_64`|12.0| | | |`hipblasIzamin_v2_64`|6.1.0| | | | | |`cublasIzamin_v2`| | | | |`hipblasIzamin_v2`|6.0.0| | | | | -|`cublasIzamin_v2_64`|12.0| | | | | | | | | | +|`cublasIzamin_v2_64`|12.0| | | |`hipblasIzamin_v2_64`|6.1.0| | | | | |`cublasNrm2Ex`|8.0| | | |`hipblasNrm2Ex_v2`|6.0.0| | | | | |`cublasNrm2Ex_64`|12.0| | | | | | | | | | |`cublasSasum`| | | | |`hipblasSasum`|1.8.2| | | | | diff --git a/docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md b/docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md index 5183d83b..70d662c9 100644 --- a/docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md @@ -294,33 +294,33 @@ |`cublasIcamax_v2`| | | | |`hipblasIcamax_v2`|6.0.0| | | | |`rocblas_icamax`|3.5.0| | | | | |`cublasIcamax_v2_64`|12.0| | | |`hipblasIcamax_v2_64`|6.1.0| | | | |`rocblas_icamax_64`|6.1.0| | | | | |`cublasIcamin`| | | | |`hipblasIcamin_v2`|6.0.0| | | | |`rocblas_icamin`|3.5.0| | | | | -|`cublasIcamin_64`|12.0| | | | | | | | | | | | | | | | +|`cublasIcamin_64`|12.0| | | |`hipblasIcamin_v2_64`|6.1.0| | | | |`rocblas_icamin_64`|6.1.0| | | | | |`cublasIcamin_v2`| | | | |`hipblasIcamin_v2`|6.0.0| | | | |`rocblas_icamin`|3.5.0| | | | | -|`cublasIcamin_v2_64`|12.0| | | | | | | | | | | | | | | | +|`cublasIcamin_v2_64`|12.0| | | |`hipblasIcamin_v2_64`|6.1.0| | | | |`rocblas_icamin_64`|6.1.0| | | | | |`cublasIdamax`| | | | |`hipblasIdamax`|1.8.2| | | | |`rocblas_idamax`|1.6.4| | | | | |`cublasIdamax_64`|12.0| | | |`hipblasIdamax_64`|6.1.0| | | | |`rocblas_idamax_64`|6.1.0| | | | | |`cublasIdamax_v2`| | | | |`hipblasIdamax`|1.8.2| | | | |`rocblas_idamax`|1.6.4| | | | | |`cublasIdamax_v2_64`|12.0| | | |`hipblasIdamax_64`|6.1.0| | | | |`rocblas_idamax_64`|6.1.0| | | | | |`cublasIdamin`| | | | |`hipblasIdamin`|3.0.0| | | | |`rocblas_idamin`|1.6.4| | | | | -|`cublasIdamin_64`|12.0| | | | | | | | | | | | | | | | +|`cublasIdamin_64`|12.0| | | |`hipblasIdamin_64`|6.1.0| | | | |`rocblas_idamin_64`|6.1.0| | | | | |`cublasIdamin_v2`| | | | |`hipblasIdamin`|3.0.0| | | | |`rocblas_idamin`|1.6.4| | | | | -|`cublasIdamin_v2_64`|12.0| | | | | | | | | | | | | | | | +|`cublasIdamin_v2_64`|12.0| | | |`hipblasIdamin_64`|6.1.0| | | | |`rocblas_idamin_64`|6.1.0| | | | | |`cublasIsamax`| | | | |`hipblasIsamax`|1.8.2| | | | |`rocblas_isamax`|1.6.4| | | | | |`cublasIsamax_64`|12.0| | | |`hipblasIsamax_64`|6.1.0| | | | |`rocblas_isamax_64`|6.1.0| | | | | |`cublasIsamax_v2`| | | | |`hipblasIsamax`|1.8.2| | | | |`rocblas_isamax`|1.6.4| | | | | |`cublasIsamax_v2_64`|12.0| | | |`hipblasIsamax_64`|6.1.0| | | | |`rocblas_isamax_64`|6.1.0| | | | | |`cublasIsamin`| | | | |`hipblasIsamin`|3.0.0| | | | |`rocblas_isamin`|1.6.4| | | | | -|`cublasIsamin_64`|12.0| | | | | | | | | | | | | | | | +|`cublasIsamin_64`|12.0| | | |`hipblasIsamin_64`|6.1.0| | | | |`rocblas_isamin_64`|6.1.0| | | | | |`cublasIsamin_v2`| | | | |`hipblasIsamin`|3.0.0| | | | |`rocblas_isamin`|1.6.4| | | | | -|`cublasIsamin_v2_64`|12.0| | | | | | | | | | | | | | | | +|`cublasIsamin_v2_64`|12.0| | | |`hipblasIsamin_64`|6.1.0| | | | |`rocblas_isamin_64`|6.1.0| | | | | |`cublasIzamax`| | | | |`hipblasIzamax_v2`|6.0.0| | | | |`rocblas_izamax`|3.5.0| | | | | |`cublasIzamax_64`|12.0| | | |`hipblasIzamax_v2_64`|6.1.0| | | | |`rocblas_izamax_64`|6.1.0| | | | | |`cublasIzamax_v2`| | | | |`hipblasIzamax_v2`|6.0.0| | | | |`rocblas_izamax`|3.5.0| | | | | |`cublasIzamax_v2_64`|12.0| | | |`hipblasIzamax_v2_64`|6.1.0| | | | |`rocblas_izamax_64`|6.1.0| | | | | |`cublasIzamin`| | | | |`hipblasIzamin_v2`|6.0.0| | | | |`rocblas_izamin`|3.5.0| | | | | -|`cublasIzamin_64`|12.0| | | | | | | | | | | | | | | | +|`cublasIzamin_64`|12.0| | | |`hipblasIzamin_v2_64`|6.1.0| | | | |`rocblas_izamin_64`|6.1.0| | | | | |`cublasIzamin_v2`| | | | |`hipblasIzamin_v2`|6.0.0| | | | |`rocblas_izamin`|3.5.0| | | | | -|`cublasIzamin_v2_64`|12.0| | | | | | | | | | | | | | | | +|`cublasIzamin_v2_64`|12.0| | | |`hipblasIzamin_v2_64`|6.1.0| | | | |`rocblas_izamin_64`|6.1.0| | | | | |`cublasNrm2Ex`|8.0| | | |`hipblasNrm2Ex_v2`|6.0.0| | | | |`rocblas_nrm2_ex`|4.1.0| | | | | |`cublasNrm2Ex_64`|12.0| | | | | | | | | | | | | | | | |`cublasSasum`| | | | |`hipblasSasum`|1.8.2| | | | |`rocblas_sasum`|1.5.0| | | | | diff --git a/docs/tables/CUBLAS_API_supported_by_ROC.md b/docs/tables/CUBLAS_API_supported_by_ROC.md index 3c4a78f8..a5a679bb 100644 --- a/docs/tables/CUBLAS_API_supported_by_ROC.md +++ b/docs/tables/CUBLAS_API_supported_by_ROC.md @@ -294,33 +294,33 @@ |`cublasIcamax_v2`| | | | |`rocblas_icamax`|3.5.0| | | | | |`cublasIcamax_v2_64`|12.0| | | |`rocblas_icamax_64`|6.1.0| | | | | |`cublasIcamin`| | | | |`rocblas_icamin`|3.5.0| | | | | -|`cublasIcamin_64`|12.0| | | | | | | | | | +|`cublasIcamin_64`|12.0| | | |`rocblas_icamin_64`|6.1.0| | | | | |`cublasIcamin_v2`| | | | |`rocblas_icamin`|3.5.0| | | | | -|`cublasIcamin_v2_64`|12.0| | | | | | | | | | +|`cublasIcamin_v2_64`|12.0| | | |`rocblas_icamin_64`|6.1.0| | | | | |`cublasIdamax`| | | | |`rocblas_idamax`|1.6.4| | | | | |`cublasIdamax_64`|12.0| | | |`rocblas_idamax_64`|6.1.0| | | | | |`cublasIdamax_v2`| | | | |`rocblas_idamax`|1.6.4| | | | | |`cublasIdamax_v2_64`|12.0| | | |`rocblas_idamax_64`|6.1.0| | | | | |`cublasIdamin`| | | | |`rocblas_idamin`|1.6.4| | | | | -|`cublasIdamin_64`|12.0| | | | | | | | | | +|`cublasIdamin_64`|12.0| | | |`rocblas_idamin_64`|6.1.0| | | | | |`cublasIdamin_v2`| | | | |`rocblas_idamin`|1.6.4| | | | | -|`cublasIdamin_v2_64`|12.0| | | | | | | | | | +|`cublasIdamin_v2_64`|12.0| | | |`rocblas_idamin_64`|6.1.0| | | | | |`cublasIsamax`| | | | |`rocblas_isamax`|1.6.4| | | | | |`cublasIsamax_64`|12.0| | | |`rocblas_isamax_64`|6.1.0| | | | | |`cublasIsamax_v2`| | | | |`rocblas_isamax`|1.6.4| | | | | |`cublasIsamax_v2_64`|12.0| | | |`rocblas_isamax_64`|6.1.0| | | | | |`cublasIsamin`| | | | |`rocblas_isamin`|1.6.4| | | | | -|`cublasIsamin_64`|12.0| | | | | | | | | | +|`cublasIsamin_64`|12.0| | | |`rocblas_isamin_64`|6.1.0| | | | | |`cublasIsamin_v2`| | | | |`rocblas_isamin`|1.6.4| | | | | -|`cublasIsamin_v2_64`|12.0| | | | | | | | | | +|`cublasIsamin_v2_64`|12.0| | | |`rocblas_isamin_64`|6.1.0| | | | | |`cublasIzamax`| | | | |`rocblas_izamax`|3.5.0| | | | | |`cublasIzamax_64`|12.0| | | |`rocblas_izamax_64`|6.1.0| | | | | |`cublasIzamax_v2`| | | | |`rocblas_izamax`|3.5.0| | | | | |`cublasIzamax_v2_64`|12.0| | | |`rocblas_izamax_64`|6.1.0| | | | | |`cublasIzamin`| | | | |`rocblas_izamin`|3.5.0| | | | | -|`cublasIzamin_64`|12.0| | | | | | | | | | +|`cublasIzamin_64`|12.0| | | |`rocblas_izamin_64`|6.1.0| | | | | |`cublasIzamin_v2`| | | | |`rocblas_izamin`|3.5.0| | | | | -|`cublasIzamin_v2_64`|12.0| | | | | | | | | | +|`cublasIzamin_v2_64`|12.0| | | |`rocblas_izamin_64`|6.1.0| | | | | |`cublasNrm2Ex`|8.0| | | |`rocblas_nrm2_ex`|4.1.0| | | | | |`cublasNrm2Ex_64`|12.0| | | | | | | | | | |`cublasSasum`| | | | |`rocblas_sasum`|1.5.0| | | | | diff --git a/src/CUDA2HIP_BLAS_API_functions.cpp b/src/CUDA2HIP_BLAS_API_functions.cpp index 4fe0526a..f1e8c98c 100644 --- a/src/CUDA2HIP_BLAS_API_functions.cpp +++ b/src/CUDA2HIP_BLAS_API_functions.cpp @@ -170,13 +170,13 @@ const std::map CUDA_BLAS_FUNCTION_MAP { // AMIN {"cublasIsamin", {"hipblasIsamin", "rocblas_isamin", CONV_LIB_FUNC, API_BLAS, 5, HIP_SUPPORTED_V2_ONLY}}, - {"cublasIsamin_64", {"hipblasIsamin_64", "", CONV_LIB_FUNC, API_BLAS, 5, UNSUPPORTED}}, + {"cublasIsamin_64", {"hipblasIsamin_64", "rocblas_isamin_64", CONV_LIB_FUNC, API_BLAS, 5}}, {"cublasIdamin", {"hipblasIdamin", "rocblas_idamin", CONV_LIB_FUNC, API_BLAS, 5, HIP_SUPPORTED_V2_ONLY}}, - {"cublasIdamin_64", {"hipblasIdamin_64", "", CONV_LIB_FUNC, API_BLAS, 5, UNSUPPORTED}}, + {"cublasIdamin_64", {"hipblasIdamin_64", "rocblas_idamin_64", CONV_LIB_FUNC, API_BLAS, 5}}, {"cublasIcamin", {"hipblasIcamin_v2", "rocblas_icamin", CONV_LIB_FUNC, API_BLAS, 5, HIP_SUPPORTED_V2_ONLY}}, - {"cublasIcamin_64", {"hipblasIcamin_64", "", CONV_LIB_FUNC, API_BLAS, 5, UNSUPPORTED}}, + {"cublasIcamin_64", {"hipblasIcamin_v2_64", "rocblas_icamin_64", CONV_LIB_FUNC, API_BLAS, 5}}, {"cublasIzamin", {"hipblasIzamin_v2", "rocblas_izamin", CONV_LIB_FUNC, API_BLAS, 5, HIP_SUPPORTED_V2_ONLY}}, - {"cublasIzamin_64", {"hipblasIzamin_64", "", CONV_LIB_FUNC, API_BLAS, 5, UNSUPPORTED}}, + {"cublasIzamin_64", {"hipblasIzamin_v2_64", "rocblas_izamin_64", CONV_LIB_FUNC, API_BLAS, 5}}, // ASUM {"cublasSasum", {"hipblasSasum", "rocblas_sasum", CONV_LIB_FUNC, API_BLAS, 5, HIP_SUPPORTED_V2_ONLY}}, @@ -1016,13 +1016,13 @@ const std::map CUDA_BLAS_FUNCTION_MAP { {"cublasIaminEx", {"hipblasIaminEx", "", CONV_LIB_FUNC, API_BLAS, 8, UNSUPPORTED}}, {"cublasIaminEx_64", {"hipblasIaminEx_64", "", CONV_LIB_FUNC, API_BLAS, 8, UNSUPPORTED}}, {"cublasIsamin_v2", {"hipblasIsamin", "rocblas_isamin", CONV_LIB_FUNC, API_BLAS, 5}}, - {"cublasIsamin_v2_64", {"hipblasIsamin_64", "", CONV_LIB_FUNC, API_BLAS, 5, UNSUPPORTED}}, + {"cublasIsamin_v2_64", {"hipblasIsamin_64", "rocblas_isamin_64", CONV_LIB_FUNC, API_BLAS, 5}}, {"cublasIdamin_v2", {"hipblasIdamin", "rocblas_idamin", CONV_LIB_FUNC, API_BLAS, 5}}, - {"cublasIdamin_v2_64", {"hipblasIdamin_64", "", CONV_LIB_FUNC, API_BLAS, 5, UNSUPPORTED}}, + {"cublasIdamin_v2_64", {"hipblasIdamin_64", "rocblas_idamin_64", CONV_LIB_FUNC, API_BLAS, 5}}, {"cublasIcamin_v2", {"hipblasIcamin_v2", "rocblas_icamin", CONV_LIB_FUNC, API_BLAS, 5}}, - {"cublasIcamin_v2_64", {"hipblasIcamin_64", "", CONV_LIB_FUNC, API_BLAS, 5, UNSUPPORTED}}, + {"cublasIcamin_v2_64", {"hipblasIcamin_v2_64", "rocblas_icamin_64", CONV_LIB_FUNC, API_BLAS, 5}}, {"cublasIzamin_v2", {"hipblasIzamin_v2", "rocblas_izamin", CONV_LIB_FUNC, API_BLAS, 5}}, - {"cublasIzamin_v2_64", {"hipblasIzamin_64", "", CONV_LIB_FUNC, API_BLAS, 5, UNSUPPORTED}}, + {"cublasIzamin_v2_64", {"hipblasIzamin_v2_64", "rocblas_izamin_64", CONV_LIB_FUNC, API_BLAS, 5}}, // ASUM {"cublasAsumEx", {"hipblasAsumEx", "", CONV_LIB_FUNC, API_BLAS, 8, UNSUPPORTED}}, @@ -1875,6 +1875,10 @@ const std::map HIP_BLAS_FUNCTION_VER_MAP { {"hipblasIdamax_64", {HIP_6010, HIP_0, HIP_0, }}, {"hipblasIcamax_v2_64", {HIP_6010, HIP_0, HIP_0, }}, {"hipblasIzamax_v2_64", {HIP_6010, HIP_0, HIP_0, }}, + {"hipblasIsamin_64", {HIP_6010, HIP_0, HIP_0, }}, + {"hipblasIdamin_64", {HIP_6010, HIP_0, HIP_0, }}, + {"hipblasIcamin_v2_64", {HIP_6010, HIP_0, HIP_0, }}, + {"hipblasIzamin_v2_64", {HIP_6010, HIP_0, HIP_0, }}, {"rocblas_status_to_string", {HIP_3050, HIP_0, HIP_0 }}, {"rocblas_sscal", {HIP_1050, HIP_0, HIP_0 }}, @@ -2115,6 +2119,10 @@ const std::map HIP_BLAS_FUNCTION_VER_MAP { {"rocblas_idamax_64", {HIP_6010, HIP_0, HIP_0, }}, {"rocblas_icamax_64", {HIP_6010, HIP_0, HIP_0, }}, {"rocblas_izamax_64", {HIP_6010, HIP_0, HIP_0, }}, + {"rocblas_isamin_64", {HIP_6010, HIP_0, HIP_0, }}, + {"rocblas_idamin_64", {HIP_6010, HIP_0, HIP_0, }}, + {"rocblas_icamin_64", {HIP_6010, HIP_0, HIP_0, }}, + {"rocblas_izamin_64", {HIP_6010, HIP_0, HIP_0, }}, }; const std::map HIP_BLAS_FUNCTION_CHANGED_VER_MAP { diff --git a/tests/unit_tests/synthetic/libraries/cublas2hipblas_v2.cu b/tests/unit_tests/synthetic/libraries/cublas2hipblas_v2.cu index fc87b759..6ad93d2b 100644 --- a/tests/unit_tests/synthetic/libraries/cublas2hipblas_v2.cu +++ b/tests/unit_tests/synthetic/libraries/cublas2hipblas_v2.cu @@ -1866,6 +1866,34 @@ int main() { // CHECK-NEXT: blasStatus = hipblasIzamax_v2_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); blasStatus = cublasIzamax_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); blasStatus = cublasIzamax_v2_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); + + // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasIsamin_v2_64(cublasHandle_t handle, int64_t n, const float* x, int64_t incx, int64_t* result); + // HIP: HIPBLAS_EXPORT hipblasStatus_t hipblasIsamin_64(hipblasHandle_t handle, int64_t n, const float* x, int64_t incx, int64_t* result); + // CHECK: blasStatus = hipblasIsamin_64(blasHandle, n_64, &fx, incx_64, &res_64); + // CHECK-NEXT: blasStatus = hipblasIsamin_64(blasHandle, n_64, &fx, incx_64, &res_64); + blasStatus = cublasIsamin_64(blasHandle, n_64, &fx, incx_64, &res_64); + blasStatus = cublasIsamin_v2_64(blasHandle, n_64, &fx, incx_64, &res_64); + + // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasIdamin_v2_64(cublasHandle_t handle, int64_t n, const double* x, int64_t incx, int64_t* result); + // HIP: HIPBLAS_EXPORT hipblasStatus_t hipblasIdamin_64(hipblasHandle_t handle, int64_t n, const double* x, int64_t incx, int64_t* result); + // CHECK: blasStatus = hipblasIdamin_64(blasHandle, n_64, &dx, incx_64, &res_64); + // CHECK-NEXT: blasStatus = hipblasIdamin_64(blasHandle, n_64, &dx, incx_64, &res_64); + blasStatus = cublasIdamin_64(blasHandle, n_64, &dx, incx_64, &res_64); + blasStatus = cublasIdamin_v2_64(blasHandle, n_64, &dx, incx_64, &res_64); + + // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasIcamin_v2_64(cublasHandle_t handle, int64_t n, const cuComplex* x, int64_t incx, int64_t* result); + // HIP: HIPBLAS_EXPORT hipblasStatus_t hipblasIcamin_v2_64(hipblasHandle_t handle, int64_t n, const hipComplex* x, int64_t incx, int64_t* result); + // CHECK: blasStatus = hipblasIcamin_v2_64(blasHandle, n_64, &complexx, incx_64, &res_64); + // CHECK-NEXT: blasStatus = hipblasIcamin_v2_64(blasHandle, n_64, &complexx, incx_64, &res_64); + blasStatus = cublasIcamin_64(blasHandle, n_64, &complexx, incx_64, &res_64); + blasStatus = cublasIcamin_v2_64(blasHandle, n_64, &complexx, incx_64, &res_64); + + // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasIzamin_v2_64(cublasHandle_t handle, int64_t n, const cuDoubleComplex* x, int64_t incx, int64_t* result); + // HIP: HIPBLAS_EXPORT hipblasStatus_t hipblasIzamin_v2_64(hipblasHandle_t handle, int64_t n, const hipDoubleComplex* x, int64_t incx, int64_t* result); + // CHECK: blasStatus = hipblasIzamin_v2_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); + // CHECK-NEXT: blasStatus = hipblasIzamin_v2_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); + blasStatus = cublasIzamin_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); + blasStatus = cublasIzamin_v2_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); #endif return 0; diff --git a/tests/unit_tests/synthetic/libraries/cublas2rocblas_v2.cu b/tests/unit_tests/synthetic/libraries/cublas2rocblas_v2.cu index 90dfc3db..d7c9505a 100644 --- a/tests/unit_tests/synthetic/libraries/cublas2rocblas_v2.cu +++ b/tests/unit_tests/synthetic/libraries/cublas2rocblas_v2.cu @@ -1951,6 +1951,34 @@ int main() { // CHECK-NEXT: blasStatus = rocblas_izamax_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); blasStatus = cublasIzamax_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); blasStatus = cublasIzamax_v2_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); + + // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasIsamin_v2_64(cublasHandle_t handle, int64_t n, const float* x, int64_t incx, int64_t* result); + // ROC: ROCBLAS_EXPORT rocblas_status rocblas_isamin_64(rocblas_handle handle, int64_t n, const float* x, int64_t incx, int64_t* result); + // CHECK: blasStatus = rocblas_isamin_64(blasHandle, n_64, &fx, incx_64, &res_64); + // CHECK-NEXT: blasStatus = rocblas_isamin_64(blasHandle, n_64, &fx, incx_64, &res_64); + blasStatus = cublasIsamin_64(blasHandle, n_64, &fx, incx_64, &res_64); + blasStatus = cublasIsamin_v2_64(blasHandle, n_64, &fx, incx_64, &res_64); + + // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasIdamin_v2_64(cublasHandle_t handle, int64_t n, const double* x, int64_t incx, int64_t* result); + // ROC: ROCBLAS_EXPORT rocblas_status rocblas_idamin_64(rocblas_handle handle, int64_t n, const double* x, int64_t incx, int64_t* result); + // CHECK: blasStatus = rocblas_idamin_64(blasHandle, n_64, &dx, incx_64, &res_64); + // CHECK-NEXT: blasStatus = rocblas_idamin_64(blasHandle, n_64, &dx, incx_64, &res_64); + blasStatus = cublasIdamin_64(blasHandle, n_64, &dx, incx_64, &res_64); + blasStatus = cublasIdamin_v2_64(blasHandle, n_64, &dx, incx_64, &res_64); + + // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasIcamin_v2_64(cublasHandle_t handle, int64_t n, const cuComplex* x, int64_t incx, int64_t* result); + // ROC: ROCBLAS_EXPORT rocblas_status rocblas_icamin_64(rocblas_handle handle, int64_t n, const rocblas_float_complex* x, int64_t incx, int64_t* result); + // CHECK: blasStatus = rocblas_icamin_64(blasHandle, n_64, &complexx, incx_64, &res_64); + // CHECK-NEXT: blasStatus = rocblas_icamin_64(blasHandle, n_64, &complexx, incx_64, &res_64); + blasStatus = cublasIcamin_64(blasHandle, n_64, &complexx, incx_64, &res_64); + blasStatus = cublasIcamin_v2_64(blasHandle, n_64, &complexx, incx_64, &res_64); + + // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasIzamin_v2_64(cublasHandle_t handle, int64_t n, const cuDoubleComplex* x, int64_t incx, int64_t* result); + // ROC: ROCBLAS_EXPORT rocblas_status rocblas_izamin_64(rocblas_handle handle, int64_t n, const rocblas_double_complex* x, int64_t incx, int64_t* result); + // CHECK: blasStatus = rocblas_izamin_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); + // CHECK-NEXT: blasStatus = rocblas_izamin_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); + blasStatus = cublasIzamin_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); + blasStatus = cublasIzamin_v2_64(blasHandle, n_64, &dcomplexx, incx_64, &res_64); #endif return 0;