Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/base-linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
python-version: [3.11, 3.12, 3.13]
kokkos-branch: ['4.7.01']
kokkos-branch: ['5.0.2']
os: [ubuntu-latest, ubuntu-22.04-arm]

runs-on: ${{matrix.os}}
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
strategy:
matrix:
python-version: [3.11, 3.12, 3.13]
kokkos-branch: ['4.7.01']
kokkos-branch: ['5.0.2']
os: [ubuntu-latest]

runs-on: ${{matrix.os}}
Expand Down
8 changes: 6 additions & 2 deletions base/cmake/Modules/KokkosPythonKokkos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ IF(_INTERNAL_KOKKOS)
ADD_OPTION(Kokkos_ENABLE_CUDA "Build Kokkos submodule with CUDA support" ON)
ADD_OPTION(Kokkos_ENABLE_CUDA_UVM "Build Kokkos submodule with CUDA UVM support" ON)
ADD_OPTION(Kokkos_ENABLE_CUDA_LAMBDA "Build Kokkos submodule with CUDA lambda support" ON)
# Kokkos 5+ requires DEPRECATED_CODE_4 to use CUDA UVM (UVM is deprecated in favor of SharedSpace)
IF(Kokkos_ENABLE_CUDA_UVM)
SET(Kokkos_ENABLE_DEPRECATED_CODE_4 ON CACHE BOOL "Required for Kokkos_ENABLE_CUDA_UVM in Kokkos 5+" FORCE)
ENDIF()
Comment on lines +158 to +160
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm do we know why we require this? because this will go away eventually

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without that, we will run into an issue during the PyKokkos compilation process:

CMake Error at _skbuild/linux-x86_64-3.13/cmake-build/_deps/kokkos-src/cmake/kokkos_arch.cmake:1422 (message):
  Kokkos_ENABLE_DEPRECATED_CODE_4 must be set to use Kokkos_ENABLE_CUDA_UVM
Call Stack (most recent call first):
  _skbuild/linux-x86_64-3.13/cmake-build/_deps/kokkos-src/cmake/kokkos_tribits.cmake:161 (include)
  _skbuild/linux-x86_64-3.13/cmake-build/_deps/kokkos-src/CMakeLists.txt:212 (kokkos_setup_build_environment)

If we want to remove unified memory support, we should remove this option altogether, but that definitely should be a different PR, since there are multiple dependencies in the core

ENDIF()

# Check if we should use submodule or FetchContent
Expand All @@ -167,8 +171,8 @@ IF(_INTERNAL_KOKKOS)
MESSAGE(STATUS "Fetching Kokkos via FetchContent")
FETCHCONTENT_DECLARE(
Kokkos
URL https://github.com/kokkos/kokkos/releases/download/4.7.01/kokkos-4.7.01.zip
URL_HASH SHA256=2b7c9964ace4245dec0b952932873d4b1235933dbb7d8d1d69e17b4368784503
URL https://github.com/kokkos/kokkos/releases/download/5.0.2/kokkos-5.0.2.zip
URL_HASH SHA256=c4ec42b952a0c8474d370cf0aac025adeed81326c78c23ecdfc98c18818a575a
)
FETCHCONTENT_MAKEAVAILABLE(Kokkos)
FETCHCONTENT_GETPROPERTIES(Kokkos SOURCE_DIR Kokkos_SOURCE_DIR)
Expand Down
2 changes: 1 addition & 1 deletion base/cmake/Modules/KokkosPythonOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ set(CMAKE_C_VISIBILITY_PRESET "default" CACHE STRING "Default visibility")
set(CMAKE_CXX_VISIBILITY_PRESET "default" CACHE STRING "Default visibility")

# pybind11 has not migrated to CMAKE_CXX_STANDARD and neither has kokkos
SET(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ language standard")
SET(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ language standard")
SET(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "Require standard")
SET(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Extensions")
IF(NOT Kokkos_CXX_STANDARD)
Expand Down
4 changes: 2 additions & 2 deletions base/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def add_arg_bool_option(lc_name, disp_name, default=None):
add_arg_bool_option("timing", "ENABLE_TIMING")
parser.add_argument(
"--cxx-standard",
default=17,
default=20,
type=int,
choices=[14, 17, 20],
help="Set C++ language standard",
help="Set C++ language standard (Kokkos 5+ requires C++20)",
)
parser.add_argument(
"--enable-view-ranks",
Expand Down
2 changes: 1 addition & 1 deletion pykokkos/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ endif()

# Dependencies
find_package(pybind11 2.11 CONFIG REQUIRED)
find_package(Kokkos 4.7.1 EXACT REQUIRED)
find_package(Kokkos 5.0.2 EXACT REQUIRED)

# Sources and targets
file(GLOB SOURCE_FILES "*.cpp")
Expand Down
Loading