• Stars
    star
    240
  • Rank 168,195 (Top 4 %)
  • Language
    C++
  • License
    Other
  • Created about 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tutorials for the Kokkos C++ Performance Portability Programming EcoSystem

Kokkos

Kokkos Tutorials

This repository contains tutorials for the Kokkos C++ programming model (github.com/kokkos/kokkos).

The Kokkos Lectures

We are currently running The Kokkos Lectures - an extended version of our Intro-Full Tutorial, spanning 8 modules. For information on that, Slides and Recordings visit: The Kokkos Lectures Wiki

Other Tutorial Compilations

Tutorials in the Intro-Short directory cover

  • simple data parallel patterns and policies
  • multidimensional array views
  • execution and memory spaces

Tutorials in the Intro-Full directory cover

  • simple data parallel patterns and policies
  • multidimensional array views
  • execution and memory spaces
  • thread safety and atomic operations
  • hierarchical data parallel patterns

Building the Tutorials

All the tutorial folders can be built using either the Makefile or the CMake CMakeLists.txt file in each folder.

Makefiles

The raw Makefiles require Makefile variables to be properly configured. In most examples, this is KOKKOS_PATH pointing to the Kokkos source directory and KOKKOS_DEVICES which contains the list of device backends to build. This will build a new Kokkos library for each exercise.

If you are on a system compatible to our AWS instances, you can type

make
make test

in the Exercises directory.

Compatible means:

  • X86 with a NVIDIA V100 GPU
  • kokkos was cloned to ${HOME}/Kokkos/kokkos

CMake + Spack

The CMake files build against an installed Kokkos library. The easiest way to do this is using Spack. There is a spack.sh script that automates most of this. The Spack script can be run in any excercise folder with a CMakeLists.txt.

../../BuildScripts/spack.sh +openmp %[email protected]

This will make sure Kokkos is installed with the OpenMP backend for the GCC 7.3.0 compiler. It will then configure CMake and create a spack-build folder where make can be run. The spack.sh accepts the full list of variants and specs as the parent Kokkos package, which can be viewed by running:

spack info kokkos

The spack.sh script uses the special DIY mode of Spack to install dependencies and configure the current source folder to build.

For Kokkos Kernels tutorials, there is similarly a kk-spack.sh script, e.g.

../../BuildScripts/kk-spack.sh +openmp %[email protected] ^kokkos+aggressive_vectorization

All the arguments to the script get passed as a spec for the tutorial. We are indirectly configuring Kokkos, hence the ^ notation for specifying the exact Kokkos dependency spec.

More Repositories

1

kokkos

Kokkos C++ Performance Portability Programming Ecosystem: The Programming Model - Parallel Execution and Memory Abstraction
C++
1,977
star
2

mdspan

Reference implementation of mdspan targeting C++23
C++
295
star
3

kokkos-kernels

Kokkos C++ Performance Portability Programming Ecosystem: Math Kernels - Provides BLAS, Sparse BLAS and Graph Kernels
C++
294
star
4

stdBLAS

Reference Implementation for stdBLAS
C++
124
star
5

kokkos-tools

Kokkos C++ Performance Portability Programming EcoSystem: Profiling and Debugging Tools
C++
71
star
6

pykokkos

Provides Kokkos performance portable parallel programming in Python.
Python
65
star
7

kokkos-remote-spaces

Kokkos Remote Spaces implements distributed Kokkos Views and related APIs for distributed parallel programming.
C++
42
star
8

array_ref

Polymorphic multidimensional array view
C++
35
star
9

pykokkos-base

Python bindings for data interoperability with Kokkos (View, DynRankView)
C++
24
star
10

kokkos-fortran-interop

The Kokkos Fortran Interop repository contains tools and interfaces which help interactions between Fortran portions of an applications and C++ portions using Kokkos.
Fortran
24
star
11

kokkos-fft

A shared-memory FFT for the Kokkos ecosystem
C++
21
star
12

simd-math

Library for length agnostic SIMD intrinsic support and the corresponding math operations
C++
20
star
13

kokkos-comm

Experimental MPI Wrapper for Kokkos
C++
15
star
14

mdarray

C++
10
star
15

kokkos-miniapps

Mini-applications that exclusively use the Kokkos programming model
C++
10
star
16

ISO-CPP-Papers

HTML
8
star
17

nvcc_wrapper

Wrapper shell script for NVIDIA nvcc to better conform to host compiler command line arguments
Shell
7
star
18

hpcbind

Binding utilities used for MPI, OpenMP and GPUs
Shell
6
star
19

kokkos-resilience

Resilience Extensions for Kokkos
C++
4
star
20

kokkos-core-wiki

3
star
21

kokkos-benchmark-results

3
star
22

kokkos.github.io

Documentation Repo
HTML
1
star
23

kokkos-openmptarget-examples

This is a repository for sharing OpenMP 5 target usage examples and reproducers
C++
1
star