FAQ¶
How do I join the Kokkos slack channel?¶
You can find the slack channel at kokkosteam.slack.com. Register a new account with your email. We reached the limit of whitelisted organizations, but every member of the Kokkos Slack workspace can invite more people. If no one you know is in the Slack workspace you can contact the Kokkos maintainers (their emails are in the LICENSE file).
How do I compile Kokkos with C++20 or C++23?¶
When configuring Kokkos with cmake, add the flag -DCMAKE_CXX_STANDARD=20 (or 23). Ensure that the flag is also set for any downstream applications.
How do I set up a debug build?¶
To set up a debug build in Kokkos, you can choose between a full symbolic debug (slowest) or a “fast debug” that keeps optimizations while enabling safety checks.
Standard (Full) Debug Build
Use this for full source-level debugging (e.g., using GDB, LLDB, or cuda-gdb).
CMake Flags:
-DCMAKE_BUILD_TYPE=DebugEffects: Sets
-O0(no optimization), adds host debug symbols (-g), and enablesKOKKOS_ASSERT.CUDA Specifics: To get full device-side symbolic information, you must manually add
-DCMAKE_CXX_FLAGS="-G"(unless using Clang) and usenvcc_wrapperasCMAKE_CXX_COMPILER.
Warning
-Gdisables nearly all GPU optimizations and will significantly slow down your kernels.Fast Debug
This is a good compromise for development. It keeps optimizations enabled but turns on internal safety logic.
CMake Flags:
-DCMAKE_BUILD_TYPE=RelWithDebInfoand-DKokkos_ENABLE_DEBUG=ONEffects: Keeps code fast (
-O2) and enablesKOKKOS_ASSERT.CUDA Specifics: Setting
-DKokkos_ENABLE_DEBUG=ONautomatically adds-lineinfowith NVCC. This provides source-line information for profilers (like Nsight) without the massive performance penalty of-G. No extra flags are required for “fast” GPU debugging.
Bounds Checking
By default, neither of the above options enables bounds checking due to the high overhead. To catch “out-of-bounds” errors in your Views:
CMake Flag:
-DKokkos_ENABLE_DEBUG_BOUNDS_CHECK=ON