diff --git a/CMakeLists.txt b/CMakeLists.txt index 78f1ceafe..569bef6ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,7 +203,7 @@ if("${DDC_BUILD_KERNELS_SPLINES}") ) if("${DDC_KokkosKernels_DEPENDENCY_POLICY}" STREQUAL "AUTO") if(NOT TARGET Kokkos::kokkoskernels) - find_package(KokkosKernels QUIET) + find_package(KokkosKernels 4.5...<5 QUIET) if(NOT KokkosKernels_FOUND) ddc_configure_kokkos_kernels() endif() @@ -211,7 +211,7 @@ if("${DDC_BUILD_KERNELS_SPLINES}") elseif("${DDC_KokkosKernels_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") ddc_configure_kokkos_kernels() elseif("${DDC_KokkosKernels_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") - find_package(KokkosKernels REQUIRED) + find_package(KokkosKernels 4.5...<5 REQUIRED) endif() add_library(ddc_splines INTERFACE) diff --git a/cmake/DDCConfig.cmake.in b/cmake/DDCConfig.cmake.in index beaa15f5f..64bca6fa1 100644 --- a/cmake/DDCConfig.cmake.in +++ b/cmake/DDCConfig.cmake.in @@ -28,7 +28,7 @@ if(@DDC_BUILD_KERNELS_SPLINES@) list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) ddc_find_dependency(LAPACKE) list(POP_FRONT CMAKE_MODULE_PATH) - ddc_find_dependency(KokkosKernels) + ddc_find_dependency(KokkosKernels 4.5...<5) endif() if(@DDC_BUILD_PDI_WRAPPER@) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 21f8a9648..d0eebe5cf 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -21,7 +21,7 @@ set(DOXYGEN_EXAMPLE_PATH "${DDC_SOURCE_DIR}/examples") set(DOXYGEN_EXPAND_ONLY_PREDEF YES) set(DOXYGEN_EXTRACT_ALL YES CACHE STRING "") set(DOXYGEN_EXCLUDE_SYMBOLS "detail") -set(DOXYGEN_EXCLUDE_PATTERNS "*/experimental/*;*/detail/*") +set(DOXYGEN_EXCLUDE_PATTERNS "*/detail/*;*/experimental/*;*/kokkos-kernels-ext/*") set(DOXYGEN_EXTRACT_LOCAL_CLASSES YES) set(DOXYGEN_FULL_PATH_NAMES NO) set(DOXYGEN_HTML_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/html") diff --git a/include/ddc/kernels/splines/KokkosBatched_Gbtrs.hpp b/include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Gbtrs.hpp similarity index 77% rename from include/ddc/kernels/splines/KokkosBatched_Gbtrs.hpp rename to include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Gbtrs.hpp index b9c1d099b..d1c1c6d31 100644 --- a/include/ddc/kernels/splines/KokkosBatched_Gbtrs.hpp +++ b/include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Gbtrs.hpp @@ -1,18 +1,10 @@ -//@HEADER -// ************************************************************************ +// Copyright (C) The DDC development team, see COPYRIGHT.md file // -// Kokkos v. 4.0 -// Copyright (2022) National Technology & Engineering -// Solutions of Sandia, LLC (NTESS). -// -// Under the terms of Contract DE-NA0003525 with NTESS, -// the U.S. Government retains certain rights in this software. -// -// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. -// See https://kokkos.org/LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//@HEADER +// SPDX-License-Identifier: MIT + +// clang-format off +// NOLINTBEGIN(*) + #ifndef KOKKOSBATCHED_GBTRS_HPP_ #define KOKKOSBATCHED_GBTRS_HPP_ @@ -62,3 +54,6 @@ struct SerialGbtrs { #include "KokkosBatched_Gbtrs_Serial_Impl.hpp" #endif // KOKKOSBATCHED_GBTRS_HPP_ + +// NOLINTEND(*) +// clang-format on diff --git a/include/ddc/kernels/splines/KokkosBatched_Gbtrs_Serial_Impl.hpp b/include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Gbtrs_Serial_Impl.hpp similarity index 90% rename from include/ddc/kernels/splines/KokkosBatched_Gbtrs_Serial_Impl.hpp rename to include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Gbtrs_Serial_Impl.hpp index f7f7f9d65..2625434f1 100644 --- a/include/ddc/kernels/splines/KokkosBatched_Gbtrs_Serial_Impl.hpp +++ b/include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Gbtrs_Serial_Impl.hpp @@ -1,18 +1,9 @@ -//@HEADER -// ************************************************************************ +// Copyright (C) The DDC development team, see COPYRIGHT.md file // -// Kokkos v. 4.0 -// Copyright (2022) National Technology & Engineering -// Solutions of Sandia, LLC (NTESS). -// -// Under the terms of Contract DE-NA0003525 with NTESS, -// the U.S. Government retains certain rights in this software. -// -// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. -// See https://kokkos.org/LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//@HEADER +// SPDX-License-Identifier: MIT + +// clang-format off +// NOLINTBEGIN(*) #ifndef KOKKOSBATCHED_GBTRS_SERIAL_IMPL_HPP_ #define KOKKOSBATCHED_GBTRS_SERIAL_IMPL_HPP_ @@ -174,3 +165,6 @@ struct SerialGbtrs { } // namespace KokkosBatched #endif // KOKKOSBATCHED_GBTRS_SERIAL_IMPL_HPP_ + +// NOLINTEND(*) +// clang-format on diff --git a/include/ddc/kernels/splines/KokkosBatched_Getrs.hpp b/include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Getrs.hpp similarity index 70% rename from include/ddc/kernels/splines/KokkosBatched_Getrs.hpp rename to include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Getrs.hpp index 895492b27..633b90b8a 100644 --- a/include/ddc/kernels/splines/KokkosBatched_Getrs.hpp +++ b/include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Getrs.hpp @@ -1,18 +1,10 @@ -//@HEADER -// ************************************************************************ +// Copyright (C) The DDC development team, see COPYRIGHT.md file // -// Kokkos v. 4.0 -// Copyright (2022) National Technology & Engineering -// Solutions of Sandia, LLC (NTESS). -// -// Under the terms of Contract DE-NA0003525 with NTESS, -// the U.S. Government retains certain rights in this software. -// -// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. -// See https://kokkos.org/LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//@HEADER +// SPDX-License-Identifier: MIT + +// clang-format off +// NOLINTBEGIN(*) + #ifndef KOKKOSBATCHED_GETRS_HPP_ #define KOKKOSBATCHED_GETRS_HPP_ @@ -51,3 +43,6 @@ struct SerialGetrs { #include "KokkosBatched_Getrs_Serial_Impl.hpp" #endif // KOKKOSBATCHED_GETRS_HPP_ + +// NOLINTEND(*) +// clang-format on diff --git a/include/ddc/kernels/splines/KokkosBatched_Getrs_Serial_Impl.hpp b/include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Getrs_Serial_Impl.hpp similarity index 75% rename from include/ddc/kernels/splines/KokkosBatched_Getrs_Serial_Impl.hpp rename to include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Getrs_Serial_Impl.hpp index e471e9ebd..4840c1280 100644 --- a/include/ddc/kernels/splines/KokkosBatched_Getrs_Serial_Impl.hpp +++ b/include/ddc/kernels/splines/kokkos-kernels-ext/KokkosBatched_Getrs_Serial_Impl.hpp @@ -1,18 +1,9 @@ -//@HEADER -// ************************************************************************ +// Copyright (C) The DDC development team, see COPYRIGHT.md file // -// Kokkos v. 4.0 -// Copyright (2022) National Technology & Engineering -// Solutions of Sandia, LLC (NTESS). -// -// Under the terms of Contract DE-NA0003525 with NTESS, -// the U.S. Government retains certain rights in this software. -// -// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. -// See https://kokkos.org/LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//@HEADER +// SPDX-License-Identifier: MIT + +// clang-format off +// NOLINTBEGIN(*) #ifndef KOKKOSBATCHED_GETRS_SERIAL_IMPL_HPP_ #define KOKKOSBATCHED_GETRS_SERIAL_IMPL_HPP_ @@ -69,8 +60,8 @@ struct SerialGetrs { [[maybe_unused]] auto info_laswp = KokkosBatched::SerialLaswp::invoke(piv, b); - auto info_trsm = KokkosBatched::SerialTrsm::invoke(1.0, A, b); + [[maybe_unused]] auto info_trsm = KokkosBatched::SerialTrsm::invoke(1.0, A, b); info_trsm = KokkosBatched::SerialTrsm::invoke(1.0, A, b); @@ -89,8 +80,8 @@ struct SerialGetrs { auto info = checkGetrsInput(A, b); if (info) return info; - auto info_trsm = KokkosBatched::SerialTrsm::invoke(1.0, A, b); + [[maybe_unused]] auto info_trsm = KokkosBatched::SerialTrsm::invoke(1.0, A, b); info_trsm = KokkosBatched::SerialTrsm::invoke( 1.0, A, b); @@ -103,3 +94,6 @@ struct SerialGetrs { } // namespace KokkosBatched #endif // KOKKOSBATCHED_GETRS_SERIAL_IMPL_HPP_ + +// NOLINTEND(*) +// clang-format on diff --git a/include/ddc/kernels/splines/splines_linear_problem_band.hpp b/include/ddc/kernels/splines/splines_linear_problem_band.hpp index 8d46aa0c8..3d674b729 100644 --- a/include/ddc/kernels/splines/splines_linear_problem_band.hpp +++ b/include/ddc/kernels/splines/splines_linear_problem_band.hpp @@ -20,9 +20,10 @@ #include #endif -#include "KokkosBatched_Gbtrs.hpp" #include +#include "kokkos-kernels-ext/KokkosBatched_Gbtrs.hpp" + #include "splines_linear_problem.hpp" namespace ddc::detail { diff --git a/include/ddc/kernels/splines/splines_linear_problem_dense.hpp b/include/ddc/kernels/splines/splines_linear_problem_dense.hpp index 59b230a71..8ee0c22b9 100644 --- a/include/ddc/kernels/splines/splines_linear_problem_dense.hpp +++ b/include/ddc/kernels/splines/splines_linear_problem_dense.hpp @@ -18,9 +18,10 @@ #include #endif -#include "KokkosBatched_Getrs.hpp" #include +#include "kokkos-kernels-ext/KokkosBatched_Getrs.hpp" + #include "splines_linear_problem.hpp" namespace ddc::detail {