Execution Policies¶
Top Level Execution Policies¶
ExecutionPolicyConcept is the fundamental abstraction to represent “how” the execution of a Kokkos parallel pattern takes place.
Policy |
Description |
---|---|
Each iterate is an integer in a contiguous range |
|
Each iterate for each rank is an integer in a contiguous range |
|
Assigns to each iterate in a contiguous range a team of threads |
Nested Execution Policies¶
Nested Execution Policies are used to dispatch parallel work inside of an already executing parallel region either dispatched with a TeamPolicy or a task policy. NestedPolicies summary.
Policy |
Description |
---|---|
Used inside of a TeamPolicy kernel to perform nested parallel loops over a multidimensional range split over threads of a team. |
|
Used inside of a TeamPolicy kernel to perform nested parallel loops split over threads of a team. |
|
Used inside of a TeamPolicy kernel to perform nested parallel loops over a multidimensional range split over threads of a team and their vector lanes. |
|
Used inside of a TeamPolicy kernel to perform nested parallel loops split over threads of a team and their vector lanes. |
|
Used inside of a TeamPolicy kernel to perform nested parallel loops over a multidimensional range with vector lanes of a thread. |
|
Used inside of a TeamPolicy kernel to perform nested parallel loops with vector lanes of a thread. |
Common Arguments for all Execution Policies¶
Execution Policies generally accept compile time arguments via template parameters and runtime parameters via constructor arguments or setter functions.
Tip
Template arguments can be given in arbitrary order.
Argument |
Options |
Purpose |
---|---|---|
ExecutionSpace |
|
Specify the Execution Space to execute the kernel in. Defaults to |
Schedule |
|
Specify scheduling policy for work items. |
IndexType |
e.g. |
Specify integer type to be used for traversing the iteration space. Defaults to the |
LaunchBounds |
|
Specifies hints to to the compiler about CUDA/HIP launch bounds. |
WorkTag |
|
Specify the work tag type used to call the functor operator. Any arbitrary type defaults to |