Accéder au contenu.
Menu Sympa

starpu-devel - [Starpu-devel] [PATCH v2 4/6] heft.c: Remove the "bundle" parameter from compute_all_performance_predictions().

Objet : Developers list for StarPU

Archives de la liste

[Starpu-devel] [PATCH v2 4/6] heft.c: Remove the "bundle" parameter from compute_all_performance_predictions().


Chronologique Discussions 
  • From: Cyril Roelandt <cyril.roelandt@inria.fr>
  • To: starpu-devel@lists.gforge.inria.fr
  • Subject: [Starpu-devel] [PATCH v2 4/6] heft.c: Remove the "bundle" parameter from compute_all_performance_predictions().
  • Date: Mon, 22 Oct 2012 04:56:34 +0200
  • 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>

Motivations:
* compute_all_performance_predictions() has one less parameter.
* one less local variable in _heft_push_task().
* will be easier to merge heft and dm*.
* we may need to dereference "task" a little bit more often to get
"task->bundle", but this should not be so bad.

Signed-off-by: Cyril Roelandt <cyril.roelandt@inria.fr>
---
trunk/src/sched_policies/heft.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/trunk/src/sched_policies/heft.c b/trunk/src/sched_policies/heft.c
index db91a4d..d2d74cc 100644
--- a/trunk/src/sched_policies/heft.c
+++ b/trunk/src/sched_policies/heft.c
@@ -243,8 +243,7 @@ static void compute_all_performance_predictions(struct
starpu_task *task,
double *best_exp_endp,
double
local_data_penalty[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS],
double
local_power[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS],
- int *forced_worker, int *forced_impl,
- starpu_task_bundle_t bundle)
+ int *forced_worker, int *forced_impl)
{
int calibrating = 0;
double max_exp_end = DBL_MIN;
@@ -259,6 +258,8 @@ static void compute_all_performance_predictions(struct
starpu_task *task,

unsigned nimpl;

+ starpu_task_bundle_t bundle = task->bundle;
+
for (worker = 0; worker < nworkers; worker++)
{
struct _starpu_fifo_taskq *fifo = queue_array[worker];
@@ -410,13 +411,10 @@ static int _heft_push_task(struct starpu_task *task,
unsigned prio)
* and detect if there is some calibration that needs to be done.
*/

- starpu_task_bundle_t bundle = task->bundle;
-
compute_all_performance_predictions(task, local_task_length, exp_end,
&max_exp_end, &best_exp_end,
local_data_penalty,
- local_power, &forced_worker,
&forced_impl,
- bundle);
+ local_power, &forced_worker,
&forced_impl);

/* If there is no prediction available for that task with that arch we
* want to speed-up calibration time so we force this measurement */
@@ -483,7 +481,7 @@ static int _heft_push_task(struct starpu_task *task,
unsigned prio)
/* we should now have the best worker in variable "best" */
double model_best, transfer_model_best;

- if (bundle)
+ if (task->bundle)
{
/* If we have a task bundle, we have computed the expected
* length for the entire bundle, but not for the task alone.
*/
@@ -495,7 +493,7 @@ static int _heft_push_task(struct starpu_task *task,
unsigned prio)
/* Remove the task from the bundle since we have made a
* decision for it, and that other tasks should not consider
it
* anymore. */
- starpu_task_bundle_remove(bundle, task);
+ starpu_task_bundle_remove(task->bundle, task);
}
else
{
--
1.7.9






Archives gérées par MHonArc 2.6.19+.

Haut de le page