Skip to content

Commit

Permalink
SYCL: Make sure to call find_dependency for oneDPL if necessary (kokk…
Browse files Browse the repository at this point in the history
…os#6870)

* Make sure to call find_dependency for oneDPL if necessary

* Move linking with oneDPL to algorithms

* Don't guard KOKKOS_IMPORT_TPL by CMake language
  • Loading branch information
masterleinad committed Mar 13, 2024
1 parent a2b64e0 commit 5e7cab9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions algorithms/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ KOKKOS_LIB_INCLUDE_DIRECTORIES(kokkosalgorithms
)

KOKKOS_LINK_TPL(kokkoscontainers PUBLIC ROCTHRUST)
KOKKOS_LINK_TPL(kokkoscore PUBLIC ONEDPL)
3 changes: 3 additions & 0 deletions cmake/Modules/FindTPLONEDPL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ ELSE()
COMPILE_DEFINITIONS PSTL_USE_PARALLEL_POLICIES=0 _GLIBCXX_USE_TBB_PAR_BACKEND=0
)
ENDIF()

# Export oneDPL as a Kokkos dependency
KOKKOS_EXPORT_CMAKE_TPL(oneDPL)
ENDIF()
2 changes: 1 addition & 1 deletion cmake/kokkos_tpls.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ IF (NOT WIN32)
ENDIF()
IF (NOT KOKKOS_ENABLE_COMPILE_AS_CMAKE_LANGUAGE)
KOKKOS_IMPORT_TPL(ROCM INTERFACE)
KOKKOS_IMPORT_TPL(ONEDPL INTERFACE)
ENDIF()
KOKKOS_IMPORT_TPL(ONEDPL INTERFACE)
KOKKOS_IMPORT_TPL(LIBQUADMATH)
KOKKOS_IMPORT_TPL(ROCTHRUST)

Expand Down
1 change: 0 additions & 1 deletion core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ IF (NOT WIN32)
ENDIF()
IF (NOT KOKKOS_ENABLE_COMPILE_AS_CMAKE_LANGUAGE)
KOKKOS_LINK_TPL(kokkoscore PUBLIC ROCM)
KOKKOS_LINK_TPL(kokkoscore PUBLIC ONEDPL)
ENDIF()

# FIXME: We need a proper solution to figure out whether to enable
Expand Down

0 comments on commit 5e7cab9

Please sign in to comment.