Skip to content

Commit dc0081a

Browse files
committed
update error message when backend function is not available for specific dtype
1 parent 6057823 commit dc0081a

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

dpnp/backend/extensions/blas/dot_common.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ std::pair<sycl::event, sycl::event>
128128
dot_impl_fn_ptr_t dot_fn = dot_dispatch_vector[type_id];
129129
if (dot_fn == nullptr) {
130130
throw py::value_error(
131-
"Types of input vectors and result array are mismatched.");
131+
"No dot implementation is available for the specified data type "
132+
"of the input and output arrays.");
132133
}
133134

134135
char *x_typeless_ptr = vectorX.get_data();

dpnp/backend/extensions/blas/gemm.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ std::tuple<sycl::event, sycl::event, bool>
315315
gemm_dispatch_table[matrixAB_type_id][resultC_type_id];
316316
if (gemm_fn == nullptr) {
317317
throw py::value_error(
318-
"Types of input matrices and result matrix are mismatched.");
318+
"No gemm implementation is available for the specified data type "
319+
"of the input and output arrays.");
319320
}
320321

321322
const char *a_typeless_ptr = matrixA.get_data();

dpnp/backend/extensions/blas/gemm_batch.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ std::tuple<sycl::event, sycl::event, bool>
389389
gemm_batch_dispatch_table[matrixAB_type_id][resultC_type_id];
390390
if (gemm_batch_fn == nullptr) {
391391
throw py::value_error(
392-
"Types of input matrices and result matrix are mismatched.");
392+
"No gemm_batch implementation is available for the specified data "
393+
"type of the input and output arrays.");
393394
}
394395

395396
const char *a_typeless_ptr = matrixA.get_data();

dpnp/backend/extensions/blas/gemv.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ std::pair<sycl::event, sycl::event>
282282
gemv_impl_fn_ptr_t gemv_fn = gemv_dispatch_vector[type_id];
283283
if (gemv_fn == nullptr) {
284284
throw py::value_error(
285-
"Types of input arrays and result array are mismatched.");
285+
"No gemv implementation is available for the specified data type "
286+
"of the input and output arrays.");
286287
}
287288

288289
const char *a_typeless_ptr = matrixA.get_data();

dpnp/backend/extensions/blas/syrk.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ std::pair<sycl::event, sycl::event>
262262
syrk_impl_fn_ptr_t syrk_fn = syrk_dispatch_vector[type_id];
263263
if (syrk_fn == nullptr) {
264264
throw py::value_error(
265-
"Types of input arrays and result array are mismatched.");
265+
"No syrk implementation is available for the specified data type "
266+
"of the input and output arrays.");
266267
}
267268

268269
const char *a_typeless_ptr = matrixA.get_data();

dpnp/backend/extensions/lapack/evd_batch_common.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ std::pair<sycl::event, sycl::event>
9797
evd_batch_dispatch_table[eig_vecs_type_id][eig_vals_type_id];
9898
if (evd_batch_fn == nullptr) {
9999
throw py::value_error(
100-
"Types of input vectors and result array are mismatched.");
100+
"No evd_batch implementation is available for the specified data "
101+
"type of the input and output arrays.");
101102
}
102103

103104
char *eig_vecs_data = eig_vecs.get_data();

dpnp/backend/extensions/lapack/evd_common.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ std::pair<sycl::event, sycl::event>
9191
evd_dispatch_table[eig_vecs_type_id][eig_vals_type_id];
9292
if (evd_fn == nullptr) {
9393
throw py::value_error(
94-
"Types of input vectors and result array are mismatched.");
94+
"No evd implementation is available for the specified data type "
95+
"of the input and output arrays.");
9596
}
9697

9798
char *eig_vecs_data = eig_vecs.get_data();

0 commit comments

Comments
 (0)