Skip to content

Commit

Permalink
[HIPIFY][ROCm#674][rocSPARSE][feature] rocSPARSE support - Step 91 - …
Browse files Browse the repository at this point in the history
…functions `rocsparse_(s|d|c|z)csrgeam`

+ Created a synthetic test `cusparse2rocsparse_10000.cu` for rocSPARSE APIs with args transformations, which are used in CUDA >= 10.0 (FileCheck tool limitation)
+ Updated `SPARSE` synthetic tests, the regenerated hipify-perl, and `SPARSE` `CUDA2HIP` documentation
+ [TODO] Fix the bug with the deletion of the last argument (`e_remove_argument`), which leads to an app crash in `cusparse2rocsparse_10000.cu`
  • Loading branch information
emankov committed Jan 6, 2024
1 parent 72da697 commit 6e0f334
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 13 deletions.
4 changes: 4 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -2283,6 +2283,7 @@ sub rocSubstitutions {
subst("cusparseCcsr2hyb", "rocsparse_ccsr2hyb", "library");
subst("cusparseCcsrcolor", "rocsparse_ccsrcolor", "library");
subst("cusparseCcsrgeam", "rocsparse_ccsrgeam", "library");
subst("cusparseCcsrgeam2", "rocsparse_ccsrgeam", "library");
subst("cusparseCcsrgemm2_bufferSizeExt", "rocsparse_ccsrgemm_buffer_size", "library");
subst("cusparseCcsric02", "rocsparse_ccsric0", "library");
subst("cusparseCcsric02_analysis", "rocsparse_ccsric0_analysis", "library");
Expand Down Expand Up @@ -2404,6 +2405,7 @@ sub rocSubstitutions {
subst("cusparseDcsr2hyb", "rocsparse_dcsr2hyb", "library");
subst("cusparseDcsrcolor", "rocsparse_dcsrcolor", "library");
subst("cusparseDcsrgeam", "rocsparse_dcsrgeam", "library");
subst("cusparseDcsrgeam2", "rocsparse_dcsrgeam", "library");
subst("cusparseDcsrgemm2_bufferSizeExt", "rocsparse_dcsrgemm_buffer_size", "library");
subst("cusparseDcsric02", "rocsparse_dcsric0", "library");
subst("cusparseDcsric02_analysis", "rocsparse_dcsric0_analysis", "library");
Expand Down Expand Up @@ -2528,6 +2530,7 @@ sub rocSubstitutions {
subst("cusparseScsr2hyb", "rocsparse_scsr2hyb", "library");
subst("cusparseScsrcolor", "rocsparse_scsrcolor", "library");
subst("cusparseScsrgeam", "rocsparse_scsrgeam", "library");
subst("cusparseScsrgeam2", "rocsparse_scsrgeam", "library");
subst("cusparseScsrgemm2_bufferSizeExt", "rocsparse_scsrgemm_buffer_size", "library");
subst("cusparseScsric02", "rocsparse_scsric0", "library");
subst("cusparseScsric02_analysis", "rocsparse_scsric0_analysis", "library");
Expand Down Expand Up @@ -2653,6 +2656,7 @@ sub rocSubstitutions {
subst("cusparseZcsr2hyb", "rocsparse_zcsr2hyb", "library");
subst("cusparseZcsrcolor", "rocsparse_zcsrcolor", "library");
subst("cusparseZcsrgeam", "rocsparse_zcsrgeam", "library");
subst("cusparseZcsrgeam2", "rocsparse_zcsrgeam", "library");
subst("cusparseZcsrgemm2_bufferSizeExt", "rocsparse_zcsrgemm_buffer_size", "library");
subst("cusparseZcsric02", "rocsparse_zcsric0", "library");
subst("cusparseZcsric02_analysis", "rocsparse_zcsric0_analysis", "library");
Expand Down
8 changes: 4 additions & 4 deletions docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,19 +439,19 @@
|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
|`cusparseCcsrgeam`| |10.2| |11.0|`hipsparseCcsrgeam`|3.5.0| | | | |`rocsparse_ccsrgeam`|3.5.0| | | | |
|`cusparseCcsrgeam2`|10.0| | | |`hipsparseCcsrgeam2`|3.5.0| | | | | | | | | | |
|`cusparseCcsrgeam2`|10.0| | | |`hipsparseCcsrgeam2`|3.5.0| | | | |`rocsparse_ccsrgeam`|3.5.0| | | | |
|`cusparseCcsrgeam2_bufferSizeExt`|10.0| | | |`hipsparseCcsrgeam2_bufferSizeExt`|3.5.0| | | | | | | | | | |
|`cusparseCcsrgemm`| |10.2| |11.0|`hipsparseCcsrgemm`|3.1.0| | | | | | | | | | |
|`cusparseCcsrgemm2`| |11.0| |12.0|`hipsparseCcsrgemm2`|3.1.0| | | | | | | | | | |
|`cusparseCcsrgemm2_bufferSizeExt`| |11.0| |12.0|`hipsparseCcsrgemm2_bufferSizeExt`|3.1.0| | | | |`rocsparse_ccsrgemm_buffer_size`|2.8.0| | | | |
|`cusparseDcsrgeam`| |10.2| |11.0|`hipsparseDcsrgeam`|3.5.0| | | | |`rocsparse_dcsrgeam`|3.5.0| | | | |
|`cusparseDcsrgeam2`|10.0| | | |`hipsparseDcsrgeam2`|3.5.0| | | | | | | | | | |
|`cusparseDcsrgeam2`|10.0| | | |`hipsparseDcsrgeam2`|3.5.0| | | | |`rocsparse_dcsrgeam`|3.5.0| | | | |
|`cusparseDcsrgeam2_bufferSizeExt`|10.0| | | |`hipsparseDcsrgeam2_bufferSizeExt`|3.5.0| | | | | | | | | | |
|`cusparseDcsrgemm`| |10.2| |11.0|`hipsparseDcsrgemm`|2.8.0| | | | | | | | | | |
|`cusparseDcsrgemm2`| |11.0| |12.0|`hipsparseDcsrgemm2`|2.8.0| | | | | | | | | | |
|`cusparseDcsrgemm2_bufferSizeExt`| |11.0| |12.0|`hipsparseDcsrgemm2_bufferSizeExt`|2.8.0| | | | |`rocsparse_dcsrgemm_buffer_size`|2.8.0| | | | |
|`cusparseScsrgeam`| |10.2| |11.0|`hipsparseScsrgeam`|3.5.0| | | | |`rocsparse_scsrgeam`|3.5.0| | | | |
|`cusparseScsrgeam2`|10.0| | | |`hipsparseScsrgeam2`|3.5.0| | | | | | | | | | |
|`cusparseScsrgeam2`|10.0| | | |`hipsparseScsrgeam2`|3.5.0| | | | |`rocsparse_scsrgeam`|3.5.0| | | | |
|`cusparseScsrgeam2_bufferSizeExt`|10.0| | | |`hipsparseScsrgeam2_bufferSizeExt`|3.5.0| | | | | | | | | | |
|`cusparseScsrgemm`| |10.2| |11.0|`hipsparseScsrgemm`|2.8.0| | | | | | | | | | |
|`cusparseScsrgemm2`| |11.0| |12.0|`hipsparseScsrgemm2`|2.8.0| | | | | | | | | | |
Expand All @@ -461,7 +461,7 @@
|`cusparseXcsrgemm2Nnz`| |11.0| |12.0|`hipsparseXcsrgemm2Nnz`|2.8.0| | | | |`rocsparse_csrgemm_nnz`|2.8.0| | | | |
|`cusparseXcsrgemmNnz`| |10.2| |11.0|`hipsparseXcsrgemmNnz`|2.8.0| | | | | | | | | | |
|`cusparseZcsrgeam`| |10.2| |11.0|`hipsparseZcsrgeam`|3.5.0| | | | |`rocsparse_zcsrgeam`|3.5.0| | | | |
|`cusparseZcsrgeam2`|10.0| | | |`hipsparseZcsrgeam2`|3.5.0| | | | | | | | | | |
|`cusparseZcsrgeam2`|10.0| | | |`hipsparseZcsrgeam2`|3.5.0| | | | |`rocsparse_zcsrgeam`|3.5.0| | | | |
|`cusparseZcsrgeam2_bufferSizeExt`|10.0| | | |`hipsparseZcsrgeam2_bufferSizeExt`|3.5.0| | | | | | | | | | |
|`cusparseZcsrgemm`| |10.2| |11.0|`hipsparseZcsrgemm`|3.1.0| | | | | | | | | | |
|`cusparseZcsrgemm2`| |11.0| |12.0|`hipsparseZcsrgemm2`|3.1.0| | | | | | | | | | |
Expand Down
8 changes: 4 additions & 4 deletions docs/tables/CUSPARSE_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,19 +439,19 @@
|**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
|`cusparseCcsrgeam`| |10.2| |11.0|`rocsparse_ccsrgeam`|3.5.0| | | | |
|`cusparseCcsrgeam2`|10.0| | | | | | | | | |
|`cusparseCcsrgeam2`|10.0| | | |`rocsparse_ccsrgeam`|3.5.0| | | | |
|`cusparseCcsrgeam2_bufferSizeExt`|10.0| | | | | | | | | |
|`cusparseCcsrgemm`| |10.2| |11.0| | | | | | |
|`cusparseCcsrgemm2`| |11.0| |12.0| | | | | | |
|`cusparseCcsrgemm2_bufferSizeExt`| |11.0| |12.0|`rocsparse_ccsrgemm_buffer_size`|2.8.0| | | | |
|`cusparseDcsrgeam`| |10.2| |11.0|`rocsparse_dcsrgeam`|3.5.0| | | | |
|`cusparseDcsrgeam2`|10.0| | | | | | | | | |
|`cusparseDcsrgeam2`|10.0| | | |`rocsparse_dcsrgeam`|3.5.0| | | | |
|`cusparseDcsrgeam2_bufferSizeExt`|10.0| | | | | | | | | |
|`cusparseDcsrgemm`| |10.2| |11.0| | | | | | |
|`cusparseDcsrgemm2`| |11.0| |12.0| | | | | | |
|`cusparseDcsrgemm2_bufferSizeExt`| |11.0| |12.0|`rocsparse_dcsrgemm_buffer_size`|2.8.0| | | | |
|`cusparseScsrgeam`| |10.2| |11.0|`rocsparse_scsrgeam`|3.5.0| | | | |
|`cusparseScsrgeam2`|10.0| | | | | | | | | |
|`cusparseScsrgeam2`|10.0| | | |`rocsparse_scsrgeam`|3.5.0| | | | |
|`cusparseScsrgeam2_bufferSizeExt`|10.0| | | | | | | | | |
|`cusparseScsrgemm`| |10.2| |11.0| | | | | | |
|`cusparseScsrgemm2`| |11.0| |12.0| | | | | | |
Expand All @@ -461,7 +461,7 @@
|`cusparseXcsrgemm2Nnz`| |11.0| |12.0|`rocsparse_csrgemm_nnz`|2.8.0| | | | |
|`cusparseXcsrgemmNnz`| |10.2| |11.0| | | | | | |
|`cusparseZcsrgeam`| |10.2| |11.0|`rocsparse_zcsrgeam`|3.5.0| | | | |
|`cusparseZcsrgeam2`|10.0| | | | | | | | | |
|`cusparseZcsrgeam2`|10.0| | | |`rocsparse_zcsrgeam`|3.5.0| | | | |
|`cusparseZcsrgeam2_bufferSizeExt`|10.0| | | | | | | | | |
|`cusparseZcsrgemm`| |10.2| |11.0| | | | | | |
|`cusparseZcsrgemm2`| |11.0| |12.0| | | | | | |
Expand Down
8 changes: 4 additions & 4 deletions src/CUDA2HIP_SPARSE_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SPARSE_FUNCTION_MAP {
{"cusparseZcsrgeam", {"hipsparseZcsrgeam", "rocsparse_zcsrgeam", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseXcsrgeamNnz", {"hipsparseXcsrgeamNnz", "rocsparse_csrgeam_nnz", CONV_LIB_FUNC, API_SPARSE, 11, CUDA_DEPRECATED | CUDA_REMOVED}},

{"cusparseScsrgeam2", {"hipsparseScsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED}},
{"cusparseDcsrgeam2", {"hipsparseDcsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED}},
{"cusparseCcsrgeam2", {"hipsparseCcsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED}},
{"cusparseZcsrgeam2", {"hipsparseZcsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED}},
{"cusparseScsrgeam2", {"hipsparseScsrgeam2", "rocsparse_scsrgeam", CONV_LIB_FUNC, API_SPARSE, 11}},
{"cusparseDcsrgeam2", {"hipsparseDcsrgeam2", "rocsparse_dcsrgeam", CONV_LIB_FUNC, API_SPARSE, 11}},
{"cusparseCcsrgeam2", {"hipsparseCcsrgeam2", "rocsparse_ccsrgeam", CONV_LIB_FUNC, API_SPARSE, 11}},
{"cusparseZcsrgeam2", {"hipsparseZcsrgeam2", "rocsparse_zcsrgeam", CONV_LIB_FUNC, API_SPARSE, 11}},
{"cusparseXcsrgeam2Nnz", {"hipsparseXcsrgeam2Nnz", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED}},

{"cusparseScsrgeam2_bufferSizeExt", {"hipsparseScsrgeam2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 11, ROC_UNSUPPORTED}},
Expand Down
46 changes: 45 additions & 1 deletion src/HipifyAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ const std::string sCusparseZcsrmm = "cusparseZcsrmm";
const std::string sCusparseCcsrmm = "cusparseCcsrmm";
const std::string sCusparseDcsrmm = "cusparseDcsrmm";
const std::string sCusparseScsrmm = "cusparseScsrmm";
const std::string sCusparseZcsrgeam2 = "cusparseZcsrgeam2";
const std::string sCusparseCcsrgeam2 = "cusparseCcsrgeam2";
const std::string sCusparseDcsrgeam2 = "cusparseDcsrgeam2";
const std::string sCusparseScsrgeam2 = "cusparseScsrgeam2";

// CUDA_OVERLOADED
const std::string sCudaEventCreate = "cudaEventCreate";
Expand Down Expand Up @@ -1375,6 +1379,42 @@ std::map<std::string, ArgCastStruct> FuncArgCasts {
false
}
},
{sCusparseZcsrgeam2,
{
{
{19, {e_remove_argument, cw_None}}
},
true,
false
}
},
{sCusparseCcsrgeam2,
{
{
{19, {e_remove_argument, cw_None}}
},
true,
false
}
},
{sCusparseDcsrgeam2,
{
{
{19, {e_remove_argument, cw_None}}
},
true,
false
}
},
{sCusparseScsrgeam2,
{
{
{19, {e_remove_argument, cw_None}}
},
true,
false
}
},
};

void HipifyAction::RewriteString(StringRef s, clang::SourceLocation start) {
Expand Down Expand Up @@ -2186,7 +2226,11 @@ std::unique_ptr<clang::ASTConsumer> HipifyAction::CreateASTConsumer(clang::Compi
sCusparseZcsrmm,
sCusparseCcsrmm,
sCusparseDcsrmm,
sCusparseScsrmm
sCusparseScsrmm,
sCusparseZcsrgeam2,
sCusparseCcsrgeam2,
sCusparseDcsrgeam2,
sCusparseScsrgeam2
)
)
)
Expand Down
1 change: 1 addition & 0 deletions tests/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ if config.cuda_version_major < 10:
config.excludes.append('cuSPARSE_10.cu')
config.excludes.append('cuSPARSE_11.cu')
config.excludes.append('simple_mechs.cu')
config.excludes.append('cusparse2rocsparse_10000.cu')

if config.cuda_version_major > 10:
clang_arguments += " -DTHRUST_IGNORE_CUB_VERSION_CHECK"
Expand Down
22 changes: 22 additions & 0 deletions tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1768,6 +1768,28 @@ int main() {
#endif
#endif

#if CUDA_VERSION >= 10000
// CUDA: cusparseStatus_t CUSPARSEAPI cusparseZcsrgeam2(cusparseHandle_t handle, int m, int n, const cuDoubleComplex* alpha, const cusparseMatDescr_t descrA, int nnzA, const cuDoubleComplex* csrSortedValA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const cuDoubleComplex* beta, const cusparseMatDescr_t descrB, int nnzB, const cuDoubleComplex* csrSortedValB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const cusparseMatDescr_t descrC, cuDoubleComplex* csrSortedValC, int* csrSortedRowPtrC, int* csrSortedColIndC, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseZcsrgeam2(hipsparseHandle_t handle, int m, int n, const hipDoubleComplex* alpha, const hipsparseMatDescr_t descrA, int nnzA, const hipDoubleComplex* csrSortedValA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const hipDoubleComplex* beta, const hipsparseMatDescr_t descrB, int nnzB, const hipDoubleComplex* csrSortedValB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const hipsparseMatDescr_t descrC, hipDoubleComplex* csrSortedValC, int* csrSortedRowPtrC, int* csrSortedColIndC, void* pBuffer);
// CHECK: status_t = hipsparseZcsrgeam2(handle_t, m, n, &dcomplexA, matDescr_A, nnza, &dComplexcsrSortedValA, &csrRowPtrA, &csrColIndA, &dcomplexB, matDescr_B, nnzb, &dComplexcsrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &dComplexcsrSortedValC, &csrRowPtrC, &csrColIndC, pBuffer);
status_t = cusparseZcsrgeam2(handle_t, m, n, &dcomplexA, matDescr_A, nnza, &dComplexcsrSortedValA, &csrRowPtrA, &csrColIndA, &dcomplexB, matDescr_B, nnzb, &dComplexcsrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &dComplexcsrSortedValC, &csrRowPtrC, &csrColIndC, pBuffer);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseCcsrgeam2(cusparseHandle_t handle, int m, int n, const cuComplex* alpha, const cusparseMatDescr_t descrA, int nnzA, const cuComplex* csrSortedValA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const cuComplex* beta, const cusparseMatDescr_t descrB, int nnzB, const cuComplex* csrSortedValB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const cusparseMatDescr_t descrC, cuComplex* csrSortedValC, int* csrSortedRowPtrC, int* csrSortedColIndC, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseCcsrgeam2(hipsparseHandle_t handle, int m, int n, const hipComplex* alpha, const hipsparseMatDescr_t descrA, int nnzA, const hipComplex* csrSortedValA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const hipComplex* beta, const hipsparseMatDescr_t descrB, int nnzB, const hipComplex* csrSortedValB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const hipsparseMatDescr_t descrC, hipComplex* csrSortedValC, int* csrSortedRowPtrC, int* csrSortedColIndC, void* pBuffer);
// CHECK: status_t = hipsparseCcsrgeam2(handle_t, m, n, &complexA, matDescr_A, nnza, &complexcsrSortedValA, &csrRowPtrA, &csrColIndA, &complexB, matDescr_B, nnzb, &complexcsrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &complexcsrSortedValC, &csrRowPtrC, &csrColIndC, pBuffer);
status_t = cusparseCcsrgeam2(handle_t, m, n, &complexA, matDescr_A, nnza, &complexcsrSortedValA, &csrRowPtrA, &csrColIndA, &complexB, matDescr_B, nnzb, &complexcsrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &complexcsrSortedValC, &csrRowPtrC, &csrColIndC, pBuffer);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseDcsrgeam2(cusparseHandle_t handle, int m, int n, const double* alpha, const cusparseMatDescr_t descrA, int nnzA, const double* csrSortedValA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const double* beta, const cusparseMatDescr_t descrB, int nnzB, const double* csrSortedValB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const cusparseMatDescr_t descrC, double* csrSortedValC, int* csrSortedRowPtrC, int* csrSortedColIndC, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseDcsrgeam2(hipsparseHandle_t handle, int m, int n, const double* alpha, const hipsparseMatDescr_t descrA, int nnzA, const double* csrSortedValA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const double* beta, const hipsparseMatDescr_t descrB, int nnzB, const double* csrSortedValB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const hipsparseMatDescr_t descrC, double* csrSortedValC, int* csrSortedRowPtrC, int* csrSortedColIndC, void* pBuffer);
// CHECK: status_t = hipsparseDcsrgeam2(handle_t, m, n, &dA, matDescr_A, nnza, &dcsrSortedValA, &csrRowPtrA, &csrColIndA, &dB, matDescr_B, nnzb, &dcsrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &dcsrSortedValC, &csrRowPtrC, &csrColIndC, pBuffer);
status_t = cusparseDcsrgeam2(handle_t, m, n, &dA, matDescr_A, nnza, &dcsrSortedValA, &csrRowPtrA, &csrColIndA, &dB, matDescr_B, nnzb, &dcsrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &dcsrSortedValC, &csrRowPtrC, &csrColIndC, pBuffer);

// CUDA: cusparseStatus_t CUSPARSEAPI cusparseScsrgeam2(cusparseHandle_t handle, int m, int n, const float* alpha, const cusparseMatDescr_t descrA, int nnzA, const float* csrSortedValA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const float* beta, const cusparseMatDescr_t descrB, int nnzB, const float* csrSortedValB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const cusparseMatDescr_t descrC, float* csrSortedValC, int* csrSortedRowPtrC, int* csrSortedColIndC, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseScsrgeam2(hipsparseHandle_t handle, int m, int n, const float* alpha, const hipsparseMatDescr_t descrA, int nnzA, const float* csrSortedValA, const int* csrSortedRowPtrA, const int* csrSortedColIndA, const float* beta, const hipsparseMatDescr_t descrB, int nnzB, const float* csrSortedValB, const int* csrSortedRowPtrB, const int* csrSortedColIndB, const hipsparseMatDescr_t descrC, float* csrSortedValC, int* csrSortedRowPtrC, int* csrSortedColIndC, void* pBuffer);
// CHECK: status_t = hipsparseScsrgeam2(handle_t, m, n, &fA, matDescr_A, nnza, &csrSortedValA, &csrRowPtrA, &csrColIndA, &fB, matDescr_B, nnzb, &csrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &csrSortedValC, &csrRowPtrC, &csrColIndC, pBuffer);
status_t = cusparseScsrgeam2(handle_t, m, n, &fA, matDescr_A, nnza, &csrSortedValA, &csrRowPtrA, &csrColIndA, &fB, matDescr_B, nnzb, &csrSortedValB, &csrRowPtrB, &csrColIndB, matDescr_C, &csrSortedValC, &csrRowPtrC, &csrColIndC, pBuffer);
#endif

#if CUDA_VERSION >= 10010
// CHECK: hipsparseCsr2CscAlg_t Csr2CscAlg_t;
// CHECK-NEXT: hipsparseCsr2CscAlg_t CSR2CSC_ALG1 = HIPSPARSE_CSR2CSC_ALG1;
Expand Down
Loading

0 comments on commit 6e0f334

Please sign in to comment.