Browse Source

add dmdap scheduler

Samuel Thibault 5 years ago
parent
commit
7d8f3b75ff

+ 8 - 4
doc/doxygen/chapters/320_scheduling.doxy

@@ -100,14 +100,18 @@ become available, without taking priorities into account.
 The <b>dmda</b> (deque model data aware) scheduler is similar to dm, but it also takes
 The <b>dmda</b> (deque model data aware) scheduler is similar to dm, but it also takes
 into account data transfer time.
 into account data transfer time.
 
 
+The <b>dmdap</b> (deque model data aware prio) scheduler is similar to dmda,
+except that it sorts tasks by priority order, which allows to become even closer
+to HEFT by respecting priorities after having made the scheduling decision (but
+it still schedules tasks in the order they become available).
+
 The <b>dmdar</b> (deque model data aware ready) scheduler is similar to dmda,
 The <b>dmdar</b> (deque model data aware ready) scheduler is similar to dmda,
 but it also privileges tasks whose data buffers are already available
 but it also privileges tasks whose data buffers are already available
 on the target device.
 on the target device.
 
 
-The <b>dmdas</b> (deque model data aware sorted) scheduler is similar to dmdar,
+The <b>dmdas</b> combines dmdap and dmdas: it sorts tasks by priority order,
-except that it sorts tasks by priority order, which allows to become even closer
+but for a given priority it will privilege tasks whose data buffers are already
-to HEFT by respecting priorities after having made the scheduling decision (but
+available on the target device.
-it still schedules tasks in the order they become available).
 
 
 The <b>dmdasd</b> (deque model data aware sorted decision) scheduler is similar
 The <b>dmdasd</b> (deque model data aware sorted decision) scheduler is similar
 to dmdas, except that when scheduling a task, it takes into account its priority
 to dmdas, except that when scheduling a task, it takes into account its priority

+ 1 - 1
examples/cholesky/cholesky.sh

@@ -17,7 +17,7 @@
 
 
 ROOT=${0%.sh}
 ROOT=${0%.sh}
 #[ -n "$STARPU_SCHEDS" ] || STARPU_SCHEDS=`$(dirname $0)/../../tools/starpu_sched_display`
 #[ -n "$STARPU_SCHEDS" ] || STARPU_SCHEDS=`$(dirname $0)/../../tools/starpu_sched_display`
-[ -n "$STARPU_SCHEDS" ] || STARPU_SCHEDS="dmdas modular-heft modular-heft-prio dmdar dmda dmdasd prio lws"
+[ -n "$STARPU_SCHEDS" ] || STARPU_SCHEDS="dmdas modular-heft modular-heft-prio dmdap dmdar dmda dmdasd prio lws"
 [ -n "$STARPU_HOSTNAME" ] || export STARPU_HOSTNAME=mirage
 [ -n "$STARPU_HOSTNAME" ] || export STARPU_HOSTNAME=mirage
 unset MALLOC_PERTURB_
 unset MALLOC_PERTURB_
 
 

+ 1 - 0
src/core/sched_policy.c

@@ -77,6 +77,7 @@ static struct starpu_sched_policy *predefined_policies[] =
 	&_starpu_sched_ws_policy,
 	&_starpu_sched_ws_policy,
 	&_starpu_sched_dm_policy,
 	&_starpu_sched_dm_policy,
 	&_starpu_sched_dmda_policy,
 	&_starpu_sched_dmda_policy,
+	&_starpu_sched_dmda_prio_policy,
 	&_starpu_sched_dmda_ready_policy,
 	&_starpu_sched_dmda_ready_policy,
 	&_starpu_sched_dmda_sorted_policy,
 	&_starpu_sched_dmda_sorted_policy,
 	&_starpu_sched_dmda_sorted_decision_policy,
 	&_starpu_sched_dmda_sorted_decision_policy,

+ 1 - 0
src/core/sched_policy.h

@@ -83,6 +83,7 @@ extern struct starpu_sched_policy _starpu_sched_prio_policy;
 extern struct starpu_sched_policy _starpu_sched_random_policy;
 extern struct starpu_sched_policy _starpu_sched_random_policy;
 extern struct starpu_sched_policy _starpu_sched_dm_policy;
 extern struct starpu_sched_policy _starpu_sched_dm_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_policy;
+extern struct starpu_sched_policy _starpu_sched_dmda_prio_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_ready_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_ready_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_sorted_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_sorted_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_sorted_decision_policy;
 extern struct starpu_sched_policy _starpu_sched_dmda_sorted_decision_policy;

+ 18 - 0
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -1227,6 +1227,24 @@ struct starpu_sched_policy _starpu_sched_dmda_policy =
 	.worker_type = STARPU_WORKER_LIST,
 	.worker_type = STARPU_WORKER_LIST,
 };
 };
 
 
+struct starpu_sched_policy _starpu_sched_dmda_prio_policy =
+{
+	.init_sched = initialize_dmda_sorted_policy,
+	.deinit_sched = deinitialize_dmda_policy,
+	.add_workers = dmda_add_workers ,
+	.remove_workers = dmda_remove_workers,
+	.push_task = dmda_push_sorted_task,
+	.simulate_push_task = dmda_simulate_push_sorted_task,
+	.push_task_notify = dmda_push_task_notify,
+	.pop_task = dmda_pop_task,
+	.pre_exec_hook = dmda_pre_exec_hook,
+	.post_exec_hook = dmda_post_exec_hook,
+	.pop_every_task = dmda_pop_every_task,
+	.policy_name = "dmdap",
+	.policy_description = "data-aware performance model (priority)",
+	.worker_type = STARPU_WORKER_LIST,
+};
+
 struct starpu_sched_policy _starpu_sched_dmda_sorted_policy =
 struct starpu_sched_policy _starpu_sched_dmda_sorted_policy =
 {
 {
 	.init_sched = initialize_dmda_sorted_policy,
 	.init_sched = initialize_dmda_sorted_policy,

+ 1 - 1
tests/datawizard/variable_size.c

@@ -296,7 +296,7 @@ int main(void)
 	setenv("STARPU_LIMIT_CPU_MEM", LIMIT, 1);
 	setenv("STARPU_LIMIT_CPU_MEM", LIMIT, 1);
 	setenv("STARPU_DISK_SWAP", s, 0);
 	setenv("STARPU_DISK_SWAP", s, 0);
 	setenv("STARPU_DISK_SWAP_SIZE", "100000", 1);
 	setenv("STARPU_DISK_SWAP_SIZE", "100000", 1);
-#ifdef STARPU_LINUX_SYS
+#if 0 //def STARPU_LINUX_SYS
 	setenv("STARPU_DISK_SWAP_BACKEND", "unistd_o_direct", 0);
 	setenv("STARPU_DISK_SWAP_BACKEND", "unistd_o_direct", 0);
 #else
 #else
 	setenv("STARPU_DISK_SWAP_BACKEND", "unistd", 0);
 	setenv("STARPU_DISK_SWAP_BACKEND", "unistd", 0);

+ 2 - 2
tests/microbenchs/parallel_dependent_homogeneous_tasks_data.sh

@@ -2,7 +2,7 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 #
 # Copyright (C) 2016,2017                                CNRS
 # Copyright (C) 2016,2017                                CNRS
-# Copyright (C) 2016,2017                                Université de Bordeaux
+# Copyright (C) 2016,2017,2019                           Université de Bordeaux
 #
 #
 # StarPU is free software; you can redistribute it and/or modify
 # StarPU is free software; you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
 # it under the terms of the GNU Lesser General Public License as published by
@@ -17,6 +17,6 @@
 #
 #
 source $(dirname $0)/microbench.sh
 source $(dirname $0)/microbench.sh
 
 
-XSUCCESS="dmda dmdar dmdas dmdasd"
+XSUCCESS="dmda dmdap dmdar dmdas dmdasd"
 
 
 test_scheds parallel_dependent_homogeneous_tasks_data
 test_scheds parallel_dependent_homogeneous_tasks_data

+ 2 - 2
tests/microbenchs/parallel_independent_heterogeneous_tasks_data.sh

@@ -2,7 +2,7 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 #
 # Copyright (C) 2016,2017                                CNRS
 # Copyright (C) 2016,2017                                CNRS
-# Copyright (C) 2016,2017                                Université de Bordeaux
+# Copyright (C) 2016,2017,2019                           Université de Bordeaux
 #
 #
 # StarPU is free software; you can redistribute it and/or modify
 # StarPU is free software; you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
 # it under the terms of the GNU Lesser General Public License as published by
@@ -17,6 +17,6 @@
 #
 #
 source $(dirname $0)/microbench.sh
 source $(dirname $0)/microbench.sh
 
 
-XSUCCESS="dmda dmdar dmdas dmdasd pheft"
+XSUCCESS="dmda dmdap dmdar dmdas dmdasd pheft"
 
 
 test_scheds parallel_independent_heterogeneous_tasks_data
 test_scheds parallel_independent_heterogeneous_tasks_data

+ 2 - 2
tests/microbenchs/parallel_independent_homogeneous_tasks_data.sh

@@ -2,7 +2,7 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 #
 # Copyright (C) 2016,2017                                CNRS
 # Copyright (C) 2016,2017                                CNRS
-# Copyright (C) 2016,2017                                Université de Bordeaux
+# Copyright (C) 2016,2017,2019                           Université de Bordeaux
 #
 #
 # StarPU is free software; you can redistribute it and/or modify
 # StarPU is free software; you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
 # it under the terms of the GNU Lesser General Public License as published by
@@ -17,6 +17,6 @@
 #
 #
 source $(dirname $0)/microbench.sh
 source $(dirname $0)/microbench.sh
 
 
-XSUCCESS="dmda dmdar dmdas dmdasd pheft"
+XSUCCESS="dmda dmdap dmdar dmdas dmdasd pheft"
 
 
 test_scheds parallel_independent_homogeneous_tasks_data
 test_scheds parallel_independent_homogeneous_tasks_data

+ 2 - 2
tests/microbenchs/parallel_redux_heterogeneous_tasks_data.sh

@@ -2,7 +2,7 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 #
 # Copyright (C) 2016,2017                                CNRS
 # Copyright (C) 2016,2017                                CNRS
-# Copyright (C) 2016,2017                                Université de Bordeaux
+# Copyright (C) 2016,2017,2019                           Université de Bordeaux
 #
 #
 # StarPU is free software; you can redistribute it and/or modify
 # StarPU is free software; you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
 # it under the terms of the GNU Lesser General Public License as published by
@@ -17,6 +17,6 @@
 #
 #
 source $(dirname $0)/microbench.sh
 source $(dirname $0)/microbench.sh
 
 
-XSUCCESS="dmda dmdar dmdas dmdasd pheft"
+XSUCCESS="dmda dmdap dmdar dmdas dmdasd pheft"
 
 
 test_scheds parallel_independent_heterogeneous_tasks_data
 test_scheds parallel_independent_heterogeneous_tasks_data

+ 2 - 2
tests/microbenchs/parallel_redux_homogeneous_tasks_data.sh

@@ -2,7 +2,7 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 #
 # Copyright (C) 2016,2017                                CNRS
 # Copyright (C) 2016,2017                                CNRS
-# Copyright (C) 2016,2017                                Université de Bordeaux
+# Copyright (C) 2016,2017,2019                           Université de Bordeaux
 #
 #
 # StarPU is free software; you can redistribute it and/or modify
 # StarPU is free software; you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
 # it under the terms of the GNU Lesser General Public License as published by
@@ -17,6 +17,6 @@
 #
 #
 source $(dirname $0)/microbench.sh
 source $(dirname $0)/microbench.sh
 
 
-XSUCCESS="dmda dmdar dmdas dmdasd pheft"
+XSUCCESS="dmda dmdap dmdar dmdas dmdasd pheft"
 
 
 test_scheds parallel_independent_homogeneous_tasks_data
 test_scheds parallel_independent_homogeneous_tasks_data