File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ if(AF_WITH_EXTERNAL_PACKAGES_ONLY)
45
45
set (AF_REQUIRED REQUIRED )
46
46
endif ()
47
47
48
- # Set Intel OpenMP as default MKL thread layer
49
- if ( CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM " OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel " )
48
+ if ( CXX_COMPILER_NAME STREQUAL "dpcpp" OR CXX_COMPILER_NAME STREQUAL "dpcpp.exe"
49
+ OR CXX_COMPILER_NAME STREQUAL "icpx " OR CXX_COMPILER_NAME STREQUAL "icx.exe " )
50
50
set (MKL_THREAD_LAYER "TBB" CACHE STRING "The thread layer to choose for MKL" )
51
51
set (MKL_INTERFACE "ilp64" )
52
52
set (MKL_INTERFACE_INTEGER_SIZE 8 )
@@ -125,7 +125,10 @@ elseif(MKL_THREAD_LAYER STREQUAL "TBB")
125
125
set (MKL_THREADING "tbb_thread" )
126
126
else ()
127
127
endif ()
128
- find_package (MKL )
128
+
129
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13 )
130
+ find_package (MKL PATHS "$ENV{MKLROOT} " )
131
+ endif ()
129
132
130
133
af_multiple_option (NAME AF_COMPUTE_LIBRARY
131
134
DEFAULT ${default_compute_library}
@@ -218,7 +221,7 @@ if(${AF_BUILD_CPU} OR ${AF_BUILD_OPENCL})
218
221
if ("${AF_COMPUTE_LIBRARY} " STREQUAL "Intel-MKL"
219
222
OR "${AF_COMPUTE_LIBRARY} " STREQUAL "MKL" )
220
223
af_mkl_batch_check ()
221
- dependency_check (MKL_FOUND "Please ensure Intel-MKL / oneAPI-oneMKL is installed" )
224
+ dependency_check (MKL_Shared_FOUND "Please ensure Intel-MKL / oneAPI-oneMKL is installed" )
222
225
set (BUILD_WITH_MKL ON )
223
226
elseif ("${AF_COMPUTE_LIBRARY} " STREQUAL "FFTW/LAPACK/BLAS" )
224
227
dependency_check (FFTW_FOUND "FFTW not found" )
You can’t perform that action at this time.
0 commit comments