Objet : Developers list for StarPU
Archives de la liste
- From: Cyril Roelandt <cyril.roelandt@inria.fr>
- To: starpu-devel@lists.gforge.inria.fr
- Subject: [Starpu-devel] [PATCH 4/5] dm*: Add StarPU-Top support.
- Date: Wed, 28 Nov 2012 00:35:11 +0100
- List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel>
- List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>
---
.../deque_modeling_policy_data_aware.c | 34
++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/trunk/src/sched_policies/deque_modeling_policy_data_aware.c
b/trunk/src/sched_policies/deque_modeling_policy_data_aware.c
index 87a5edd..f413ca3 100644
--- a/trunk/src/sched_policies/deque_modeling_policy_data_aware.c
+++ b/trunk/src/sched_policies/deque_modeling_policy_data_aware.c
@@ -27,6 +27,7 @@
#include <core/perfmodel/perfmodel.h>
#include <starpu_parameters.h>
#include <core/debug.h>
+#include <top/starpu_top_core.h>
#ifndef DBL_MIN
#define DBL_MIN __DBL_MIN__
@@ -47,6 +48,16 @@ static double beta = _STARPU_DEFAULT_BETA;
static double _gamma = _STARPU_DEFAULT_GAMMA;
static double idle_power = 0.0;
+/* TODO: use an ifdef STARPU_TOP. */
+static const float alpha_minimum=0;
+static const float alpha_maximum=10.0;
+static const float beta_minimum=0;
+static const float beta_maximum=10.0;
+static const float gamma_minimum=0;
+static const float gamma_maximum=10000.0;
+static const float idle_power_minimum=0;
+static const float idle_power_maximum=10000.0;
+
#ifdef STARPU_VERBOSE
static long int total_task_cnt = 0;
static long int ready_task_cnt = 0;
@@ -74,6 +85,15 @@ static int count_non_ready_buffers(struct starpu_task
*task, uint32_t node)
return cnt;
}
+static void param_modified(struct starpu_top_param* d)
+{
+ /* Just to show parameter modification. */
+ fprintf(stderr,
+ "%s has been modified : "
+ "alpha=%f|beta=%f|gamma=%f|idle_power=%f !\n",
+ d->name, alpha,beta,_gamma, idle_power);
+}
+
static struct starpu_task *_starpu_fifo_pop_first_ready_task(struct
_starpu_fifo_taskq *fifo_queue, unsigned node)
{
struct starpu_task *task = NULL, *current;
@@ -256,6 +276,11 @@ static int push_task_on_best_worker(struct starpu_task
*task, int best_workerid,
task->predicted = predicted;
task->predicted_transfer = predicted_transfer;
+ if (_starpu_top_status_get())
+ _starpu_top_task_prevision(task, best_workerid,
+ (unsigned long long)(fifo->exp_end-predicted)/1000,
+ (unsigned long long)fifo->exp_end/1000);
+
if (starpu_get_prefetch_flag())
{
unsigned memory_node =
starpu_worker_get_memory_node(best_workerid);
@@ -640,6 +665,15 @@ static void initialize_dmda_policy(struct
starpu_machine_topology *topology,
if (strval_idle_power)
idle_power = atof(strval_idle_power);
+ starpu_top_register_parameter_float("DMDA_ALPHA", &alpha,
+ alpha_minimum, alpha_maximum, param_modified);
+ starpu_top_register_parameter_float("DMDA_BETA", &beta,
+ beta_minimum, beta_maximum, param_modified);
+ starpu_top_register_parameter_float("DMDA_GAMMA", &_gamma,
+ gamma_minimum, gamma_maximum, param_modified);
+ starpu_top_register_parameter_float("DMDA_IDLE_POWER", &idle_power,
+ idle_power_minimum, idle_power_maximum, param_modified);
+
unsigned workerid;
for (workerid = 0; workerid < nworkers; workerid++)
{
--
1.7.10.4
- [Starpu-devel] [PATCH 0/5] Merge heft and dmda., Cyril Roelandt, 28/11/2012
- [Starpu-devel] [PATCH 1/5] dmda*: Add a pre_exec_hook, taken from heft., Cyril Roelandt, 28/11/2012
- [Starpu-devel] [PATCH 3/5] dmda*: take into account the data transfer time., Cyril Roelandt, 28/11/2012
- [Starpu-devel] [PATCH 4/5] dm*: Add StarPU-Top support., Cyril Roelandt, 28/11/2012
- [Starpu-devel] [PATCH 2/5] dmda*: add a push_task_notify method, taken from heft., Cyril Roelandt, 28/11/2012
- [Starpu-devel] [PATCH 5/5] Remove heft., Cyril Roelandt, 28/11/2012
Archives gérées par MHonArc 2.6.19+.