Skip to content

Commit

Permalink
Attempt to use MKL's CMake target
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-kelley committed Apr 18, 2024
1 parent b812adb commit 64e4632
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions cmake/TPLs/FindTPLMKL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,21 @@
# pseudorandom number generators. That's why we require a header
# file, to access the function declarations.

TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( MKL
REQUIRED_HEADERS mkl.h
REQUIRED_LIBS_NAMES mkl_rt
)
IF(KOKKOS_ENABLE_SYCL)
# For OneAPI MKL on GPU, use the CMake target
find_package(MKL)
IF(MKL_FOUND)
tribits_extpkg_create_imported_all_libs_target_and_config_file( MKL
INNER_FIND_PACKAGE_NAME MKL
IMPORTED_TARGETS_FOR_ALL_LIBS MKL::MKL)
ENDIF()
ELSEIF()
# For host MKL, the single library libmkl_rt is sufficient
TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( MKL
REQUIRED_HEADERS mkl.h
REQUIRED_LIBS_NAMES mkl_rt
)
ENDIF()

# In the past, MKL users had to link with a long list of libraries.
# The choice of libraries enables specific functionality. Intel
Expand Down

0 comments on commit 64e4632

Please sign in to comment.