Skip to content

Commit

Permalink
Merge pull request #1184 from emankov/HIPIFY
Browse files Browse the repository at this point in the history
[HIPIFY][#674][rocSPARSE][feature] rocSPARSE support - Step 69 - functions `rocsparse_(s|d|c|z)bsrsv_analysis`
  • Loading branch information
emankov authored Dec 5, 2023
2 parents 5698923 + ad3023f commit 2c0cf68
Show file tree
Hide file tree
Showing 7 changed files with 109 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 @@ -1886,6 +1886,7 @@ sub rocSubstitutions {
subst("cusparseCbsrsm2_analysis", "rocsparse_cbsrsm_analysis", "library");
subst("cusparseCbsrsm2_bufferSize", "rocsparse_cbsrsm_buffer_size", "library");
subst("cusparseCbsrsm2_solve", "rocsparse_cbsrsm_solve", "library");
subst("cusparseCbsrsv2_analysis", "rocsparse_cbsrsv_analysis", "library");
subst("cusparseCbsrsv2_solve", "rocsparse_cbsrsv_solve", "library");
subst("cusparseCcsc2dense", "rocsparse_ccsc2dense", "library");
subst("cusparseCcsr2bsr", "rocsparse_ccsr2bsr", "library");
Expand Down Expand Up @@ -1968,6 +1969,7 @@ sub rocSubstitutions {
subst("cusparseDbsrsm2_analysis", "rocsparse_dbsrsm_analysis", "library");
subst("cusparseDbsrsm2_bufferSize", "rocsparse_dbsrsm_buffer_size", "library");
subst("cusparseDbsrsm2_solve", "rocsparse_dbsrsm_solve", "library");
subst("cusparseDbsrsv2_analysis", "rocsparse_dbsrsv_analysis", "library");
subst("cusparseDbsrsv2_solve", "rocsparse_dbsrsv_solve", "library");
subst("cusparseDcsc2dense", "rocsparse_dcsc2dense", "library");
subst("cusparseDcsr2bsr", "rocsparse_dcsr2bsr", "library");
Expand Down Expand Up @@ -2068,6 +2070,7 @@ sub rocSubstitutions {
subst("cusparseSbsrsm2_analysis", "rocsparse_sbsrsm_analysis", "library");
subst("cusparseSbsrsm2_bufferSize", "rocsparse_sbsrsm_buffer_size", "library");
subst("cusparseSbsrsm2_solve", "rocsparse_sbsrsm_solve", "library");
subst("cusparseSbsrsv2_analysis", "rocsparse_sbsrsv_analysis", "library");
subst("cusparseSbsrsv2_solve", "rocsparse_sbsrsv_solve", "library");
subst("cusparseScatter", "rocsparse_scatter", "library");
subst("cusparseScsc2dense", "rocsparse_scsc2dense", "library");
Expand Down Expand Up @@ -2182,6 +2185,7 @@ sub rocSubstitutions {
subst("cusparseZbsrsm2_analysis", "rocsparse_zbsrsm_analysis", "library");
subst("cusparseZbsrsm2_bufferSize", "rocsparse_zbsrsm_buffer_size", "library");
subst("cusparseZbsrsm2_solve", "rocsparse_zbsrsm_solve", "library");
subst("cusparseZbsrsv2_analysis", "rocsparse_zbsrsv_analysis", "library");
subst("cusparseZbsrsv2_solve", "rocsparse_zbsrsv_solve", "library");
subst("cusparseZcsc2dense", "rocsparse_zcsc2dense", "library");
subst("cusparseZcsr2bsr", "rocsparse_zcsr2bsr", "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 @@ -293,7 +293,7 @@
|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
|`cusparseCbsrmv`| | | | |`hipsparseCbsrmv`|3.5.0| | | | | | | | | | |
|`cusparseCbsrsv2_analysis`| |12.2| | |`hipsparseCbsrsv2_analysis`|3.6.0| | | | | | | | | | |
|`cusparseCbsrsv2_analysis`| |12.2| | |`hipsparseCbsrsv2_analysis`|3.6.0| | | | |`rocsparse_cbsrsv_analysis`|3.6.0| | | | |
|`cusparseCbsrsv2_bufferSize`| |12.2| | |`hipsparseCbsrsv2_bufferSize`|3.6.0| | | | | | | | | | |
|`cusparseCbsrsv2_bufferSizeExt`| |12.2| | |`hipsparseCbsrsv2_bufferSizeExt`|3.6.0| | | | | | | | | | |
|`cusparseCbsrsv2_solve`| |12.2| | |`hipsparseCbsrsv2_solve`|3.6.0| | | | |`rocsparse_cbsrsv_solve`|3.6.0| | | | |
Expand All @@ -316,7 +316,7 @@
|`cusparseCsrsv_analysisEx`|8.0|10.2| |11.0| | | | | | | | | | | | |
|`cusparseCsrsv_solveEx`|8.0|10.2| |11.0| | | | | | | | | | | | |
|`cusparseDbsrmv`| | | | |`hipsparseDbsrmv`|3.5.0| | | | | | | | | | |
|`cusparseDbsrsv2_analysis`| |12.2| | |`hipsparseDbsrsv2_analysis`|3.6.0| | | | | | | | | | |
|`cusparseDbsrsv2_analysis`| |12.2| | |`hipsparseDbsrsv2_analysis`|3.6.0| | | | |`rocsparse_dbsrsv_analysis`|3.6.0| | | | |
|`cusparseDbsrsv2_bufferSize`| |12.2| | |`hipsparseDbsrsv2_bufferSize`|3.6.0| | | | | | | | | | |
|`cusparseDbsrsv2_bufferSizeExt`| |12.2| | |`hipsparseDbsrsv2_bufferSizeExt`|3.6.0| | | | | | | | | | |
|`cusparseDbsrsv2_solve`| |12.2| | |`hipsparseDbsrsv2_solve`|3.6.0| | | | |`rocsparse_dbsrsv_solve`|3.6.0| | | | |
Expand All @@ -335,7 +335,7 @@
|`cusparseDhybsv_analysis`| |10.2| |11.0| | | | | | | | | | | | |
|`cusparseDhybsv_solve`| |10.2| |11.0| | | | | | | | | | | | |
|`cusparseSbsrmv`| | | | |`hipsparseSbsrmv`|3.5.0| | | | | | | | | | |
|`cusparseSbsrsv2_analysis`| |12.2| | |`hipsparseSbsrsv2_analysis`|3.6.0| | | | | | | | | | |
|`cusparseSbsrsv2_analysis`| |12.2| | |`hipsparseSbsrsv2_analysis`|3.6.0| | | | |`rocsparse_sbsrsv_analysis`|3.6.0| | | | |
|`cusparseSbsrsv2_bufferSize`| |12.2| | |`hipsparseSbsrsv2_bufferSize`|3.6.0| | | | | | | | | | |
|`cusparseSbsrsv2_bufferSizeExt`| |12.2| | |`hipsparseSbsrsv2_bufferSizeExt`|3.6.0| | | | | | | | | | |
|`cusparseSbsrsv2_solve`| |12.2| | |`hipsparseSbsrsv2_solve`|3.6.0| | | | |`rocsparse_sbsrsv_solve`|3.6.0| | | | |
Expand All @@ -356,7 +356,7 @@
|`cusparseXbsrsv2_zeroPivot`| |12.2| | |`hipsparseXbsrsv2_zeroPivot`|3.6.0| | | | | | | | | | |
|`cusparseXcsrsv2_zeroPivot`| |11.3| |12.0|`hipsparseXcsrsv2_zeroPivot`|1.9.2| | | | |`rocsparse_csrsv_zero_pivot`|1.9.0| | | | |
|`cusparseZbsrmv`| | | | |`hipsparseZbsrmv`|3.5.0| | | | | | | | | | |
|`cusparseZbsrsv2_analysis`| |12.2| | |`hipsparseZbsrsv2_analysis`|3.6.0| | | | | | | | | | |
|`cusparseZbsrsv2_analysis`| |12.2| | |`hipsparseZbsrsv2_analysis`|3.6.0| | | | |`rocsparse_zbsrsv_analysis`|3.6.0| | | | |
|`cusparseZbsrsv2_bufferSize`| |12.2| | |`hipsparseZbsrsv2_bufferSize`|3.6.0| | | | | | | | | | |
|`cusparseZbsrsv2_bufferSizeExt`| |12.2| | |`hipsparseZbsrsv2_bufferSizeExt`|3.6.0| | | | | | | | | | |
|`cusparseZbsrsv2_solve`| |12.2| | |`hipsparseZbsrsv2_solve`|3.6.0| | | | |`rocsparse_zbsrsv_solve`|3.6.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 @@ -293,7 +293,7 @@
|**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
|`cusparseCbsrmv`| | | | | | | | | | |
|`cusparseCbsrsv2_analysis`| |12.2| | | | | | | | |
|`cusparseCbsrsv2_analysis`| |12.2| | |`rocsparse_cbsrsv_analysis`|3.6.0| | | | |
|`cusparseCbsrsv2_bufferSize`| |12.2| | | | | | | | |
|`cusparseCbsrsv2_bufferSizeExt`| |12.2| | | | | | | | |
|`cusparseCbsrsv2_solve`| |12.2| | |`rocsparse_cbsrsv_solve`|3.6.0| | | | |
Expand All @@ -316,7 +316,7 @@
|`cusparseCsrsv_analysisEx`|8.0|10.2| |11.0| | | | | | |
|`cusparseCsrsv_solveEx`|8.0|10.2| |11.0| | | | | | |
|`cusparseDbsrmv`| | | | | | | | | | |
|`cusparseDbsrsv2_analysis`| |12.2| | | | | | | | |
|`cusparseDbsrsv2_analysis`| |12.2| | |`rocsparse_dbsrsv_analysis`|3.6.0| | | | |
|`cusparseDbsrsv2_bufferSize`| |12.2| | | | | | | | |
|`cusparseDbsrsv2_bufferSizeExt`| |12.2| | | | | | | | |
|`cusparseDbsrsv2_solve`| |12.2| | |`rocsparse_dbsrsv_solve`|3.6.0| | | | |
Expand All @@ -335,7 +335,7 @@
|`cusparseDhybsv_analysis`| |10.2| |11.0| | | | | | |
|`cusparseDhybsv_solve`| |10.2| |11.0| | | | | | |
|`cusparseSbsrmv`| | | | | | | | | | |
|`cusparseSbsrsv2_analysis`| |12.2| | | | | | | | |
|`cusparseSbsrsv2_analysis`| |12.2| | |`rocsparse_sbsrsv_analysis`|3.6.0| | | | |
|`cusparseSbsrsv2_bufferSize`| |12.2| | | | | | | | |
|`cusparseSbsrsv2_bufferSizeExt`| |12.2| | | | | | | | |
|`cusparseSbsrsv2_solve`| |12.2| | |`rocsparse_sbsrsv_solve`|3.6.0| | | | |
Expand All @@ -356,7 +356,7 @@
|`cusparseXbsrsv2_zeroPivot`| |12.2| | | | | | | | |
|`cusparseXcsrsv2_zeroPivot`| |11.3| |12.0|`rocsparse_csrsv_zero_pivot`|1.9.0| | | | |
|`cusparseZbsrmv`| | | | | | | | | | |
|`cusparseZbsrsv2_analysis`| |12.2| | | | | | | | |
|`cusparseZbsrsv2_analysis`| |12.2| | |`rocsparse_zbsrsv_analysis`|3.6.0| | | | |
|`cusparseZbsrsv2_bufferSize`| |12.2| | | | | | | | |
|`cusparseZbsrsv2_bufferSizeExt`| |12.2| | | | | | | | |
|`cusparseZbsrsv2_solve`| |12.2| | |`rocsparse_zbsrsv_solve`|3.6.0| | | | |
Expand Down
12 changes: 8 additions & 4 deletions src/CUDA2HIP_SPARSE_API_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ const std::map<llvm::StringRef, hipCounter> CUDA_SPARSE_FUNCTION_MAP {
{"cusparseZbsrsv2_bufferSize", {"hipsparseZbsrsv2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, 9, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseZbsrsv2_bufferSizeExt", {"hipsparseZbsrsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 9, ROC_UNSUPPORTED | CUDA_DEPRECATED}},

{"cusparseSbsrsv2_analysis", {"hipsparseSbsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE, 9, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseDbsrsv2_analysis", {"hipsparseDbsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE, 9, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseCbsrsv2_analysis", {"hipsparseCbsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE, 9, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseZbsrsv2_analysis", {"hipsparseZbsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE, 9, ROC_UNSUPPORTED | CUDA_DEPRECATED}},
{"cusparseSbsrsv2_analysis", {"hipsparseSbsrsv2_analysis", "rocsparse_sbsrsv_analysis", CONV_LIB_FUNC, API_SPARSE, 9, CUDA_DEPRECATED}},
{"cusparseDbsrsv2_analysis", {"hipsparseDbsrsv2_analysis", "rocsparse_dbsrsv_analysis", CONV_LIB_FUNC, API_SPARSE, 9, CUDA_DEPRECATED}},
{"cusparseCbsrsv2_analysis", {"hipsparseCbsrsv2_analysis", "rocsparse_cbsrsv_analysis", CONV_LIB_FUNC, API_SPARSE, 9, CUDA_DEPRECATED}},
{"cusparseZbsrsv2_analysis", {"hipsparseZbsrsv2_analysis", "rocsparse_zbsrsv_analysis", CONV_LIB_FUNC, API_SPARSE, 9, CUDA_DEPRECATED}},

{"cusparseScsrsv_solve", {"hipsparseScsrsv_solve", "", CONV_LIB_FUNC, API_SPARSE, 9, UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}},
{"cusparseDcsrsv_solve", {"hipsparseDcsrsv_solve", "", CONV_LIB_FUNC, API_SPARSE, 9, UNSUPPORTED | CUDA_DEPRECATED | CUDA_REMOVED}},
Expand Down Expand Up @@ -2346,6 +2346,10 @@ const std::map<llvm::StringRef, hipAPIversions> HIP_SPARSE_FUNCTION_VER_MAP {
{"rocsparse_cbsrsv_solve", {HIP_3060, HIP_0, HIP_0 }},
{"rocsparse_dbsrsv_solve", {HIP_3060, HIP_0, HIP_0 }},
{"rocsparse_sbsrsv_solve", {HIP_3060, HIP_0, HIP_0 }},
{"rocsparse_zbsrsv_analysis", {HIP_3060, HIP_0, HIP_0 }},
{"rocsparse_cbsrsv_analysis", {HIP_3060, HIP_0, HIP_0 }},
{"rocsparse_dbsrsv_analysis", {HIP_3060, HIP_0, HIP_0 }},
{"rocsparse_sbsrsv_analysis", {HIP_3060, HIP_0, HIP_0 }},
};

const std::map<llvm::StringRef, cudaAPIChangedVersions> CUDA_SPARSE_FUNCTION_CHANGED_VER_MAP {
Expand Down
50 changes: 49 additions & 1 deletion src/HipifyAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ const std::string sCusparseZbsrsv2_solve = "cusparseZbsrsv2_solve";
const std::string sCusparseCbsrsv2_solve = "cusparseCbsrsv2_solve";
const std::string sCusparseDbsrsv2_solve = "cusparseDbsrsv2_solve";
const std::string sCusparseSbsrsv2_solve = "cusparseSbsrsv2_solve";
const std::string sCusparseSbsrsv2_analysis = "cusparseSbsrsv2_analysis";
const std::string sCusparseDbsrsv2_analysis = "cusparseDbsrsv2_analysis";
const std::string sCusparseCbsrsv2_analysis = "cusparseCbsrsv2_analysis";
const std::string sCusparseZbsrsv2_analysis = "cusparseZbsrsv2_analysis";

// CUDA_OVERLOADED
const std::string sCudaEventCreate = "cudaEventCreate";
Expand Down Expand Up @@ -1291,6 +1295,46 @@ std::map<std::string, ArgCastStruct> FuncArgCasts {
false
}
},
{sCusparseZbsrsv2_analysis,
{
{
{11, {e_replace_argument_with_const, cw_None, "rocsparse_analysis_policy_force"}},
{12, {e_add_const_argument, cw_None, "rocsparse_solve_policy_auto"}}
},
true,
false
}
},
{sCusparseCbsrsv2_analysis,
{
{
{11, {e_replace_argument_with_const, cw_None, "rocsparse_analysis_policy_force"}},
{12, {e_add_const_argument, cw_None, "rocsparse_solve_policy_auto"}}
},
true,
false
}
},
{sCusparseDbsrsv2_analysis,
{
{
{11, {e_replace_argument_with_const, cw_None, "rocsparse_analysis_policy_force"}},
{12, {e_add_const_argument, cw_None, "rocsparse_solve_policy_auto"}}
},
true,
false
}
},
{sCusparseSbsrsv2_analysis,
{
{
{11, {e_replace_argument_with_const, cw_None, "rocsparse_analysis_policy_force"}},
{12, {e_add_const_argument, cw_None, "rocsparse_solve_policy_auto"}}
},
true,
false
}
},
};

void HipifyAction::RewriteString(StringRef s, clang::SourceLocation start) {
Expand Down Expand Up @@ -2090,7 +2134,11 @@ std::unique_ptr<clang::ASTConsumer> HipifyAction::CreateASTConsumer(clang::Compi
sCusparseZbsrsv2_solve,
sCusparseCbsrsv2_solve,
sCusparseDbsrsv2_solve,
sCusparseSbsrsv2_solve
sCusparseSbsrsv2_solve,
sCusparseSbsrsv2_analysis,
sCusparseDbsrsv2_analysis,
sCusparseCbsrsv2_analysis,
sCusparseZbsrsv2_analysis
)
)
)
Expand Down
20 changes: 20 additions & 0 deletions tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,26 @@ int main() {
// CHECK: status_t = hipsparseSbsrsv2_solve(handle_t, direction_t, opA, mb, nnzb, &fAlpha, matDescr_A, &fbsrSortedValA, &csrRowPtrA, &csrColIndA, blockDim, bsrsv2_info, &fF, &fX, solvePolicy_t, &pBuffer);
status_t = cusparseSbsrsv2_solve(handle_t, direction_t, opA, mb, nnzb, &fAlpha, matDescr_A, &fbsrSortedValA, &csrRowPtrA, &csrColIndA, blockDim, bsrsv2_info, &fF, &fX, solvePolicy_t, &pBuffer);

// CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseZbsrsv2_analysis(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, int mb, int nnzb, const cusparseMatDescr_t descrA, const cuDoubleComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsv2Info_t info, cusparseSolvePolicy_t policy, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseZbsrsv2_analysis(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, int mb, int nnzb, const hipsparseMatDescr_t descrA, const hipDoubleComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsv2Info_t info, hipsparseSolvePolicy_t policy, void* pBuffer);
// CHECK: status_t = hipsparseZbsrsv2_analysis(handle_t, direction_t, opA, mb, nnzb, matDescr_A, &dComplexbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsv2_info, solvePolicy_t, pBuffer);
status_t = cusparseZbsrsv2_analysis(handle_t, direction_t, opA, mb, nnzb, matDescr_A, &dComplexbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsv2_info, solvePolicy_t, pBuffer);

// CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseCbsrsv2_analysis(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, int mb, int nnzb, const cusparseMatDescr_t descrA, const cuComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsv2Info_t info, cusparseSolvePolicy_t policy, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseCbsrsv2_analysis(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, int mb, int nnzb, const hipsparseMatDescr_t descrA, const hipComplex* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsv2Info_t info, hipsparseSolvePolicy_t policy, void* pBuffer);
// CHECK: status_t = hipsparseCbsrsv2_analysis(handle_t, direction_t, opA, mb, nnzb, matDescr_A, &complexbsrValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsv2_info, solvePolicy_t, pBuffer);
status_t = cusparseCbsrsv2_analysis(handle_t, direction_t, opA, mb, nnzb, matDescr_A, &complexbsrValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsv2_info, solvePolicy_t, pBuffer);

// CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseDbsrsv2_analysis(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, int mb, int nnzb, const cusparseMatDescr_t descrA, const double* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsv2Info_t info, cusparseSolvePolicy_t policy, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseDbsrsv2_analysis(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, int mb, int nnzb, const hipsparseMatDescr_t descrA, const double* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsv2Info_t info, hipsparseSolvePolicy_t policy, void* pBuffer);
// CHECK: status_t = hipsparseDbsrsv2_analysis(handle_t, direction_t, opA, mb, nnzb, matDescr_A, &dbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsv2_info, solvePolicy_t, pBuffer);
status_t = cusparseDbsrsv2_analysis(handle_t, direction_t, opA, mb, nnzb, matDescr_A, &dbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsv2_info, solvePolicy_t, pBuffer);

// CUDA: CUSPARSE_DEPRECATED cusparseStatus_t CUSPARSEAPI cusparseSbsrsv2_analysis(cusparseHandle_t handle, cusparseDirection_t dirA, cusparseOperation_t transA, int mb, int nnzb, const cusparseMatDescr_t descrA, const float* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsv2Info_t info, cusparseSolvePolicy_t policy, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseSbsrsv2_analysis(hipsparseHandle_t handle, hipsparseDirection_t dirA, hipsparseOperation_t transA, int mb, int nnzb, const hipsparseMatDescr_t descrA, const float* bsrSortedValA, const int* bsrSortedRowPtrA, const int* bsrSortedColIndA, int blockDim, bsrsv2Info_t info, hipsparseSolvePolicy_t policy, void* pBuffer);
// CHECK: status_t = hipsparseSbsrsv2_analysis(handle_t, direction_t, opA, mb, nnzb, matDescr_A, &fbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsv2_info, solvePolicy_t, pBuffer);
status_t = cusparseSbsrsv2_analysis(handle_t, direction_t, opA, mb, nnzb, matDescr_A, &fbsrSortedValA, &bsrRowPtrA, &bsrColIndA, blockDim, bsrsv2_info, solvePolicy_t, pBuffer);

#if CUDA_VERSION >= 7050
// CUDA: cusparseStatus_t CUSPARSEAPI cusparseZgemvi(cusparseHandle_t handle, cusparseOperation_t transA, int m, int n, const cuDoubleComplex* alpha, const cuDoubleComplex* A, int lda, int nnz, const cuDoubleComplex* xVal, const int* xInd, const cuDoubleComplex* beta, cuDoubleComplex* y, cusparseIndexBase_t idxBase, void* pBuffer);
// HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseZgemvi(hipsparseHandle_t handle, hipsparseOperation_t transA, int m, int n, const hipDoubleComplex* alpha, const hipDoubleComplex* A, int lda, int nnz, const hipDoubleComplex* x, const int* xInd, const hipDoubleComplex* beta, hipDoubleComplex* y, hipsparseIndexBase_t idxBase, void* pBuffer);
Expand Down
Loading

0 comments on commit 2c0cf68

Please sign in to comment.