This repository contains tutorials for the Kokkos C++ programming model (github.com/kokkos/kokkos).
The most comprehensive recording of our tutorials - the The Kokkos Lectures - are available on YouTube. For more information on that, including the Slides and Recordings visit: The Kokkos Lectures Wiki
The old slides are available in this repository under the legacy tag.
All the tutorial folders can be built using CMake.
CMake can build against an installed Kokkos library or download one automatically using FetchContent.
Without any Kokkos already installed, from an exercise directory, one can run the following:
cmake -B build_dir # -DKokkos_* options
cmake --build build_dirKokkos options are described in CMake options.
For example, OpenMP CPU exercises can be built as:
cmake -B build_openmp -DKokkos_ENABLE_OPENMP=ON
cmake --build build_openmpOn Mac, if OpenMP is not available, one can use the Threads backend:
cmake -B build_threads -DKokkos_ENABLE_THREADS=ON
cmake --build build_threadsFor a NVIDIA gpu, using gpu arch autodetection:
cmake -B build_cuda -DKokkos_ENABLE_CUDA=ON
cmake --build build_cudaTo pass an already installed Kokkos library, you can use classical CMake variables,
such as Kokkos_ROOT, or CMAKE_PREFIX_PATH.