|
Peano
|
Deploy all tasks to GPU. More...
#include <AllOnGPU.h>


Public Member Functions | |
| AllOnGPU (int device, FusionImplementation FusionImplementation=FusionImplementation::LazyEvaluation) | |
| Initialise strategy. | |
| virtual void | startBSPSection (int nestedParallelismLevel) override |
| Notifies the strategy that we enter a BSP section. | |
| virtual void | endBSPSection (int nestedParallelismLevel) override |
| Notifies the strategy that we leave a BSP (fork-join) section. | |
| virtual FuseInstruction | fuse (int taskType) override |
| Return how many tasks to fuse at least, at most and to which device to deploy them. | |
| virtual ExecutionPolicy | paralleliseForkJoinSection (int nestedParallelismLevel, int numberOfTasks, int taskType) override |
| No if we encounter nested parallelism. | |
| virtual void | updateFuseStatistics (int taskType, int queueSize, double averageNumberOfPendingReadyTasksPerProcessTaskExecution, double probabilityThatTaskIsCompleted) override |
| Update task fusion status. | |
| virtual FusionImplementation | getFusionImplementation () const override |
| Hardcoded to tarch::multicore::orchestration::FusionImplementation::LazyEvaluation. | |
Public Member Functions inherited from tarch::multicore::orchestration::Strategy | |
| virtual | ~Strategy ()=default |
Static Public Attributes | |
| static int constexpr | RoundRobin = -1 |
Static Public Attributes inherited from tarch::multicore::orchestration::Strategy | |
| static constexpr int | EndOfBSPSection = -1 |
Private Member Functions | |
| void | toggleDevice () |
Private Attributes | |
| const int | _device |
| int | _deviceToUse |
| bool | _isInBspSection |
| const FusionImplementation | _fusionImplementation |
Additional Inherited Members | |
Public Types inherited from tarch::multicore::orchestration::Strategy | |
| enum class | ExecutionPolicy { RunSerially , RunParallel } |
| Provide hint of execution policy. More... | |
Deploy all tasks to GPU.
This is a very simple orchestration which tries to get all tasks over to a GPU. For this, it relies on tarch::multicore::orchestration::FusionImplementation::LazyEvaluation as orchestration strategy. The class puts no restrictions on the number of tasks that it can fuse. Depending on how the object is initialised, all tasks either go on one GPU, or the routine runs round robin through all accelerators.
Definition at line 26 of file AllOnGPU.h.
| tarch::multicore::orchestration::AllOnGPU::AllOnGPU | ( | int | device, |
| FusionImplementation | FusionImplementation = FusionImplementation::LazyEvaluation |
||
| ) |
Initialise strategy.
| device | Either a nonnegative integer picking one device or RoundRobin. |
|
overridevirtual |
Notifies the strategy that we leave a BSP (fork-join) section.
Implements tarch::multicore::orchestration::Strategy.
|
overridevirtual |
Return how many tasks to fuse at least, at most and to which device to deploy them.
Implements tarch::multicore::orchestration::Strategy.
|
overridevirtual |
|
overridevirtual |
No if we encounter nested parallelism.
Implements tarch::multicore::orchestration::Strategy.
|
overridevirtual |
Notifies the strategy that we enter a BSP section.
Implements tarch::multicore::orchestration::Strategy.
|
private |
|
overridevirtual |
Update task fusion status.
Feed orchestration with some stats around the task queue of interest. This routine is not called every time a process read tasks kicks off, but only every now and then. Furthermore, please note that this routine is invoked iff the orchestration beforehand had decided to fuse tasks.
| taskType | Number of the task that we are studying |
| queueSize | Size of the queue at this observation point |
| averageNumberOfReadyTasksPerProcessTaskExecution | average over number of tasks in the queue whenever a process task has kicked off and the underlying real task has not completed yet. |
| probabilityThatTaskIsCompleted | Probability that task result has been there already when the corresponding instance of ProcessReadyTask fires up. This is a biased value: If we try to look up if a task is already completed and the underlying dictionary is locked, then this counts as a "no hit" as well. |
Implements tarch::multicore::orchestration::Strategy.
|
private |
Definition at line 28 of file AllOnGPU.h.
|
private |
Definition at line 29 of file AllOnGPU.h.
|
private |
Definition at line 31 of file AllOnGPU.h.
|
private |
Definition at line 30 of file AllOnGPU.h.
|
staticconstexpr |
Definition at line 35 of file AllOnGPU.h.