|
@@ -2,7 +2,7 @@
|
|
|
*
|
|
|
* Copyright (C) 2013 Inria
|
|
|
* Copyright (C) 2014,2016,2017 CNRS
|
|
|
- * Copyright (C) 2014-2018 Université de Bordeaux
|
|
|
+ * Copyright (C) 2014-2018,2020 Université de Bordeaux
|
|
|
* Copyright (C) 2013 Simon Archipoff
|
|
|
*
|
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
@@ -30,8 +30,14 @@ static int find_best_impl(unsigned sched_ctx_id, struct starpu_task * task, int
|
|
|
{
|
|
|
double len = DBL_MAX;
|
|
|
int best_impl = -1;
|
|
|
- int impl;
|
|
|
- for(impl = 0; impl < STARPU_MAXIMPLEMENTATIONS; impl++)
|
|
|
+ unsigned impl;
|
|
|
+ if (!task->cl->model)
|
|
|
+ {
|
|
|
+ /* No perfmodel, first available will be fine */
|
|
|
+ starpu_worker_can_execute_task_first_impl(workerid, task, &impl);
|
|
|
+ best_impl = impl;
|
|
|
+ }
|
|
|
+ else for(impl = 0; impl < STARPU_MAXIMPLEMENTATIONS; impl++)
|
|
|
{
|
|
|
if(starpu_worker_can_execute_task(workerid, task, impl))
|
|
|
{
|