diff --git a/include/oneapi/mkl/detail/backends_table.hpp b/include/oneapi/mkl/detail/backends_table.hpp index 418f91131..b385b21b0 100644 --- a/include/oneapi/mkl/detail/backends_table.hpp +++ b/include/oneapi/mkl/detail/backends_table.hpp @@ -86,7 +86,9 @@ static std::map>> libraries = } }, { device::generic_device, { +#ifdef ENABLE_PORTBLAS_BACKEND LIB_NAME("blas_portblas"), +#endif } } } }, { domain::dft, diff --git a/src/include/function_table_initializer.hpp b/src/include/function_table_initializer.hpp index 953226c3e..880035759 100644 --- a/src/include/function_table_initializer.hpp +++ b/src/include/function_table_initializer.hpp @@ -99,13 +99,17 @@ class table_initializer { break; } if (!handle) { +#ifndef ENABLE_PORTBLAS_BACKEND if (key == oneapi::mkl::device::generic_device) { throw mkl::unsupported_device("", "", q.get_device()); } else { +#endif std::cerr << ERROR_MSG << '\n'; throw mkl::backend_not_found(); +#ifndef ENABLE_PORTBLAS_BACKEND } +#endif } auto t = reinterpret_cast(::GET_FUNC(handle.get(), table_names[domain_id]));