|
@@ -406,6 +406,7 @@ static int _dm_push_task(struct starpu_task *task, unsigned prio, unsigned sched
|
|
|
|
|
|
unsigned best_impl = 0;
|
|
|
unsigned nimpl;
|
|
|
+ unsigned impl_mask;
|
|
|
struct starpu_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
|
|
|
|
|
|
struct starpu_sched_ctx_iterator it;
|
|
@@ -421,9 +422,12 @@ static int _dm_push_task(struct starpu_task *task, unsigned prio, unsigned sched
|
|
|
|
|
|
double exp_start = STARPU_MAX(fifo->exp_start, starpu_timing_now());
|
|
|
|
|
|
+ if (!starpu_worker_can_execute_task_impl(worker, task, &impl_mask))
|
|
|
+ continue;
|
|
|
+
|
|
|
for (nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS; nimpl++)
|
|
|
{
|
|
|
- if (!starpu_worker_can_execute_task(worker, task, nimpl))
|
|
|
+ if (!(impl_mask & (1U << nimpl)))
|
|
|
{
|
|
|
|
|
|
|
|
@@ -540,6 +544,7 @@ static void compute_all_performance_predictions(struct starpu_task *task,
|
|
|
unsigned worker, worker_ctx = 0;
|
|
|
|
|
|
unsigned nimpl;
|
|
|
+ unsigned impl_mask;
|
|
|
|
|
|
starpu_task_bundle_t bundle = task->bundle;
|
|
|
struct _starpu_dmda_data *dt = (struct _starpu_dmda_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
|
|
@@ -559,9 +564,12 @@ static void compute_all_performance_predictions(struct starpu_task *task,
|
|
|
|
|
|
double exp_start = STARPU_MAX(fifo->exp_start, starpu_timing_now());
|
|
|
|
|
|
- for(nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS; nimpl++)
|
|
|
- {
|
|
|
- if (!starpu_worker_can_execute_task(worker, task, nimpl))
|
|
|
+ if (!starpu_worker_can_execute_task_impl(worker, task, &impl_mask))
|
|
|
+ continue;
|
|
|
+
|
|
|
+ for (nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS; nimpl++)
|
|
|
+ {
|
|
|
+ if (!(impl_mask & (1U << nimpl)))
|
|
|
{
|
|
|
|
|
|
continue;
|
|
@@ -711,6 +719,7 @@ static int _dmda_push_task(struct starpu_task *task, unsigned prio, unsigned sch
|
|
|
double best_fitness = -1;
|
|
|
|
|
|
unsigned nimpl;
|
|
|
+ unsigned impl_mask;
|
|
|
if (forced_best == -1)
|
|
|
{
|
|
|
struct starpu_sched_ctx_iterator it;
|
|
@@ -719,9 +728,11 @@ static int _dmda_push_task(struct starpu_task *task, unsigned prio, unsigned sch
|
|
|
while(workers->has_next_master(workers, &it))
|
|
|
{
|
|
|
worker = workers->get_next_master(workers, &it);
|
|
|
+ if (!starpu_worker_can_execute_task_impl(worker, task, &impl_mask))
|
|
|
+ continue;
|
|
|
for (nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS; nimpl++)
|
|
|
{
|
|
|
- if (!starpu_worker_can_execute_task(worker, task, nimpl))
|
|
|
+ if (!(impl_mask & (1U << nimpl)))
|
|
|
{
|
|
|
|
|
|
continue;
|