Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6a3ef2e

Browse filesBrowse files
committed
Fix oneAPI find_package command to look at the MKLROOT env var
1 parent 6cb7924 commit 6a3ef2e
Copy full SHA for 6a3ef2e

File tree

Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed

‎CMakeLists.txt

Copy file name to clipboardExpand all lines: CMakeLists.txt
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ if(AF_WITH_EXTERNAL_PACKAGES_ONLY)
4545
set(AF_REQUIRED REQUIRED)
4646
endif()
4747

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")
5050
set(MKL_THREAD_LAYER "TBB" CACHE STRING "The thread layer to choose for MKL")
5151
set(MKL_INTERFACE "ilp64")
5252
set(MKL_INTERFACE_INTEGER_SIZE 8)
@@ -125,7 +125,10 @@ elseif(MKL_THREAD_LAYER STREQUAL "TBB")
125125
set(MKL_THREADING "tbb_thread")
126126
else()
127127
endif()
128-
find_package(MKL)
128+
129+
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
130+
find_package(MKL PATHS "$ENV{MKLROOT}")
131+
endif()
129132

130133
af_multiple_option(NAME AF_COMPUTE_LIBRARY
131134
DEFAULT ${default_compute_library}
@@ -218,7 +221,7 @@ if(${AF_BUILD_CPU} OR ${AF_BUILD_OPENCL})
218221
if("${AF_COMPUTE_LIBRARY}" STREQUAL "Intel-MKL"
219222
OR "${AF_COMPUTE_LIBRARY}" STREQUAL "MKL")
220223
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")
222225
set(BUILD_WITH_MKL ON)
223226
elseif("${AF_COMPUTE_LIBRARY}" STREQUAL "FFTW/LAPACK/BLAS")
224227
dependency_check(FFTW_FOUND "FFTW not found")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.