Skip to content

Commit

Permalink
[HIPIFY][rocBLAS] 64-bit functions support - Step 3
Browse files Browse the repository at this point in the history
+ `rocblas_(s|d|c|z|hsh|hss|tst|tss)gemv_batched_64` support
+ [fix] Added the missing support for `rocblas_(s|d)gemv_batched`
+ Updated synthetic tests, the regenerated `hipify-perl`, and `BLAS` `CUDA2HIP` documentation
  • Loading branch information
emankov committed Sep 26, 2024
1 parent 3a506f3 commit 2178f18
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 52 deletions.
20 changes: 10 additions & 10 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,7 @@ sub rocSubstitutions {
subst("cublasCgemm_v2", "rocblas_cgemm", "library");
subst("cublasCgemv", "rocblas_cgemv", "library");
subst("cublasCgemvBatched", "rocblas_cgemv_batched", "library");
subst("cublasCgemvBatched_64", "rocblas_cgemv_batched_64", "library");
subst("cublasCgemvStridedBatched", "rocblas_cgemv_strided_batched", "library");
subst("cublasCgemv_64", "rocblas_cgemv_64", "library");
subst("cublasCgemv_v2", "rocblas_cgemv", "library");
Expand Down Expand Up @@ -1672,6 +1673,8 @@ sub rocSubstitutions {
subst("cublasDgemmStridedBatched", "rocblas_dgemm_strided_batched", "library");
subst("cublasDgemm_v2", "rocblas_dgemm", "library");
subst("cublasDgemv", "rocblas_dgemv", "library");
subst("cublasDgemvBatched", "rocblas_dgemv_batched", "library");
subst("cublasDgemvBatched_64", "rocblas_dgemv_batched_64", "library");
subst("cublasDgemv_64", "rocblas_dgemv_64", "library");
subst("cublasDgemv_v2", "rocblas_dgemv", "library");
subst("cublasDgemv_v2_64", "rocblas_dgemv_64", "library");
Expand Down Expand Up @@ -1766,8 +1769,10 @@ sub rocSubstitutions {
subst("cublasGetVector", "rocblas_get_vector", "library");
subst("cublasGetVectorAsync", "rocblas_get_vector_async", "library");
subst("cublasHSHgemvBatched", "rocblas_hshgemv_batched", "library");
subst("cublasHSHgemvBatched_64", "rocblas_hshgemv_batched_64", "library");
subst("cublasHSHgemvStridedBatched", "rocblas_hshgemv_strided_batched", "library");
subst("cublasHSSgemvBatched", "rocblas_hssgemv_batched", "library");
subst("cublasHSSgemvBatched_64", "rocblas_hssgemv_batched_64", "library");
subst("cublasHSSgemvStridedBatched", "rocblas_hssgemv_strided_batched", "library");
subst("cublasHgemm", "rocblas_hgemm", "library");
subst("cublasHgemmBatched", "rocblas_hgemm_batched", "library");
Expand Down Expand Up @@ -1856,6 +1861,8 @@ sub rocSubstitutions {
subst("cublasSgemmStridedBatched", "rocblas_sgemm_strided_batched", "library");
subst("cublasSgemm_v2", "rocblas_sgemm", "library");
subst("cublasSgemv", "rocblas_sgemv", "library");
subst("cublasSgemvBatched", "rocblas_sgemv_batched", "library");
subst("cublasSgemvBatched_64", "rocblas_sgemv_batched_64", "library");
subst("cublasSgemv_64", "rocblas_sgemv_64", "library");
subst("cublasSgemv_v2", "rocblas_sgemv", "library");
subst("cublasSgemv_v2_64", "rocblas_sgemv_64", "library");
Expand Down Expand Up @@ -1924,8 +1931,10 @@ sub rocSubstitutions {
subst("cublasStrsv", "rocblas_strsv", "library");
subst("cublasStrsv_v2", "rocblas_strsv", "library");
subst("cublasTSSgemvBatched", "rocblas_tssgemv_batched", "library");
subst("cublasTSSgemvBatched_64", "rocblas_tssgemv_batched_64", "library");
subst("cublasTSSgemvStridedBatched", "rocblas_tssgemv_strided_batched", "library");
subst("cublasTSTgemvBatched", "rocblas_tstgemv_batched", "library");
subst("cublasTSTgemvBatched_64", "rocblas_tstgemv_batched_64", "library");
subst("cublasTSTgemvStridedBatched", "rocblas_tstgemv_strided_batched", "library");
subst("cublasZaxpy", "rocblas_zaxpy", "library");
subst("cublasZaxpy_64", "rocblas_zaxpy_64", "library");
Expand Down Expand Up @@ -1963,6 +1972,7 @@ sub rocSubstitutions {
subst("cublasZgemm_v2", "rocblas_zgemm", "library");
subst("cublasZgemv", "rocblas_zgemv", "library");
subst("cublasZgemvBatched", "rocblas_zgemv_batched", "library");
subst("cublasZgemvBatched_64", "rocblas_zgemv_batched_64", "library");
subst("cublasZgemvStridedBatched", "rocblas_zgemv_strided_batched", "library");
subst("cublasZgemv_64", "rocblas_zgemv_64", "library");
subst("cublasZgemv_v2", "rocblas_zgemv", "library");
Expand Down Expand Up @@ -12490,7 +12500,6 @@ sub warnRocOnlyUnsupportedFunctions {
"cublasZgerc_64",
"cublasZgeqrfBatched",
"cublasZgemvStridedBatched_64",
"cublasZgemvBatched_64",
"cublasZgemm_v2_64",
"cublasZgemm_64",
"cublasZgemmStridedBatched_64",
Expand All @@ -12503,9 +12512,7 @@ sub warnRocOnlyUnsupportedFunctions {
"cublasXerbla",
"cublasUint8gemmBias",
"cublasTSTgemvStridedBatched_64",
"cublasTSTgemvBatched_64",
"cublasTSSgemvStridedBatched_64",
"cublasTSSgemvBatched_64",
"cublasSwapEx_64",
"cublasSwapEx",
"cublasStrttp",
Expand Down Expand Up @@ -12558,8 +12565,6 @@ sub warnRocOnlyUnsupportedFunctions {
"cublasSgeqrfBatched",
"cublasSgemvStridedBatched_64",
"cublasSgemvStridedBatched",
"cublasSgemvBatched_64",
"cublasSgemvBatched",
"cublasSgemm_v2_64",
"cublasSgemm_64",
"cublasSgemmStridedBatched_64",
Expand Down Expand Up @@ -12656,9 +12661,7 @@ sub warnRocOnlyUnsupportedFunctions {
"cublasHgemmStridedBatched_64",
"cublasHgemmBatched_64",
"cublasHSSgemvStridedBatched_64",
"cublasHSSgemvBatched_64",
"cublasHSHgemvStridedBatched_64",
"cublasHSHgemvBatched_64",
"cublasGetVersion_v2",
"cublasGetVersion",
"cublasGetVector_64",
Expand Down Expand Up @@ -12726,8 +12729,6 @@ sub warnRocOnlyUnsupportedFunctions {
"cublasDgeqrfBatched",
"cublasDgemvStridedBatched_64",
"cublasDgemvStridedBatched",
"cublasDgemvBatched_64",
"cublasDgemvBatched",
"cublasDgemm_v2_64",
"cublasDgemm_64",
"cublasDgemmStridedBatched_64",
Expand Down Expand Up @@ -12810,7 +12811,6 @@ sub warnRocOnlyUnsupportedFunctions {
"cublasCgerc_64",
"cublasCgeqrfBatched",
"cublasCgemvStridedBatched_64",
"cublasCgemvBatched_64",
"cublasCgemm_v2_64",
"cublasCgemm_64",
"cublasCgemmStridedBatched_64",
Expand Down
20 changes: 10 additions & 10 deletions docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@
|`cublasCgemm_v2`| | | | |`hipblasCgemm_v2`|6.0.0| | | | |`rocblas_cgemm`|1.5.0| | | | |
|`cublasCgemm_v2_64`|12.0| | | | | | | | | | | | | | | |
|`cublasCgemvBatched`|11.6| | | |`hipblasCgemvBatched_v2`|6.0.0| | | | |`rocblas_cgemv_batched`|3.5.0| | | | |
|`cublasCgemvBatched_64`|12.0| | | |`hipblasCgemvBatched_v2_64`|6.2.0| | | | | | | | | | |
|`cublasCgemvBatched_64`|12.0| | | |`hipblasCgemvBatched_v2_64`|6.2.0| | | | |`rocblas_cgemv_batched_64`|6.2.0| | | | |
|`cublasCgemvStridedBatched`|11.6| | | |`hipblasCgemvStridedBatched_v2`|6.0.0| | | | |`rocblas_cgemv_strided_batched`|3.5.0| | | | |
|`cublasCgemvStridedBatched_64`|12.0| | | |`hipblasCgemvStridedBatched_v2_64`|6.2.0| | | | | | | | | | |
|`cublasChemm`| | | | |`hipblasChemm_v2`|6.0.0| | | | |`rocblas_chemm`|3.5.0| | | | |
Expand Down Expand Up @@ -1081,8 +1081,8 @@
|`cublasDgemm_64`|12.0| | | | | | | | | | | | | | | |
|`cublasDgemm_v2`| | | | |`hipblasDgemm`|1.8.2| | | | |`rocblas_dgemm`|1.5.0| | | | |
|`cublasDgemm_v2_64`|12.0| | | | | | | | | | | | | | | |
|`cublasDgemvBatched`|11.6| | | |`hipblasDgemvBatched`|3.0.0| | | | | | | | | | |
|`cublasDgemvBatched_64`|12.0| | | |`hipblasDgemvBatched_64`|6.2.0| | | | | | | | | | |
|`cublasDgemvBatched`|11.6| | | |`hipblasDgemvBatched`|3.0.0| | | | |`rocblas_dgemv_batched`|3.5.0| | | | |
|`cublasDgemvBatched_64`|12.0| | | |`hipblasDgemvBatched_64`|6.2.0| | | | |`rocblas_dgemv_batched_64`|6.2.0| | | | |
|`cublasDgemvStridedBatched`|11.6| | | |`hipblasDgemvStridedBatched`|3.0.0| | | | | | | | | | |
|`cublasDgemvStridedBatched_64`|12.0| | | |`hipblasDgemvStridedBatched_64`|6.2.0| | | | | | | | | | |
|`cublasDsymm`| | | | |`hipblasDsymm`|3.6.0| | | | |`rocblas_dsymm`|3.5.0| | | | |
Expand Down Expand Up @@ -1110,11 +1110,11 @@
|`cublasGemmGroupedBatchedEx`|12.5| | | | | | | | | | | | | | | |
|`cublasGemmGroupedBatchedEx_64`|12.5| | | | | | | | | | | | | | | |
|`cublasHSHgemvBatched`|11.6| | | | | | | | | |`rocblas_hshgemv_batched`|6.0.0| | | | |
|`cublasHSHgemvBatched_64`|12.0| | | | | | | | | | | | | | | |
|`cublasHSHgemvBatched_64`|12.0| | | | | | | | | |`rocblas_hshgemv_batched_64`|6.2.0| | | | |
|`cublasHSHgemvStridedBatched`|11.6| | | | | | | | | |`rocblas_hshgemv_strided_batched`|6.0.0| | | | |
|`cublasHSHgemvStridedBatched_64`|12.0| | | | | | | | | | | | | | | |
|`cublasHSSgemvBatched`|11.6| | | | | | | | | |`rocblas_hssgemv_batched`|6.0.0| | | | |
|`cublasHSSgemvBatched_64`|12.0| | | | | | | | | | | | | | | |
|`cublasHSSgemvBatched_64`|12.0| | | | | | | | | |`rocblas_hssgemv_batched_64`|6.2.0| | | | |
|`cublasHSSgemvStridedBatched`|11.6| | | | | | | | | |`rocblas_hssgemv_strided_batched`|6.0.0| | | | |
|`cublasHSSgemvStridedBatched_64`|12.0| | | | | | | | | | | | | | | |
|`cublasHgemm`|7.5| | | |`hipblasHgemm`|1.8.2| | | | |`rocblas_hgemm`|1.5.0| | | | |
Expand All @@ -1133,8 +1133,8 @@
|`cublasSgemm_64`|12.0| | | | | | | | | | | | | | | |
|`cublasSgemm_v2`| | | | |`hipblasSgemm`|1.8.2| | | | |`rocblas_sgemm`|1.5.0| | | | |
|`cublasSgemm_v2_64`|12.0| | | | | | | | | | | | | | | |
|`cublasSgemvBatched`|11.6| | | |`hipblasSgemvBatched`|1.6.0| | | | | | | | | | |
|`cublasSgemvBatched_64`|12.0| | | |`hipblasSgemvBatched_64`|6.2.0| | | | | | | | | | |
|`cublasSgemvBatched`|11.6| | | |`hipblasSgemvBatched`|1.6.0| | | | |`rocblas_sgemv_batched`|3.5.0| | | | |
|`cublasSgemvBatched_64`|12.0| | | |`hipblasSgemvBatched_64`|6.2.0| | | | |`rocblas_sgemv_batched_64`|6.2.0| | | | |
|`cublasSgemvStridedBatched`|11.6| | | |`hipblasSgemvStridedBatched`|3.0.0| | | | | | | | | | |
|`cublasSgemvStridedBatched_64`|12.0| | | |`hipblasSgemvStridedBatched_64`|6.2.0| | | | | | | | | | |
|`cublasSsymm`| | | | |`hipblasSsymm`|3.6.0| | | | |`rocblas_ssymm`|3.5.0| | | | |
Expand All @@ -1160,11 +1160,11 @@
|`cublasStrsm_v2`| | | | |`hipblasStrsm`|1.8.2| | | | |`rocblas_strsm`|1.5.0| | | | |
|`cublasStrsm_v2_64`|12.0| | | | | | | | | | | | | | | |
|`cublasTSSgemvBatched`|11.6| | | | | | | | | |`rocblas_tssgemv_batched`|6.0.0| | | | |
|`cublasTSSgemvBatched_64`|12.0| | | | | | | | | | | | | | | |
|`cublasTSSgemvBatched_64`|12.0| | | | | | | | | |`rocblas_tssgemv_batched_64`|6.2.0| | | | |
|`cublasTSSgemvStridedBatched`|11.6| | | | | | | | | |`rocblas_tssgemv_strided_batched`|6.0.0| | | | |
|`cublasTSSgemvStridedBatched_64`|12.0| | | | | | | | | | | | | | | |
|`cublasTSTgemvBatched`|11.6| | | | | | | | | |`rocblas_tstgemv_batched`|6.0.0| | | | |
|`cublasTSTgemvBatched_64`|12.0| | | | | | | | | | | | | | | |
|`cublasTSTgemvBatched_64`|12.0| | | | | | | | | |`rocblas_tstgemv_batched_64`|6.2.0| | | | |
|`cublasTSTgemvStridedBatched`|11.6| | | | | | | | | |`rocblas_tstgemv_strided_batched`|6.0.0| | | | |
|`cublasTSTgemvStridedBatched_64`|12.0| | | | | | | | | | | | | | | |
|`cublasZgemm`| | | | |`hipblasZgemm_v2`|6.0.0| | | | |`rocblas_zgemm`|1.5.0| | | | |
Expand All @@ -1178,7 +1178,7 @@
|`cublasZgemm_v2`| | | | |`hipblasZgemm_v2`|6.0.0| | | | |`rocblas_zgemm`|1.5.0| | | | |
|`cublasZgemm_v2_64`|12.0| | | | | | | | | | | | | | | |
|`cublasZgemvBatched`|11.6| | | |`hipblasZgemvBatched_v2`|6.0.0| | | | |`rocblas_zgemv_batched`|3.5.0| | | | |
|`cublasZgemvBatched_64`|12.0| | | |`hipblasZgemvBatched_v2_64`|6.2.0| | | | | | | | | | |
|`cublasZgemvBatched_64`|12.0| | | |`hipblasZgemvBatched_v2_64`|6.2.0| | | | |`rocblas_zgemv_batched_64`|6.2.0| | | | |
|`cublasZgemvStridedBatched`|11.6| | | |`hipblasZgemvStridedBatched_v2`|6.0.0| | | | |`rocblas_zgemv_strided_batched`|3.5.0| | | | |
|`cublasZgemvStridedBatched_64`|12.0| | | |`hipblasZgemvStridedBatched_v2_64`|6.2.0| | | | | | | | | | |
|`cublasZhemm`| | | | |`hipblasZhemm_v2`|6.0.0| | | | |`rocblas_zhemm`|3.5.0| | | | |
Expand Down
20 changes: 10 additions & 10 deletions docs/tables/CUBLAS_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@
|`cublasCgemm_v2`| | | | |`rocblas_cgemm`|1.5.0| | | | |
|`cublasCgemm_v2_64`|12.0| | | | | | | | | |
|`cublasCgemvBatched`|11.6| | | |`rocblas_cgemv_batched`|3.5.0| | | | |
|`cublasCgemvBatched_64`|12.0| | | | | | | | | |
|`cublasCgemvBatched_64`|12.0| | | |`rocblas_cgemv_batched_64`|6.2.0| | | | |
|`cublasCgemvStridedBatched`|11.6| | | |`rocblas_cgemv_strided_batched`|3.5.0| | | | |
|`cublasCgemvStridedBatched_64`|12.0| | | | | | | | | |
|`cublasChemm`| | | | |`rocblas_chemm`|3.5.0| | | | |
Expand Down Expand Up @@ -1081,8 +1081,8 @@
|`cublasDgemm_64`|12.0| | | | | | | | | |
|`cublasDgemm_v2`| | | | |`rocblas_dgemm`|1.5.0| | | | |
|`cublasDgemm_v2_64`|12.0| | | | | | | | | |
|`cublasDgemvBatched`|11.6| | | | | | | | | |
|`cublasDgemvBatched_64`|12.0| | | | | | | | | |
|`cublasDgemvBatched`|11.6| | | |`rocblas_dgemv_batched`|3.5.0| | | | |
|`cublasDgemvBatched_64`|12.0| | | |`rocblas_dgemv_batched_64`|6.2.0| | | | |
|`cublasDgemvStridedBatched`|11.6| | | | | | | | | |
|`cublasDgemvStridedBatched_64`|12.0| | | | | | | | | |
|`cublasDsymm`| | | | |`rocblas_dsymm`|3.5.0| | | | |
Expand Down Expand Up @@ -1110,11 +1110,11 @@
|`cublasGemmGroupedBatchedEx`|12.5| | | | | | | | | |
|`cublasGemmGroupedBatchedEx_64`|12.5| | | | | | | | | |
|`cublasHSHgemvBatched`|11.6| | | |`rocblas_hshgemv_batched`|6.0.0| | | | |
|`cublasHSHgemvBatched_64`|12.0| | | | | | | | | |
|`cublasHSHgemvBatched_64`|12.0| | | |`rocblas_hshgemv_batched_64`|6.2.0| | | | |
|`cublasHSHgemvStridedBatched`|11.6| | | |`rocblas_hshgemv_strided_batched`|6.0.0| | | | |
|`cublasHSHgemvStridedBatched_64`|12.0| | | | | | | | | |
|`cublasHSSgemvBatched`|11.6| | | |`rocblas_hssgemv_batched`|6.0.0| | | | |
|`cublasHSSgemvBatched_64`|12.0| | | | | | | | | |
|`cublasHSSgemvBatched_64`|12.0| | | |`rocblas_hssgemv_batched_64`|6.2.0| | | | |
|`cublasHSSgemvStridedBatched`|11.6| | | |`rocblas_hssgemv_strided_batched`|6.0.0| | | | |
|`cublasHSSgemvStridedBatched_64`|12.0| | | | | | | | | |
|`cublasHgemm`|7.5| | | |`rocblas_hgemm`|1.5.0| | | | |
Expand All @@ -1133,8 +1133,8 @@
|`cublasSgemm_64`|12.0| | | | | | | | | |
|`cublasSgemm_v2`| | | | |`rocblas_sgemm`|1.5.0| | | | |
|`cublasSgemm_v2_64`|12.0| | | | | | | | | |
|`cublasSgemvBatched`|11.6| | | | | | | | | |
|`cublasSgemvBatched_64`|12.0| | | | | | | | | |
|`cublasSgemvBatched`|11.6| | | |`rocblas_sgemv_batched`|3.5.0| | | | |
|`cublasSgemvBatched_64`|12.0| | | |`rocblas_sgemv_batched_64`|6.2.0| | | | |
|`cublasSgemvStridedBatched`|11.6| | | | | | | | | |
|`cublasSgemvStridedBatched_64`|12.0| | | | | | | | | |
|`cublasSsymm`| | | | |`rocblas_ssymm`|3.5.0| | | | |
Expand All @@ -1160,11 +1160,11 @@
|`cublasStrsm_v2`| | | | |`rocblas_strsm`|1.5.0| | | | |
|`cublasStrsm_v2_64`|12.0| | | | | | | | | |
|`cublasTSSgemvBatched`|11.6| | | |`rocblas_tssgemv_batched`|6.0.0| | | | |
|`cublasTSSgemvBatched_64`|12.0| | | | | | | | | |
|`cublasTSSgemvBatched_64`|12.0| | | |`rocblas_tssgemv_batched_64`|6.2.0| | | | |
|`cublasTSSgemvStridedBatched`|11.6| | | |`rocblas_tssgemv_strided_batched`|6.0.0| | | | |
|`cublasTSSgemvStridedBatched_64`|12.0| | | | | | | | | |
|`cublasTSTgemvBatched`|11.6| | | |`rocblas_tstgemv_batched`|6.0.0| | | | |
|`cublasTSTgemvBatched_64`|12.0| | | | | | | | | |
|`cublasTSTgemvBatched_64`|12.0| | | |`rocblas_tstgemv_batched_64`|6.2.0| | | | |
|`cublasTSTgemvStridedBatched`|11.6| | | |`rocblas_tstgemv_strided_batched`|6.0.0| | | | |
|`cublasTSTgemvStridedBatched_64`|12.0| | | | | | | | | |
|`cublasZgemm`| | | | |`rocblas_zgemm`|1.5.0| | | | |
Expand All @@ -1178,7 +1178,7 @@
|`cublasZgemm_v2`| | | | |`rocblas_zgemm`|1.5.0| | | | |
|`cublasZgemm_v2_64`|12.0| | | | | | | | | |
|`cublasZgemvBatched`|11.6| | | |`rocblas_zgemv_batched`|3.5.0| | | | |
|`cublasZgemvBatched_64`|12.0| | | | | | | | | |
|`cublasZgemvBatched_64`|12.0| | | |`rocblas_zgemv_batched_64`|6.2.0| | | | |
|`cublasZgemvStridedBatched`|11.6| | | |`rocblas_zgemv_strided_batched`|3.5.0| | | | |
|`cublasZgemvStridedBatched_64`|12.0| | | | | | | | | |
|`cublasZhemm`| | | | |`rocblas_zhemm`|3.5.0| | | | |
Expand Down
Loading

0 comments on commit 2178f18

Please sign in to comment.