Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sparse BLAS] remove deprecation warning when using oneMKL 2024.1 with sparse::trsv() on x86 CPU and Intel GPU backends #468

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/sparse_blas/backends/mkl_common/mkl_operations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,17 @@ std::enable_if_t<detail::is_fp_supported_v<fpType>> gemv(
sycl::queue& queue, transpose transpose_val, const fpType alpha,
detail::matrix_handle* A_handle, sycl::buffer<fpType, 1>& x, const fpType beta,
sycl::buffer<fpType, 1>& y) {
oneapi::mkl::sparse::gemv(queue, transpose_val, alpha, detail::get_handle(A_handle), x, beta, y);
oneapi::mkl::sparse::gemv(queue, transpose_val, alpha, detail::get_handle(A_handle), x, beta,
y);
}

template <typename fpType>
std::enable_if_t<detail::is_fp_supported_v<fpType>, sycl::event> gemv(
sycl::queue& queue, transpose transpose_val, const fpType alpha,
detail::matrix_handle* A_handle, const fpType* x, const fpType beta, fpType* y,
const std::vector<sycl::event>& dependencies) {
return oneapi::mkl::sparse::gemv(queue, transpose_val, alpha, detail::get_handle(A_handle), x, beta, y,
dependencies);
return oneapi::mkl::sparse::gemv(queue, transpose_val, alpha, detail::get_handle(A_handle), x,
beta, y, dependencies);
}

template <typename fpType>
Expand All @@ -87,7 +88,9 @@ std::enable_if_t<detail::is_fp_supported_v<fpType>> trsv(sycl::queue& queue, upl
throw mkl::unimplemented("sparse_blas/backends/mkl", __FUNCTION__,
"Transposed or conjugate trsv is not supported");
}
oneapi::mkl::sparse::trsv(queue, uplo_val, transpose_val, diag_val,

const fpType alpha = static_cast<fpType>(1);
oneapi::mkl::sparse::trsv(queue, uplo_val, transpose_val, diag_val, alpha,
detail::get_handle(A_handle), x, y);
}

Expand All @@ -102,7 +105,8 @@ std::enable_if_t<detail::is_fp_supported_v<fpType>, sycl::event> trsv(
"Transposed or conjugate trsv is not supported");
}
// TODO: Remove const_cast in future oneMKL release
return oneapi::mkl::sparse::trsv(queue, uplo_val, transpose_val, diag_val,
const fpType alpha = static_cast<fpType>(1);
return oneapi::mkl::sparse::trsv(queue, uplo_val, transpose_val, diag_val, alpha,
detail::get_handle(A_handle), const_cast<fpType*>(x), y,
dependencies);
}
Expand Down