瀏覽代碼

Fix not preventing tasks on combined workers due to the enable_knob

Samuel Thibault 5 年之前
父節點
當前提交
b8a6071fbc
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/core/workers.c

+ 3 - 3
src/core/workers.c

@@ -547,9 +547,6 @@ int starpu_worker_can_execute_task_first_impl(unsigned workerid, struct starpu_t
 
 int starpu_combined_worker_can_execute_task(unsigned workerid, struct starpu_task *task, unsigned nimpl)
 {
-	if (!_starpu_config.workers[workerid].enable_knob)
-		return 0;
-
 	/* TODO: check that the task operand sizes will fit on that device */
 
 	struct starpu_codelet *cl = task->cl;
@@ -558,6 +555,9 @@ int starpu_combined_worker_can_execute_task(unsigned workerid, struct starpu_tas
 	/* Is this a parallel worker ? */
 	if (workerid < nworkers)
 	{
+		if (!_starpu_config.workers[workerid].enable_knob)
+			return 0;
+
 		return !!((task->where & _starpu_config.workers[workerid].worker_mask) &&
 				_starpu_can_use_nth_implementation(_starpu_config.workers[workerid].arch, task->cl, nimpl) &&
 				(!task->cl->can_execute || task->cl->can_execute(workerid, task, nimpl)));