Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Task Parallelism

David Hollman edited this page Aug 14, 2019 · 10 revisions

Kokkos has support for lightweight task-based programming, which is currently pretty limited but we plan to substantially expand in the future.

Will Kokkos Tasking work for my problem?

Not all task-based problems are a good fit for the current Kokkos approach to tasking. Currently, the tasking interface in Kokkos is targetted at problems with kernels far too small to overcome the inherent overhead of top-level Kokkos data parallel launches—that is, small but plentiful data parallel tasks with a non-trivial dependency structure. For tasks that fit this general scale model but have (very) trivial dependency structures, it may be easier to use hierarchical parallelism, potentially with a Kokkos::Schedule<Dynamic> scheduling policy (see, for instance, this page) for load balancing if necessary.

Basic Usage

Fundamentally, task parallelism is just another form of parallelism in Kokkos. The same general idiom applies as for ordinary parallel dispatch:

parallel-dispatch

Similarly, for tasking, we have:

task-dispatch

Clone this wiki locally