File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ option(ENABLE_MKLCPU_BACKEND "Enable the Intel oneMKL CPU backend for supported
3939option (ENABLE_MKLGPU_BACKEND "Enable the Intel oneMKL GPU backend for supported interfaces" ON )
4040if (ENABLE_MKLCPU_BACKEND)
4141 option (ENABLE_MKLCPU_THREAD_TBB "Enable the use of Intel TBB with the oneMath CPU backend" ON )
42+ option (ENABLE_MKLCPU_THREAD_OMP "Enable the use of Intel OpenMP with the oneMath CPU backend" OFF )
4243endif ()
4344
4445option (ENABLE_ARMPL_BACKEND "Enable the ArmPl backend for BLAS/LAPACK interface" OFF )
@@ -256,14 +257,12 @@ if(ENABLE_MKLGPU_BACKEND OR ENABLE_MKLCPU_BACKEND)
256257 set (MKL_INTERFACE ilp64)
257258 if (ENABLE_MKLCPU_THREAD_TBB)
258259 set (MKL_THREADING tbb_thread)
260+ elseif (ENABLE_MKLCPU_THREAD_OMP)
261+ set (MKL_THREADING intel_thread)
259262 else ()
260263 set (MKL_THREADING sequential)
261264 endif ()
262- if (BUILD_SHARED_LIBS AND NOT WIN32 )
263- set (MKL_LINK dynamic)
264- else ()
265- set (MKL_LINK static)
266- endif ()
265+ set (MKL_LINK dynamic)
267266 # Enable SYCL API
268267 set (DPCPP_COMPILER ON )
269268 set (SYCL_COMPILER ON )
@@ -320,6 +319,8 @@ endif()
320319if (DEFINED REF_BLAS_ROOT OR DEFINED REF_LAPACK_ROOT)
321320 find_file (ONEMATH_REF_BLAS_LIBNAME NAMES blas.dll libblas.so HINTS ${REF_BLAS_ROOT} ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64 )
322321 find_file (ONEMATH_REF_CBLAS_LIBNAME NAMES cblas.dll libcblas.so HINTS ${REF_BLAS_ROOT} ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64 )
322+ find_file (ONEMATH_REF_LAPACKE_LIBNAME NAMES lapacke64.dll liblapacke64.so HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64 )
323+ find_file (ONEMATH_REF_LAPACK_LIBNAME NAMES lapack64.dll liblapack64.so HINTS ${REF_LAPACK_ROOT} PATH_SUFFIXES lib lib64 )
323324endif ()
324325
325326# Add source directory and output to bin/
Original file line number Diff line number Diff line change @@ -104,7 +104,10 @@ The most important supported build options are:
104104 - False
105105 * - ENABLE_MKLCPU_THREAD_TBB
106106 - True, False
107- - True
107+ - True
108+ * - ENABLE_MKLCPU_THREAD_OMP
109+ - True, False
110+ - False
108111 * - BUILD_FUNCTIONAL_TESTS
109112 - True, False
110113 - True
Original file line number Diff line number Diff line change @@ -135,7 +135,10 @@ The most important supported build options are:
135135 - False
136136 * - ENABLE_MKLCPU_THREAD_TBB
137137 - True, False
138- - True
138+ - True
139+ * - ENABLE_MKLCPU_THREAD_OMP
140+ - True, False
141+ - False
139142 * - ENABLE_GENERIC_BLAS_BACKEND
140143 - True, False
141144 - False
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ target_include_directories(${LIB_OBJ}
3939target_compile_options (${LIB_OBJ} PRIVATE ${ONEMATH_BUILD_COPT} )
4040
4141if (TARGET MKL::MKL_SYCL::LAPACK)
42- target_link_libraries (${LIB_OBJ} PUBLIC ONEMATH::SYCL::SYCL MKL::MKL_SYCL::LAPACK )
42+ target_link_libraries (${LIB_OBJ} PUBLIC ONEMATH::SYCL::SYCL MKL::MKL_SYCL::LAPACK MKL::MKL_SYCL::BLAS )
4343else ()
4444 target_link_libraries (${LIB_OBJ} PUBLIC ONEMATH::SYCL::SYCL MKL::MKL_DPCPP )
4545endif ()
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ target_include_directories(${LIB_OBJ}
3939target_compile_options (${LIB_OBJ} PRIVATE ${ONEMATH_BUILD_COPT} )
4040
4141if (TARGET MKL::MKL_SYCL::LAPACK)
42- target_link_libraries (${LIB_OBJ} PUBLIC ONEMATH::SYCL::SYCL MKL::MKL_SYCL::LAPACK )
42+ target_link_libraries (${LIB_OBJ} PUBLIC ONEMATH::SYCL::SYCL MKL::MKL_SYCL::LAPACK MKL::MKL_SYCL::BLAS )
4343else ()
4444 target_link_libraries (${LIB_OBJ} PUBLIC ONEMATH::SYCL::SYCL MKL::MKL_DPCPP )
4545endif ()
Original file line number Diff line number Diff line change 1717# SPDX-License-Identifier: Apache-2.0
1818#===============================================================================
1919add_compile_definitions (
20- ONEMATH_REF_LAPACK_LIBNAME= "${LAPACK64_file } "
21- ONEMATH_REF_LAPACKE_LIBNAME= "${LAPACKE64_file } "
20+ ONEMATH_REF_LAPACK_LIBNAME= "${ONEMATH_REF_LAPACK_LIBNAME } "
21+ ONEMATH_REF_LAPACKE_LIBNAME= "${ONEMATH_REF_LAPACKE_LIBNAME } "
2222 ONEMATH_REF_CBLAS_LIBNAME= "${ONEMATH_REF_CBLAS_LIBNAME} " )
2323add_subdirectory (source )
2424add_subdirectory (common )
You can’t perform that action at this time.
0 commit comments