diff --git a/bin/hipify-perl b/bin/hipify-perl index 8496c4d9..9c30c55f 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -1690,6 +1690,7 @@ sub rocSubstitutions { subst("cusparseCgebsr2gebsr", "rocsparse_cgebsr2gebsr", "library"); subst("cusparseCgebsr2gebsr_bufferSize", "rocsparse_cgebsr2gebsr_buffer_size", "library"); subst("cusparseCgpsvInterleavedBatch", "rocsparse_cgpsv_interleaved_batch", "library"); + subst("cusparseCgpsvInterleavedBatch_bufferSizeExt", "rocsparse_cgpsv_interleaved_batch_buffer_size", "library"); subst("cusparseCnnz", "rocsparse_cnnz", "library"); subst("cusparseCnnz_compress", "rocsparse_cnnz_compress", "library"); subst("cusparseCooAoSGet", "rocsparse_coo_aos_get", "library"); @@ -1739,6 +1740,7 @@ sub rocSubstitutions { subst("cusparseDgebsr2gebsr", "rocsparse_dgebsr2gebsr", "library"); subst("cusparseDgebsr2gebsr_bufferSize", "rocsparse_dgebsr2gebsr_buffer_size", "library"); subst("cusparseDgpsvInterleavedBatch", "rocsparse_dgpsv_interleaved_batch", "library"); + subst("cusparseDgpsvInterleavedBatch_bufferSizeExt", "rocsparse_dgpsv_interleaved_batch_buffer_size", "library"); subst("cusparseDnMatGet", "rocsparse_dnmat_get", "library"); subst("cusparseDnMatGetStridedBatch", "rocsparse_dnmat_get_strided_batch", "library"); subst("cusparseDnMatGetValues", "rocsparse_dnmat_get_values", "library"); @@ -1797,6 +1799,7 @@ sub rocSubstitutions { subst("cusparseSgebsr2gebsr", "rocsparse_sgebsr2gebsr", "library"); subst("cusparseSgebsr2gebsr_bufferSize", "rocsparse_sgebsr2gebsr_buffer_size", "library"); subst("cusparseSgpsvInterleavedBatch", "rocsparse_sgpsv_interleaved_batch", "library"); + subst("cusparseSgpsvInterleavedBatch_bufferSizeExt", "rocsparse_sgpsv_interleaved_batch_buffer_size", "library"); subst("cusparseSnnz", "rocsparse_snnz", "library"); subst("cusparseSnnz_compress", "rocsparse_snnz_compress", "library"); subst("cusparseSpMV", "rocsparse_spmv", "library"); @@ -1854,6 +1857,7 @@ sub rocSubstitutions { subst("cusparseZgebsr2gebsr", "rocsparse_zgebsr2gebsr", "library"); subst("cusparseZgebsr2gebsr_bufferSize", "rocsparse_zgebsr2gebsr_buffer_size", "library"); subst("cusparseZgpsvInterleavedBatch", "rocsparse_zgpsv_interleaved_batch", "library"); + subst("cusparseZgpsvInterleavedBatch_bufferSizeExt", "rocsparse_zgpsv_interleaved_batch_buffer_size", "library"); subst("cusparseZnnz", "rocsparse_znnz", "library"); subst("cusparseZnnz_compress", "rocsparse_znnz_compress", "library"); subst("cublas.h", "rocblas.h", "include_cuda_main_header"); diff --git a/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md b/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md index ae8014bc..82fee252 100644 --- a/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUSPARSE_API_supported_by_HIP_and_ROC.md @@ -490,7 +490,7 @@ |`cusparseCcsrilu02_bufferSizeExt`| |12.2| |`hipsparseCcsrilu02_bufferSizeExt`|3.1.0| | | | | | | | | |`cusparseCcsrilu02_numericBoost`| |12.2| |`hipsparseCcsrilu02_numericBoost`|3.10.0| | | | | | | | | |`cusparseCgpsvInterleavedBatch`|9.2| | |`hipsparseCgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_cgpsv_interleaved_batch`|5.1.0| | | | -|`cusparseCgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseCgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | | | | | | | +|`cusparseCgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseCgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | |`rocsparse_cgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseCgtsv`| |10.2|11.0| | | | | | | | | | | |`cusparseCgtsv2`|9.0| | |`hipsparseCgtsv2`|4.3.0| | | | | | | | | |`cusparseCgtsv2StridedBatch`| | | |`hipsparseCgtsv2StridedBatch`|4.5.0| | | | | | | | | @@ -524,7 +524,7 @@ |`cusparseDcsrilu02_bufferSizeExt`| |12.2| |`hipsparseDcsrilu02_bufferSizeExt`|1.9.2| | | | | | | | | |`cusparseDcsrilu02_numericBoost`| |12.2| |`hipsparseDcsrilu02_numericBoost`|3.10.0| | | | | | | | | |`cusparseDgpsvInterleavedBatch`|9.2| | |`hipsparseDgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_dgpsv_interleaved_batch`|5.1.0| | | | -|`cusparseDgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseDgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | | | | | | | +|`cusparseDgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseDgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | |`rocsparse_dgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseDgtsv`| |10.2|11.0| | | | | | | | | | | |`cusparseDgtsv2`|9.0| | |`hipsparseDgtsv2`|4.3.0| | | | | | | | | |`cusparseDgtsv2StridedBatch`| | | |`hipsparseDgtsv2StridedBatch`|4.5.0| | | | | | | | | @@ -557,7 +557,7 @@ |`cusparseScsrilu02_bufferSizeExt`| |12.2| |`hipsparseScsrilu02_bufferSizeExt`|1.9.2| | | | | | | | | |`cusparseScsrilu02_numericBoost`| |12.2| |`hipsparseScsrilu02_numericBoost`|3.10.0| | | | | | | | | |`cusparseSgpsvInterleavedBatch`|9.2| | |`hipsparseSgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_sgpsv_interleaved_batch`|5.1.0| | | | -|`cusparseSgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseSgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | | | | | | | +|`cusparseSgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseSgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | |`rocsparse_sgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseSgtsv`| |10.2|11.0| | | | | | | | | | | |`cusparseSgtsv2`|9.0| | |`hipsparseSgtsv2`|4.3.0| | | | | | | | | |`cusparseSgtsv2StridedBatch`|9.0| | |`hipsparseSgtsv2StridedBatch`|4.5.0| | | | | | | | | @@ -594,7 +594,7 @@ |`cusparseZcsrilu02_bufferSizeExt`| |12.2| |`hipsparseZcsrilu02_bufferSizeExt`|3.1.0| | | | | | | | | |`cusparseZcsrilu02_numericBoost`| |12.2| |`hipsparseZcsrilu02_numericBoost`|3.10.0| | | | | | | | | |`cusparseZgpsvInterleavedBatch`|9.2| | |`hipsparseZgpsvInterleavedBatch`|5.1.0| | | |`rocsparse_zgpsv_interleaved_batch`|5.1.0| | | | -|`cusparseZgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseZgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | | | | | | | +|`cusparseZgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`hipsparseZgpsvInterleavedBatch_bufferSizeExt`|5.1.0| | | |`rocsparse_zgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseZgtsv`| |10.2|11.0| | | | | | | | | | | |`cusparseZgtsv2`|9.0| | |`hipsparseZgtsv2`|4.3.0| | | | | | | | | |`cusparseZgtsv2StridedBatch`| | | |`hipsparseZgtsv2StridedBatch`|4.5.0| | | | | | | | | diff --git a/docs/tables/CUSPARSE_API_supported_by_ROC.md b/docs/tables/CUSPARSE_API_supported_by_ROC.md index 2941477d..3011ccd5 100644 --- a/docs/tables/CUSPARSE_API_supported_by_ROC.md +++ b/docs/tables/CUSPARSE_API_supported_by_ROC.md @@ -490,7 +490,7 @@ |`cusparseCcsrilu02_bufferSizeExt`| |12.2| | | | | | | |`cusparseCcsrilu02_numericBoost`| |12.2| | | | | | | |`cusparseCgpsvInterleavedBatch`|9.2| | |`rocsparse_cgpsv_interleaved_batch`|5.1.0| | | | -|`cusparseCgpsvInterleavedBatch_bufferSizeExt`|9.2| | | | | | | | +|`cusparseCgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`rocsparse_cgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseCgtsv`| |10.2|11.0| | | | | | |`cusparseCgtsv2`|9.0| | | | | | | | |`cusparseCgtsv2StridedBatch`| | | | | | | | | @@ -524,7 +524,7 @@ |`cusparseDcsrilu02_bufferSizeExt`| |12.2| | | | | | | |`cusparseDcsrilu02_numericBoost`| |12.2| | | | | | | |`cusparseDgpsvInterleavedBatch`|9.2| | |`rocsparse_dgpsv_interleaved_batch`|5.1.0| | | | -|`cusparseDgpsvInterleavedBatch_bufferSizeExt`|9.2| | | | | | | | +|`cusparseDgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`rocsparse_dgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseDgtsv`| |10.2|11.0| | | | | | |`cusparseDgtsv2`|9.0| | | | | | | | |`cusparseDgtsv2StridedBatch`| | | | | | | | | @@ -557,7 +557,7 @@ |`cusparseScsrilu02_bufferSizeExt`| |12.2| | | | | | | |`cusparseScsrilu02_numericBoost`| |12.2| | | | | | | |`cusparseSgpsvInterleavedBatch`|9.2| | |`rocsparse_sgpsv_interleaved_batch`|5.1.0| | | | -|`cusparseSgpsvInterleavedBatch_bufferSizeExt`|9.2| | | | | | | | +|`cusparseSgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`rocsparse_sgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseSgtsv`| |10.2|11.0| | | | | | |`cusparseSgtsv2`|9.0| | | | | | | | |`cusparseSgtsv2StridedBatch`|9.0| | | | | | | | @@ -594,7 +594,7 @@ |`cusparseZcsrilu02_bufferSizeExt`| |12.2| | | | | | | |`cusparseZcsrilu02_numericBoost`| |12.2| | | | | | | |`cusparseZgpsvInterleavedBatch`|9.2| | |`rocsparse_zgpsv_interleaved_batch`|5.1.0| | | | -|`cusparseZgpsvInterleavedBatch_bufferSizeExt`|9.2| | | | | | | | +|`cusparseZgpsvInterleavedBatch_bufferSizeExt`|9.2| | |`rocsparse_zgpsv_interleaved_batch_buffer_size`|5.1.0| | | | |`cusparseZgtsv`| |10.2|11.0| | | | | | |`cusparseZgtsv2`|9.0| | | | | | | | |`cusparseZgtsv2StridedBatch`| | | | | | | | | diff --git a/src/CUDA2HIP_SPARSE_API_functions.cpp b/src/CUDA2HIP_SPARSE_API_functions.cpp index 19b5ec1e..eb356568 100644 --- a/src/CUDA2HIP_SPARSE_API_functions.cpp +++ b/src/CUDA2HIP_SPARSE_API_functions.cpp @@ -482,10 +482,10 @@ const std::map CUDA_SPARSE_FUNCTION_MAP { {"cusparseZgtsvInterleavedBatch", {"hipsparseZgtsvInterleavedBatch", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED}}, // 12.5. Batched Pentadiagonal Solve - {"cusparseSgpsvInterleavedBatch_bufferSizeExt", {"hipsparseSgpsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED}}, - {"cusparseDgpsvInterleavedBatch_bufferSizeExt", {"hipsparseDgpsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED}}, - {"cusparseCgpsvInterleavedBatch_bufferSizeExt", {"hipsparseCgpsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED}}, - {"cusparseZgpsvInterleavedBatch_bufferSizeExt", {"hipsparseZgpsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, 12, ROC_UNSUPPORTED}}, + {"cusparseSgpsvInterleavedBatch_bufferSizeExt", {"hipsparseSgpsvInterleavedBatch_bufferSizeExt", "rocsparse_sgpsv_interleaved_batch_buffer_size", CONV_LIB_FUNC, API_SPARSE, 12}}, + {"cusparseDgpsvInterleavedBatch_bufferSizeExt", {"hipsparseDgpsvInterleavedBatch_bufferSizeExt", "rocsparse_dgpsv_interleaved_batch_buffer_size", CONV_LIB_FUNC, API_SPARSE, 12}}, + {"cusparseCgpsvInterleavedBatch_bufferSizeExt", {"hipsparseCgpsvInterleavedBatch_bufferSizeExt", "rocsparse_cgpsv_interleaved_batch_buffer_size", CONV_LIB_FUNC, API_SPARSE, 12}}, + {"cusparseZgpsvInterleavedBatch_bufferSizeExt", {"hipsparseZgpsvInterleavedBatch_bufferSizeExt", "rocsparse_zgpsv_interleaved_batch_buffer_size", CONV_LIB_FUNC, API_SPARSE, 12}}, {"cusparseSgpsvInterleavedBatch", {"hipsparseSgpsvInterleavedBatch", "rocsparse_sgpsv_interleaved_batch", CONV_LIB_FUNC, API_SPARSE, 12}}, {"cusparseDgpsvInterleavedBatch", {"hipsparseDgpsvInterleavedBatch", "rocsparse_dgpsv_interleaved_batch", CONV_LIB_FUNC, API_SPARSE, 12}}, @@ -2139,6 +2139,10 @@ const std::map HIP_SPARSE_FUNCTION_VER_MAP { {"rocsparse_cgpsv_interleaved_batch", {HIP_5010, HIP_0, HIP_0 }}, {"rocsparse_dgpsv_interleaved_batch", {HIP_5010, HIP_0, HIP_0 }}, {"rocsparse_sgpsv_interleaved_batch", {HIP_5010, HIP_0, HIP_0 }}, + {"rocsparse_zgpsv_interleaved_batch_buffer_size", {HIP_5010, HIP_0, HIP_0 }}, + {"rocsparse_cgpsv_interleaved_batch_buffer_size", {HIP_5010, HIP_0, HIP_0 }}, + {"rocsparse_dgpsv_interleaved_batch_buffer_size", {HIP_5010, HIP_0, HIP_0 }}, + {"rocsparse_sgpsv_interleaved_batch_buffer_size", {HIP_5010, HIP_0, HIP_0 }}, }; const std::map CUDA_SPARSE_API_SECTION_MAP { diff --git a/src/HipifyAction.cpp b/src/HipifyAction.cpp index 6485eb04..ed9ae291 100644 --- a/src/HipifyAction.cpp +++ b/src/HipifyAction.cpp @@ -86,6 +86,10 @@ const std::string sCusparseZgpsvInterleavedBatch = "cusparseZgpsvInterleavedBatc const std::string sCusparseCgpsvInterleavedBatch = "cusparseCgpsvInterleavedBatch"; const std::string sCusparseDgpsvInterleavedBatch = "cusparseDgpsvInterleavedBatch"; const std::string sCusparseSgpsvInterleavedBatch = "cusparseSgpsvInterleavedBatch"; +const std::string sCusparseZgpsvInterleavedBatch_bufferSizeExt = "cusparseZgpsvInterleavedBatch_bufferSizeExt"; +const std::string sCusparseCgpsvInterleavedBatch_bufferSizeExt = "cusparseCgpsvInterleavedBatch_bufferSizeExt"; +const std::string sCusparseDgpsvInterleavedBatch_bufferSizeExt = "cusparseDgpsvInterleavedBatch_bufferSizeExt"; +const std::string sCusparseSgpsvInterleavedBatch_bufferSizeExt = "cusparseSgpsvInterleavedBatch_bufferSizeExt"; // CUDA_OVERLOADED const std::string sCudaEventCreate = "cudaEventCreate"; const std::string sCudaGraphInstantiate = "cudaGraphInstantiate"; @@ -422,6 +426,42 @@ std::map FuncArgCasts { false } }, + {sCusparseZgpsvInterleavedBatch_bufferSizeExt, + { + { + {9, {e_add_var_argument, cw_None, "", 10}} + }, + true, + false + } + }, + {sCusparseCgpsvInterleavedBatch_bufferSizeExt, + { + { + {9, {e_add_var_argument, cw_None, "", 10}} + }, + true, + false + } + }, + {sCusparseDgpsvInterleavedBatch_bufferSizeExt, + { + { + {9, {e_add_var_argument, cw_None, "", 10}} + }, + true, + false + } + }, + {sCusparseSgpsvInterleavedBatch_bufferSizeExt, + { + { + {9, {e_add_var_argument, cw_None, "", 10}} + }, + true, + false + } + }, }; void HipifyAction::RewriteString(StringRef s, clang::SourceLocation start) { @@ -1127,7 +1167,11 @@ std::unique_ptr HipifyAction::CreateASTConsumer(clang::Compi sCusparseZgpsvInterleavedBatch, sCusparseCgpsvInterleavedBatch, sCusparseDgpsvInterleavedBatch, - sCusparseSgpsvInterleavedBatch + sCusparseSgpsvInterleavedBatch, + sCusparseZgpsvInterleavedBatch_bufferSizeExt, + sCusparseCgpsvInterleavedBatch_bufferSizeExt, + sCusparseDgpsvInterleavedBatch_bufferSizeExt, + sCusparseSgpsvInterleavedBatch_bufferSizeExt ) ) ) diff --git a/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu b/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu index 9097f41e..6d69407e 100644 --- a/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu +++ b/tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu @@ -830,6 +830,26 @@ int main() { // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseSgpsvInterleavedBatch(hipsparseHandle_t handle, int algo, int m, float* ds, float* dl, float* d, float* du, float* dw, float* x, int batchCount, void* pBuffer); // CHECK: status_t = hipsparseSgpsvInterleavedBatch(handle_t, algo, m, &fds, &fdl, &fd, &fdu, &fdw, &fx, batchCount, pBuffer); status_t = cusparseSgpsvInterleavedBatch(handle_t, algo, m, &fds, &fdl, &fd, &fdu, &fdw, &fx, batchCount, pBuffer); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseZgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle, int algo, int m, const cuDoubleComplex* ds, const cuDoubleComplex* dl, const cuDoubleComplex* d, const cuDoubleComplex* du, const cuDoubleComplex* dw, const cuDoubleComplex* x, int batchCount, size_t* pBufferSizeInBytes); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseZgpsvInterleavedBatch_bufferSizeExt(hipsparseHandle_t handle, int algo, int m, const hipDoubleComplex* ds, const hipDoubleComplex* dl, const hipDoubleComplex* d, const hipDoubleComplex* du, const hipDoubleComplex* dw, const hipDoubleComplex* x, int batchCount, size_t* pBufferSizeInBytes); + // CHECK: status_t = hipsparseZgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &dcomplexds, &dcomplexdl, &dcomplexd, &dcomplexdu, &dcomplexdw, &dcomplexx, batchCount, &bufferSize); + status_t = cusparseZgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &dcomplexds, &dcomplexdl, &dcomplexd, &dcomplexdu, &dcomplexdw, &dcomplexx, batchCount, &bufferSize); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseCgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle, int algo, int m, const cuComplex* ds, const cuComplex* dl, const cuComplex* d, const cuComplex* du, const cuComplex* dw, const cuComplex* x, int batchCount, size_t* pBufferSizeInBytes); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseCgpsvInterleavedBatch_bufferSizeExt(hipsparseHandle_t handle, int algo, int m, const hipComplex* ds, const hipComplex* dl, const hipComplex* d, const hipComplex* du, const hipComplex* dw, const hipComplex* x, int batchCount, size_t* pBufferSizeInBytes); + // CHECK: status_t = hipsparseCgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &complexds, &complexdl, &complexd, &complexdu, &complexdw, &complexx, batchCount, &bufferSize); + status_t = cusparseCgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &complexds, &complexdl, &complexd, &complexdu, &complexdw, &complexx, batchCount, &bufferSize); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseDgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle, int algo, int m, const double* ds, const double* dl, const double* d, const double* du, const double* dw, const double* x, int batchCount, size_t* pBufferSizeInBytes); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseDgpsvInterleavedBatch_bufferSizeExt(hipsparseHandle_t handle, int algo, int m, const double* ds, const double* dl, const double* d, const double* du, const double* dw, const double* x, int batchCount, size_t* pBufferSizeInBytes); + // CHECK: status_t = hipsparseDgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &dds, &ddl, &dd, &ddu, &ddw, &dx, batchCount, &bufferSize); + status_t = cusparseDgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &dds, &ddl, &dd, &ddu, &ddw, &dx, batchCount, &bufferSize); + + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseSgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle, int algo, int m, const float* ds, const float* dl, const float* d, const float* du, const float* dw, const float* x, int batchCount, size_t* pBufferSizeInBytes); + // HIP: HIPSPARSE_EXPORT hipsparseStatus_t hipsparseSgpsvInterleavedBatch_bufferSizeExt(hipsparseHandle_t handle, int algo, int m, const float* ds, const float* dl, const float* d, const float* du, const float* dw, const float* x, int batchCount, size_t* pBufferSizeInBytes); + // CHECK: status_t = hipsparseSgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &fds, &fdl, &fd, &fdu, &fdw, &fx, batchCount, &bufferSize); + status_t = cusparseSgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &fds, &fdl, &fd, &fdu, &fdw, &fx, batchCount, &bufferSize); #endif #if CUDA_VERSION >= 10010 diff --git a/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu b/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu index e2080f33..6515fa7f 100644 --- a/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu +++ b/tests/unit_tests/synthetic/libraries/cusparse2rocsparse.cu @@ -841,6 +841,30 @@ int main() { // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_sgpsv_interleaved_batch(rocsparse_handle handle, rocsparse_gpsv_interleaved_alg alg, rocsparse_int m, float* ds, float* dl, float* d, float* du, float* dw, float* x, rocsparse_int batch_count, rocsparse_int batch_stride, void* temp_buffer); // CHECK: status_t = rocsparse_sgpsv_interleaved_batch(handle_t, algo, m, &fds, &fdl, &fd, &fdu, &fdw, &fx, batchCount, batchCount, pBuffer); status_t = cusparseSgpsvInterleavedBatch(handle_t, algo, m, &fds, &fdl, &fd, &fdu, &fdw, &fx, batchCount, pBuffer); + + // NOTE: An additional argument rocsparse_int batch_stride is added for the rocsparse_zgpsv_interleaved_batch_buffer_size function call: the argument is copied from the previous one: rocsparse_int batch_count. It is how hipsparseSgpsvInterleavedBatch calls rocsparse_zgpsv_interleaved_batch_buffer_size in its implementation. + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseZgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle, int algo, int m, const cuDoubleComplex* ds, const cuDoubleComplex* dl, const cuDoubleComplex* d, const cuDoubleComplex* du, const cuDoubleComplex* dw, const cuDoubleComplex* x, int batchCount, size_t* pBufferSizeInBytes); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_zgpsv_interleaved_batch_buffer_size(rocsparse_handle handle, rocsparse_gpsv_interleaved_alg alg, rocsparse_int m, const rocsparse_double_complex* ds, const rocsparse_double_complex* dl, const rocsparse_double_complex* d, const rocsparse_double_complex* du, const rocsparse_double_complex* dw, const rocsparse_double_complex* x, rocsparse_int batch_count, rocsparse_int batch_stride, size_t* buffer_size); + // CHECK: status_t = rocsparse_zgpsv_interleaved_batch_buffer_size(handle_t, algo, m, &dcomplexds, &dcomplexdl, &dcomplexd, &dcomplexdu, &dcomplexdw, &dcomplexx, batchCount, batchCount, &bufferSize); + status_t = cusparseZgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &dcomplexds, &dcomplexdl, &dcomplexd, &dcomplexdu, &dcomplexdw, &dcomplexx, batchCount, &bufferSize); + + // NOTE: An additional argument rocsparse_int batch_stride is added for the rocsparse_cgpsv_interleaved_batch_buffer_size function call: the argument is copied from the previous one: rocsparse_int batch_count. It is how hipsparseCgpsvInterleavedBatch_bufferSizeExt calls rocsparse_cgpsv_interleaved_batch_buffer_size in its implementation. + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseCgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle, int algo, int m, const cuComplex* ds, const cuComplex* dl, const cuComplex* d, const cuComplex* du, const cuComplex* dw, const cuComplex* x, int batchCount, size_t* pBufferSizeInBytes); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_cgpsv_interleaved_batch_buffer_size(rocsparse_handle handle, rocsparse_gpsv_interleaved_alg alg, rocsparse_int m, const rocsparse_float_complex* ds, const rocsparse_float_complex* dl, const rocsparse_float_complex* d, const rocsparse_float_complex* du, const rocsparse_float_complex* dw, const rocsparse_float_complex* x, rocsparse_int batch_count, rocsparse_int batch_stride, size_t* buffer_size); + // CHECK: status_t = rocsparse_cgpsv_interleaved_batch_buffer_size(handle_t, algo, m, &complexds, &complexdl, &complexd, &complexdu, &complexdw, &complexx, batchCount, batchCount, &bufferSize); + status_t = cusparseCgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &complexds, &complexdl, &complexd, &complexdu, &complexdw, &complexx, batchCount, &bufferSize); + + // NOTE: An additional argument rocsparse_int batch_stride is added for the rocsparse_dgpsv_interleaved_batch_buffer_size function call: the argument is copied from the previous one: rocsparse_int batch_count. It is how hipsparseDgpsvInterleavedBatch_bufferSizeExt calls rocsparse_dgpsv_interleaved_batch_buffer_size in its implementation. + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseDgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle, int algo, int m, const double* ds, const double* dl, const double* d, const double* du, const double* dw, const double* x, int batchCount, size_t* pBufferSizeInBytes); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_dgpsv_interleaved_batch_buffer_size(rocsparse_handle handle, rocsparse_gpsv_interleaved_alg alg, rocsparse_int m, const double* ds, const double* dl, const double* d, const double* du, const double* dw, const double* x, rocsparse_int batch_count, rocsparse_int batch_stride, size_t* buffer_size); + // CHECK: status_t = rocsparse_dgpsv_interleaved_batch_buffer_size(handle_t, algo, m, &dds, &ddl, &dd, &ddu, &ddw, &dx, batchCount, batchCount, &bufferSize); + status_t = cusparseDgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &dds, &ddl, &dd, &ddu, &ddw, &dx, batchCount, &bufferSize); + + // NOTE: An additional argument rocsparse_int batch_stride is added for the rocsparse_dgpsv_interleaved_batch_buffer_size function call: the argument is copied from the previous one: rocsparse_int batch_count. It is how hipsparseSgpsvInterleavedBatch_bufferSizeExt calls rocsparse_dgpsv_interleaved_batch_buffer_size in its implementation. + // CUDA: cusparseStatus_t CUSPARSEAPI cusparseSgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle, int algo, int m, const float* ds, const float* dl, const float* d, const float* du, const float* dw, const float* x, int batchCount, size_t* pBufferSizeInBytes); + // ROC: ROCSPARSE_EXPORT rocsparse_status rocsparse_sgpsv_interleaved_batch_buffer_size(rocsparse_handle handle, rocsparse_gpsv_interleaved_alg alg, rocsparse_int m, const float* ds, const float* dl, const float* d, const float* du, const float* dw, const float* x, rocsparse_int batch_count, rocsparse_int batch_stride, size_t* buffer_size); + // CHECK: status_t = rocsparse_sgpsv_interleaved_batch_buffer_size(handle_t, algo, m, &fds, &fdl, &fd, &fdu, &fdw, &fx, batchCount, batchCount, &bufferSize); + status_t = cusparseSgpsvInterleavedBatch_bufferSizeExt(handle_t, algo, m, &fds, &fdl, &fd, &fdu, &fdw, &fx, batchCount, &bufferSize); #endif #if (CUDA_VERSION >= 10010 && CUDA_VERSION < 11000 && !defined(_WIN32)) || CUDA_VERSION >= 11000