Skip to content

Commit

Permalink
Improve function name in exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rbiessy committed Sep 3, 2024
1 parent cb70b84 commit 74b3063
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ inline void common_spmm_optimize(
oneapi::mkl::sparse::dense_matrix_handle_t B_handle, bool is_beta_host_accessible,
oneapi::mkl::sparse::dense_matrix_handle_t C_handle, oneapi::mkl::sparse::spmm_alg alg,
oneapi::mkl::sparse::spmm_descr_t spmm_descr) {
detail::check_valid_spmm_common(__func__, A_view, A_handle, B_handle, C_handle,
detail::check_valid_spmm_common("spmm_optimize", A_view, A_handle, B_handle, C_handle,
is_alpha_host_accessible, is_beta_host_accessible);
if (!spmm_descr->buffer_size_called) {
throw mkl::uninitialized("sparse_blas", __func__,
throw mkl::uninitialized("sparse_blas", "spmm_optimize",
"spmm_buffer_size must be called before spmm_optimize.");
}
spmm_descr->optimized_called = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ inline void common_spmv_optimize(oneapi::mkl::transpose opA, bool is_alpha_host_
oneapi::mkl::sparse::dense_vector_handle_t y_handle,
oneapi::mkl::sparse::spmv_alg alg,
oneapi::mkl::sparse::spmv_descr_t spmv_descr) {
check_valid_spmv(__func__, opA, A_view, A_handle, x_handle, y_handle, is_alpha_host_accessible,
is_beta_host_accessible);
check_valid_spmv("spmv_optimize", opA, A_view, A_handle, x_handle, y_handle,
is_alpha_host_accessible, is_beta_host_accessible);
if (!spmv_descr->buffer_size_called) {
throw mkl::uninitialized("sparse_blas", __func__,
throw mkl::uninitialized("sparse_blas", "spmv_optimize",
"spmv_buffer_size must be called before spmv_optimize.");
}
spmv_descr->optimized_called = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ inline void common_spsv_optimize(oneapi::mkl::transpose opA, bool is_alpha_host_
oneapi::mkl::sparse::dense_vector_handle_t y_handle,
oneapi::mkl::sparse::spsv_alg alg,
oneapi::mkl::sparse::spsv_descr_t spsv_descr) {
detail::check_valid_spsv_common(__func__, A_view, A_handle, x_handle, y_handle,
detail::check_valid_spsv_common("spsv_optimize", A_view, A_handle, x_handle, y_handle,
is_alpha_host_accessible);
if (!spsv_descr->buffer_size_called) {
throw mkl::uninitialized("sparse_blas", __func__,
throw mkl::uninitialized("sparse_blas", "spsv_optimize",
"spsv_buffer_size must be called before spsv_optimize.");
}
spsv_descr->optimized_called = true;
Expand Down
4 changes: 2 additions & 2 deletions src/sparse_blas/backends/mkl_common/mkl_spmv.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ void spmv_buffer_size(sycl::queue &queue, oneapi::mkl::transpose opA, const void
// TODO: Add support for external workspace once the close-source oneMKL backend supports it.
bool is_alpha_host_accessible = detail::is_ptr_accessible_on_host(queue, alpha);
bool is_beta_host_accessible = detail::is_ptr_accessible_on_host(queue, beta);
check_valid_spmv(__func__, opA, A_view, A_handle, x_handle, y_handle,
is_alpha_host_accessible, is_beta_host_accessible);
check_valid_spmv(__func__, opA, A_view, A_handle, x_handle, y_handle, is_alpha_host_accessible,
is_beta_host_accessible);
temp_buffer_size = 0;
spmv_descr->buffer_size_called = true;
}
Expand Down

0 comments on commit 74b3063

Please sign in to comment.