| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| 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,14 @@ 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 | + # VCPKG overrides the find_package command and the PATH parameter is currently | ||
| 131 | + # broken with the current version of VCPKG so we are setting the MKL_ROOT | ||
| 132 | + # directory to the MKLROOT environment variable. | ||
| 133 | + set(MKL_ROOT "$ENV{MKLROOT}") | ||
| 134 | + find_package(MKL) | ||
| 135 | + endif() | ||
| 129 | 136 | ||
| 130 | 137 | af_multiple_option(NAME AF_COMPUTE_LIBRARY | |
| 131 | 138 | DEFAULT ${default_compute_library} | |
@@ -218,7 +225,7 @@ if(${AF_BUILD_CPU} OR ${AF_BUILD_OPENCL}) | |||
| 218 | 225 | if("${AF_COMPUTE_LIBRARY}" STREQUAL "Intel-MKL" | |
| 219 | 226 | OR "${AF_COMPUTE_LIBRARY}" STREQUAL "MKL") | |
| 220 | 227 | af_mkl_batch_check() | |
| 221 | - dependency_check(MKL_FOUND "Please ensure Intel-MKL / oneAPI-oneMKL is installed") | ||
| 228 | + dependency_check(MKL_Shared_FOUND "Please ensure Intel-MKL / oneAPI-oneMKL is installed") | ||
| 222 | 229 | set(BUILD_WITH_MKL ON) | |
| 223 | 230 | elseif("${AF_COMPUTE_LIBRARY}" STREQUAL "FFTW/LAPACK/BLAS") | |
| 224 | 231 | dependency_check(FFTW_FOUND "FFTW not found") | |
| Back | FazBrowse Home | New Git URL |
0 commit comments