diff --git a/benchmark/utils/dpcpp_linops.dp.cpp b/benchmark/utils/dpcpp_linops.dp.cpp index d279f2ad027..1a391a77980 100644 --- a/benchmark/utils/dpcpp_linops.dp.cpp +++ b/benchmark/utils/dpcpp_linops.dp.cpp @@ -52,8 +52,11 @@ class OnemklBase : public gko::LinOp { mat_handle_ = handle_manager( create_mat_handle(), [exec](oneapi::mkl::sparse::matrix_handle_t mat_handle) { - oneapi::mkl::sparse::release_matrix_handle(*exec->get_queue(), - &mat_handle); + oneapi::mkl::sparse::release_matrix_handle( +#if INTEL_MKL_VERSION >= 20240000 + *exec->get_queue(), +#endif + &mat_handle); }); } @@ -107,8 +110,10 @@ class OnemklCsr this->set_size(csr_->get_size()); oneapi::mkl::sparse::set_csr_data( - *(this->get_device_exec()->get_queue()), this->get_mat_handle(), - static_cast(this->get_size()[0]), +#if INTEL_MKL_VERSION >= 20240000 + *(this->get_device_exec()->get_queue()), +#endif + this->get_mat_handle(), static_cast(this->get_size()[0]), static_cast(this->get_size()[1]), oneapi::mkl::index_base::zero, csr_->get_row_ptrs(), csr_->get_col_idxs(), csr_->get_values()); diff --git a/dpcpp/matrix/csr_kernels.dp.cpp b/dpcpp/matrix/csr_kernels.dp.cpp index 312f0e56ad3..44e9c5e16e6 100644 --- a/dpcpp/matrix/csr_kernels.dp.cpp +++ b/dpcpp/matrix/csr_kernels.dp.cpp @@ -1398,7 +1398,10 @@ bool try_general_sparselib_spmv(std::shared_ptr exec, oneapi::mkl::sparse::matrix_handle_t mat_handle; oneapi::mkl::sparse::init_matrix_handle(&mat_handle); oneapi::mkl::sparse::set_csr_data( - *exec->get_queue(), mat_handle, IndexType(a->get_size()[0]), +#if INTEL_MKL_VERSION >= 20240000 + *exec->get_queue(), +#endif + mat_handle, IndexType(a->get_size()[0]), IndexType(a->get_size()[1]), oneapi::mkl::index_base::zero, const_cast(a->get_const_row_ptrs()), const_cast(a->get_const_col_idxs()), @@ -1417,8 +1420,11 @@ bool try_general_sparselib_spmv(std::shared_ptr exec, const_cast(b->get_const_values()), b->get_size()[1], b->get_stride(), host_beta, c->get_values(), c->get_stride()); } - oneapi::mkl::sparse::release_matrix_handle(*exec->get_queue(), - &mat_handle); + oneapi::mkl::sparse::release_matrix_handle( +#if INTEL_MKL_VERSION >= 20240000 + *exec->get_queue(), +#endif + &mat_handle); } return try_sparselib; }