Quellcode durchsuchen

Add STARPU_SCHED_SIMPLE_DECIDE_ALWAYS modular scheduler flag

Samuel Thibault vor 5 Jahren
Ursprung
Commit
991e4a88d8
3 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen
  1. 1 0
      ChangeLog
  2. 5 0
      include/starpu_sched_component.h
  3. 1 1
      src/sched_policies/modular_ez.c

+ 1 - 0
ChangeLog

@@ -50,6 +50,7 @@ Small features:
     to be called when the watchdog is raised
   * Add STARPU_LIMIT_CPU_NUMA_MEM environment variable.
   * Add STARPU_WORKERS_GETBIND environment variable.
+  * Add STARPU_SCHED_SIMPLE_DECIDE_ALWAYS modular scheduler flag.
 
 StarPU 1.3.3 (git revision 11afc5b007fe1ab1c729b55b47a5a98ef7f3cfad)
 ====================================================================

+ 5 - 0
include/starpu_sched_component.h

@@ -729,6 +729,11 @@ struct starpu_sched_tree *starpu_sched_component_make_scheduler(unsigned sched_c
 #define STARPU_SCHED_SIMPLE_DECIDE_ARCHS	(3<<0)
 
 /**
+   Request to create the scheduling decision-making component even if there is only one available choice. This is useful for instance when the decision-making component will store tasks itself (and not use STARPU_SCHED_SIMPLE_FIFO_ABOVE) to decide in which order tasks should be passed below.
+*/
+#define STARPU_SCHED_SIMPLE_DECIDE_ALWAYS	(1<<3)
+
+/**
    Request to add a perfmodel selector above the scheduling decision-making component. That way, only tasks with a calibrated performance model will be given to the component, other tasks will go to an eager branch that will distributed tasks so that their performance models will get calibrated.
    In other words, this is needed when using a component which needs performance models for tasks.
 */

+ 1 - 1
src/sched_policies/modular_ez.c

@@ -186,7 +186,7 @@ void starpu_sched_component_initialize_simple_schedulers(unsigned sched_ctx_id,
 		void *data = va_arg(varg_list, void *);
 		flags = va_arg(varg_list, unsigned);
 
-		if (nbelow == 1)
+		if (nbelow == 1 && !(flags & STARPU_SCHED_SIMPLE_DECIDE_ALWAYS))
 		{
 			/* Oh, no choice, we don't actually need to decide, just
 			 * use an eager scheduler */