Explorar el Código

- do not re-fetch data on continuation wake-up

Olivier Aumage hace 11 años
padre
commit
4d645eeabb
Se han modificado 2 ficheros con 11 adiciones y 2 borrados
  1. 3 1
      src/core/task.c
  2. 8 1
      src/drivers/cpu/driver_cpu.c

+ 3 - 1
src/core/task.c

@@ -264,6 +264,8 @@ int _starpu_submit_job(struct _starpu_job *j)
 	int ret;
 #ifdef STARPU_OPENMP
 	const unsigned continuation = j->continuation;
+#else
+	const unsigned continuation = 0;
 #endif
 
 	_STARPU_LOG_IN();
@@ -298,7 +300,7 @@ int _starpu_submit_job(struct _starpu_job *j)
 #endif//STARPU_USE_SC_HYPERVISOR
 
 	/* We retain handle reference count */
-	if (task->cl)
+	if (task->cl && !continuation)
 	{
 		unsigned i;
 		for (i=0; i<task->cl->nbuffers; i++)

+ 8 - 1
src/drivers/cpu/driver_cpu.c

@@ -58,10 +58,17 @@ static int execute_job_on_cpu(struct _starpu_job *j, struct starpu_task *worker_
 
 	struct starpu_task *task = j->task;
 	struct starpu_codelet *cl = task->cl;
+#ifdef STARPU_OPENMP
+	/* At this point, j->continuation as been cleared as the task is being
+	 * woken up, thus we use j->discontinuous instead for the check */
+	const unsigned continuation = j->discontinuous;
+#else
+	const unsigned continuation = 0;
+#endif
 
 	STARPU_ASSERT(cl);
 
-	if (rank == 0)
+	if (rank == 0 && !continuation)
 	{
 		ret = _starpu_fetch_task_input(j);
 		if (ret != 0)