Skip to content

Commit

Permalink
[HIPIFY][6.0.0][hipSPARSE][tests][fix] Support for ROCm HIP 6.0.0 - S…
Browse files Browse the repository at this point in the history
…tep 28 - hipSPARSE

+ Updated synthetic tests and the regenerated hipify-perl and SPARSE docs
+ [fix] Added missing APIs

[TODO]
+ Mark as `C-Changed` in CUDA 12000:
 `cusparseSpMM_preprocess`,
 `cusparseSpMM`,
 `cusparseSpGEMM_workEstimation`,
 `cusparseSpGEMM_compute`,
 `cusparseSpGEMM_copy`,
 `cusparseSpGEMMreuse_workEstimation`,
  • Loading branch information
emankov committed Oct 27, 2023
1 parent 4798ed6 commit 2d8b44e
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -3886,6 +3886,7 @@ sub simpleSubstitutions {
subst("cusparseSpGEMM_createDescr", "hipsparseSpGEMM_createDescr", "library");
subst("cusparseSpGEMM_destroyDescr", "hipsparseSpGEMM_destroyDescr", "library");
subst("cusparseSpGEMM_workEstimation", "hipsparseSpGEMM_workEstimation", "library");
subst("cusparseSpGEMMreuse_workEstimation", "hipsparseSpGEMMreuse_workEstimation", "library");
subst("cusparseSpMM", "hipsparseSpMM", "library");
subst("cusparseSpMM_bufferSize", "hipsparseSpMM_bufferSize", "library");
subst("cusparseSpMM_preprocess", "hipsparseSpMM_preprocess", "library");
Expand Down Expand Up @@ -6829,7 +6830,6 @@ sub warnUnsupportedFunctions {
"cusparseSpMMOpPlan",
"cusparseSpMMOpAlg_t",
"cusparseSpMMOp",
"cusparseSpGEMMreuse_workEstimation",
"cusparseSpGEMMreuse_nnz",
"cusparseSpGEMMreuse_copy",
"cusparseSpGEMMreuse_compute",
Expand Down
4 changes: 2 additions & 2 deletions docs/tables/CUSPARSE_API_supported_by_HIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -869,11 +869,11 @@
|`cusparseSpGEMM_destroyDescr`|11.0| | |`hipsparseSpGEMM_destroyDescr`|4.1.0| | | | |
|`cusparseSpGEMM_estimateMemory`|12.0| | | | | | | | |
|`cusparseSpGEMM_getNumProducts`|12.0| | | | | | | | |
|`cusparseSpGEMM_workEstimation`| | | |`hipsparseSpGEMM_workEstimation`|4.1.0| | | | |
|`cusparseSpGEMM_workEstimation`|11.0| | |`hipsparseSpGEMM_workEstimation`|4.1.0| | | | |
|`cusparseSpGEMMreuse_compute`|11.3| | | | | | | | |
|`cusparseSpGEMMreuse_copy`|11.3| | | | | | | | |
|`cusparseSpGEMMreuse_nnz`|11.3| | | | | | | | |
|`cusparseSpGEMMreuse_workEstimation`|11.3| | | | | | | | |
|`cusparseSpGEMMreuse_workEstimation`|11.3| | |`hipsparseSpGEMMreuse_workEstimation`|5.1.0| | | | |
|`cusparseSpMM`|10.1| | |`hipsparseSpMM`|4.2.0| | | | |
|`cusparseSpMMOp`|11.5| | | | | | | | |
|`cusparseSpMMOp_createPlan`|11.5| | | | | | | | |
Expand Down
4 changes: 2 additions & 2 deletions docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -869,11 +869,11 @@
|`cusparseSpGEMM_destroyDescr`|11.0| | |`hipsparseSpGEMM_destroyDescr`|4.1.0| | | | | | | | | | |
|`cusparseSpGEMM_estimateMemory`|12.0| | | | | | | | | | | | | | |
|`cusparseSpGEMM_getNumProducts`|12.0| | | | | | | | | | | | | | |
|`cusparseSpGEMM_workEstimation`| | | |`hipsparseSpGEMM_workEstimation`|4.1.0| | | | | | | | | | |
|`cusparseSpGEMM_workEstimation`|11.0| | |`hipsparseSpGEMM_workEstimation`|4.1.0| | | | | | | | | | |
|`cusparseSpGEMMreuse_compute`|11.3| | | | | | | | | | | | | | |
|`cusparseSpGEMMreuse_copy`|11.3| | | | | | | | | | | | | | |
|`cusparseSpGEMMreuse_nnz`|11.3| | | | | | | | | | | | | | |
|`cusparseSpGEMMreuse_workEstimation`|11.3| | | | | | | | | | | | | | |
|`cusparseSpGEMMreuse_workEstimation`|11.3| | |`hipsparseSpGEMMreuse_workEstimation`|5.1.0| | | | | | | | | | |
|`cusparseSpMM`|10.1| | |`hipsparseSpMM`|4.2.0| | | | | | | | | | |
|`cusparseSpMMOp`|11.5| | | | | | | | | | | | | | |
|`cusparseSpMMOp_createPlan`|11.5| | | | | | | | | | | | | | |
Expand Down
2 changes: 1 addition & 1 deletion docs/tables/CUSPARSE_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@
|`cusparseSpGEMM_destroyDescr`|11.0| | | | | | | | |
|`cusparseSpGEMM_estimateMemory`|12.0| | | | | | | | |
|`cusparseSpGEMM_getNumProducts`|12.0| | | | | | | | |
|`cusparseSpGEMM_workEstimation`| | | | | | | | | |
|`cusparseSpGEMM_workEstimation`|11.0| | | | | | | | |
|`cusparseSpGEMMreuse_compute`|11.3| | | | | | | | |
|`cusparseSpGEMMreuse_copy`|11.3| | | | | | | | |
|`cusparseSpGEMMreuse_nnz`|11.3| | | | | | | | |
Expand Down
4 changes: 3 additions & 1 deletion src/CUDA2HIP_SPARSE_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SPARSE_FUNCTION_MAP {
{"cusparseSpSM_solve", {"hipsparseSpSM_solve", "", CONV_LIB_FUNC, API_SPARSE, 15, ROC_UNSUPPORTED}},

// Sparse Matrix Multiplication (SpGEMM) Structure Reuse
{"cusparseSpGEMMreuse_workEstimation", {"hipsparseSpGEMMreuse_workEstimation", "", CONV_LIB_FUNC, API_SPARSE, 15, UNSUPPORTED}},
{"cusparseSpGEMMreuse_workEstimation", {"hipsparseSpGEMMreuse_workEstimation", "", CONV_LIB_FUNC, API_SPARSE, 15, ROC_UNSUPPORTED}},
{"cusparseSpGEMMreuse_nnz", {"hipsparseSpGEMMreuse_nnz", "", CONV_LIB_FUNC, API_SPARSE, 15, UNSUPPORTED}},
{"cusparseSpGEMMreuse_copy", {"hipsparseSpGEMMreuse_copy", "", CONV_LIB_FUNC, API_SPARSE, 15, UNSUPPORTED}},
{"cusparseSpGEMMreuse_compute", {"hipsparseSpGEMMreuse_compute", "", CONV_LIB_FUNC, API_SPARSE, 15, UNSUPPORTED}},
Expand Down Expand Up @@ -1194,6 +1194,7 @@ const std::map<llvm::StringRef, cudaAPIversions> CUDA_SPARSE_FUNCTION_VER_MAP {
{"cusparseSpGEMM_destroyDescr", {CUDA_110, CUDA_0, CUDA_0 }},
{"cusparseSpGEMM_compute", {CUDA_110, CUDA_0, CUDA_0 }},
{"cusparseSpGEMM_copy", {CUDA_110, CUDA_0, CUDA_0 }},
{"cusparseSpGEMM_workEstimation", {CUDA_110, CUDA_0, CUDA_0 }},
{"cusparseConstrainedGeMM", {CUDA_102, CUDA_112, CUDA_120}},
{"cusparseConstrainedGeMM_bufferSize", {CUDA_102, CUDA_112, CUDA_120}},
{"cusparseSdense2csr", {CUDA_0, CUDA_111, CUDA_120}},
Expand Down Expand Up @@ -1954,6 +1955,7 @@ const std::map<llvm::StringRef, hipAPIversions> HIP_SPARSE_FUNCTION_VER_MAP {
{"hipsparseDgpsvInterleavedBatch", {HIP_5010, HIP_0, HIP_0 }},
{"hipsparseCgpsvInterleavedBatch", {HIP_5010, HIP_0, HIP_0 }},
{"hipsparseZgpsvInterleavedBatch", {HIP_5010, HIP_0, HIP_0 }},
{"hipsparseSpGEMMreuse_workEstimation", {HIP_5010, HIP_0, HIP_0 }},
{"hipsparseSpMatGetStridedBatch", {HIP_5020, HIP_0, HIP_0 }},
{"hipsparseSpMatSetStridedBatch", {HIP_5020, HIP_0, HIP_0 }},
{"hipsparseCooSetStridedBatch", {HIP_5020, HIP_0, HIP_0 }},
Expand Down
Loading

0 comments on commit 2d8b44e

Please sign in to comment.