10 _deviceToUse(device==RoundRobin ? 0 : _device),
11 _isInBspSection(false) {}
14 if (nestedParallelismLevel <= 1) {
15 _isInBspSection =
true;
20 if (nestedParallelismLevel <= 1) {
21 _isInBspSection =
false;
26 if (_device==RoundRobin) toggleDevice();
27 return FuseInstruction(_deviceToUse, 1, std::numeric_limits<int>::max());
32 int nestedParallelismLevel,
36 if (nestedParallelismLevel <= 1) {
57 double averageNumberOfPendingReadyTasksPerProcessTaskExecution
static Device & getInstance()
int getNumberOfDevices() const
Return the number of GPUs that are available.
static constexpr int Host
AllOnGPU(int device)
Initialise strategy.
virtual void startBSPSection(int nestedParallelismLevel) override
Notifies the strategy that we enter a BSP section.
virtual void updateFuseStatistics(int taskType, int queueSize, double averageNumberOfPendingReadyTasksPerProcessTaskExecution) override
virtual ExecutionPolicy paralleliseForkJoinSection(int nestedParallelismLevel, int numberOfTasks, int taskType) override
No if we encounter nested parallelism.
virtual FuseInstruction fuse(int taskType) override
Return how many tasks to fuse at least, at most and to which device to deploy them.
virtual void endBSPSection(int nestedParallelismLevel) override
Notifies the strategy that we leave a BSP (fork-join) section.
ExecutionPolicy
Provide hint of execution policy.