From 9c164252e29049d4fd632b72f374741738144084 Mon Sep 17 00:00:00 2001 From: "romain.biessy" Date: Fri, 13 Sep 2024 12:38:00 +0200 Subject: [PATCH] Map statuses CUSPARSE_STATUS_NOT_INITIALIZED and CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED --- src/sparse_blas/backends/cusparse/cusparse_error.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sparse_blas/backends/cusparse/cusparse_error.hpp b/src/sparse_blas/backends/cusparse/cusparse_error.hpp index 7d6bf45d7..8d2f66c8f 100644 --- a/src/sparse_blas/backends/cusparse/cusparse_error.hpp +++ b/src/sparse_blas/backends/cusparse/cusparse_error.hpp @@ -82,7 +82,10 @@ inline void check_status(cusparseStatus_t status, const std::string& function, switch (status) { case CUSPARSE_STATUS_NOT_SUPPORTED: throw oneapi::mkl::unimplemented("sparse_blas", function, error_str); + case CUSPARSE_STATUS_NOT_INITIALIZED: + throw oneapi::mkl::uninitialized("sparse_blas", function, error_str); case CUSPARSE_STATUS_INVALID_VALUE: + case CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED: throw oneapi::mkl::invalid_argument("sparse_blas", function, error_str); default: throw oneapi::mkl::exception("sparse_blas", function, error_str); }