|
@@ -310,11 +310,19 @@ int starpu_worker_can_execute_task(unsigned workerid, struct starpu_task *task,
|
|
|
int starpu_worker_can_execute_task_impl(unsigned workerid, struct starpu_task *task, unsigned *impl_mask)
|
|
|
{
|
|
|
struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(task->sched_ctx);
|
|
|
+
|
|
|
+ /* if the task can't be parallel don't submit it to a ctx */
|
|
|
+ unsigned child_sched_ctx = starpu_sched_ctx_worker_is_master_for_child_ctx(workerid, sched_ctx->id);
|
|
|
+ if(child_sched_ctx != STARPU_NMAX_SCHED_CTXS)
|
|
|
+ if(!task->possibly_parallel) return 0;
|
|
|
+
|
|
|
+ /* if the worker is blocked in a parallel ctx don't submit tasks on it */
|
|
|
+ if(sched_ctx->parallel_sect[workerid]) return 0;
|
|
|
+
|
|
|
unsigned mask;
|
|
|
int i;
|
|
|
enum starpu_worker_archtype arch;
|
|
|
struct starpu_codelet *cl;
|
|
|
- if(sched_ctx->parallel_sect[workerid]) return 0;
|
|
|
/* TODO: check that the task operand sizes will fit on that device */
|
|
|
cl = task->cl;
|
|
|
if (!(cl->where & config.workers[workerid].worker_mask)) return 0;
|