|
@@ -106,6 +106,9 @@ static int heteroprio_progress_accel(struct starpu_sched_component *component, s
|
|
/* Estimated transfer+task termination for each child */
|
|
/* Estimated transfer+task termination for each child */
|
|
double estimated_ends_with_task[component->nchildren];
|
|
double estimated_ends_with_task[component->nchildren];
|
|
|
|
|
|
|
|
+ /* provided local energy */
|
|
|
|
+ double local_energy[component->nchildren];
|
|
|
|
+
|
|
/* Minimum transfer+task termination on all children */
|
|
/* Minimum transfer+task termination on all children */
|
|
double min_exp_end_with_task;
|
|
double min_exp_end_with_task;
|
|
/* Maximum transfer+task termination on all children */
|
|
/* Maximum transfer+task termination on all children */
|
|
@@ -158,12 +161,17 @@ static int heteroprio_progress_accel(struct starpu_sched_component *component, s
|
|
&min_exp_end_with_task, &max_exp_end_with_task,
|
|
&min_exp_end_with_task, &max_exp_end_with_task,
|
|
suitable_components, nsuitable_components);
|
|
suitable_components, nsuitable_components);
|
|
|
|
|
|
|
|
+ /* Compute the energy, if provided*/
|
|
|
|
+ starpu_mct_compute_energy(component, task, local_energy, suitable_components, nsuitable_components);
|
|
|
|
+
|
|
/* And now find out which worker suits best for this task,
|
|
/* And now find out which worker suits best for this task,
|
|
* including data transfer */
|
|
* including data transfer */
|
|
|
|
+
|
|
int best_icomponent = starpu_mct_get_best_component(d, task,
|
|
int best_icomponent = starpu_mct_get_best_component(d, task,
|
|
estimated_lengths,
|
|
estimated_lengths,
|
|
estimated_transfer_length,
|
|
estimated_transfer_length,
|
|
estimated_ends_with_task,
|
|
estimated_ends_with_task,
|
|
|
|
+ local_energy,
|
|
min_exp_end_with_task, max_exp_end_with_task,
|
|
min_exp_end_with_task, max_exp_end_with_task,
|
|
suitable_components, nsuitable_components);
|
|
suitable_components, nsuitable_components);
|
|
|
|
|
|
@@ -236,6 +244,9 @@ static int heteroprio_progress_noaccel(struct starpu_sched_component *component,
|
|
/* Estimated transfer+task termination for each child */
|
|
/* Estimated transfer+task termination for each child */
|
|
double estimated_ends_with_task[component->nchildren];
|
|
double estimated_ends_with_task[component->nchildren];
|
|
|
|
|
|
|
|
+ /* estimated energy */
|
|
|
|
+ double local_energy[component->nchildren];
|
|
|
|
+
|
|
/* Minimum transfer+task termination on all children */
|
|
/* Minimum transfer+task termination on all children */
|
|
double min_exp_end_with_task;
|
|
double min_exp_end_with_task;
|
|
/* Maximum transfer+task termination on all children */
|
|
/* Maximum transfer+task termination on all children */
|
|
@@ -267,12 +278,17 @@ static int heteroprio_progress_noaccel(struct starpu_sched_component *component,
|
|
&min_exp_end_with_task, &max_exp_end_with_task,
|
|
&min_exp_end_with_task, &max_exp_end_with_task,
|
|
suitable_components, nsuitable_components);
|
|
suitable_components, nsuitable_components);
|
|
|
|
|
|
|
|
+ /* Compute the energy, if provided*/
|
|
|
|
+ starpu_mct_compute_energy(component, task, local_energy, suitable_components, nsuitable_components);
|
|
|
|
+
|
|
/* And now find out which worker suits best for this task,
|
|
/* And now find out which worker suits best for this task,
|
|
* including data transfer */
|
|
* including data transfer */
|
|
|
|
+
|
|
int best_icomponent = starpu_mct_get_best_component(d, task,
|
|
int best_icomponent = starpu_mct_get_best_component(d, task,
|
|
estimated_lengths,
|
|
estimated_lengths,
|
|
estimated_transfer_length,
|
|
estimated_transfer_length,
|
|
estimated_ends_with_task,
|
|
estimated_ends_with_task,
|
|
|
|
+ local_energy,
|
|
min_exp_end_with_task, max_exp_end_with_task,
|
|
min_exp_end_with_task, max_exp_end_with_task,
|
|
suitable_components, nsuitable_components);
|
|
suitable_components, nsuitable_components);
|
|
|
|
|