Explorar o código

revert r14967 and r14972: sched_ctx should actually call _starpu_push_task instead of _starpu_task_submit_nodeps (which does many things sched_ctx does not need)

Samuel Thibault %!s(int64=10) %!d(string=hai) anos
pai
achega
3914f3f061

+ 9 - 18
src/core/dependencies/data_concurrency.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2015  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013, 2015  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -251,13 +251,9 @@ static unsigned attempt_to_submit_data_request_from_job(struct _starpu_job *j, u
 /* No lock is held */
 static unsigned _submit_job_enforce_data_deps(struct _starpu_job *j, unsigned start_buffer_index)
 {
-	unsigned nbuffers;
 	unsigned buf;
 
-	if (j->task->cl == NULL)
-		return 0;
-
-	nbuffers = STARPU_TASK_GET_NBUFFERS(j->task);
+	unsigned nbuffers = STARPU_TASK_GET_NBUFFERS(j->task);
 	for (buf = start_buffer_index; buf < nbuffers; buf++)
 	{
 		if (buf)
@@ -281,13 +277,16 @@ static unsigned _submit_job_enforce_data_deps(struct _starpu_job *j, unsigned st
 	return 0;
 }
 
-void _starpu_submit_job_sort_data(struct _starpu_job *j)
+/* Sort the data used by the given job by handle pointer value order, and
+ * acquire them in that order */
+/* No  lock is held */
+unsigned _starpu_submit_job_enforce_data_deps(struct _starpu_job *j)
 {
 	struct starpu_codelet *cl = j->task->cl;
-	
+
 	if ((cl == NULL) || (STARPU_TASK_GET_NBUFFERS(j->task) == 0))
-		return;
-	
+		return 0;
+
 	/* Compute an ordered list of the different pieces of data so that we
 	 * grab then according to a total order, thus avoiding a deadlock
 	 * condition */
@@ -306,14 +305,6 @@ void _starpu_submit_job_sort_data(struct _starpu_job *j)
 
 	_starpu_sort_task_handles(_STARPU_JOB_GET_ORDERED_BUFFERS(j), STARPU_TASK_GET_NBUFFERS(j->task));
 
-}
-
-/* Sort the data used by the given job by handle pointer value order, and
- * acquire them in that order */
-/* No  lock is held */
-unsigned _starpu_submit_job_enforce_data_deps(struct _starpu_job *j)
-{
-	_starpu_submit_job_sort_data(j);
 	return _submit_job_enforce_data_deps(j, 0);
 }
 

+ 0 - 2
src/core/dependencies/data_concurrency.h

@@ -22,8 +22,6 @@
 
 unsigned _starpu_submit_job_enforce_data_deps(struct _starpu_job *j);
 
-void _starpu_submit_job_sort_data(struct _starpu_job *j);
-
 int _starpu_notify_data_dependencies(starpu_data_handle_t handle);
 
 unsigned _starpu_attempt_to_submit_data_request_from_apps(starpu_data_handle_t handle,

+ 0 - 4
src/core/task.c

@@ -35,7 +35,6 @@
 #include <core/sched_ctx.h>
 #include <time.h>
 #include <signal.h>
-#include <core/dependencies/data_concurrency.h>
 #ifdef STARPU_HAVE_WINDOWS
 #include <windows.h>
 #endif
@@ -686,9 +685,6 @@ int _starpu_task_submit_nodeps(struct starpu_task *task)
 	}
 
 	struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
-	/* create a job for the task and also sort all the data because 
-	   starpu wants a sorted list of buffers at the end */
-	_starpu_submit_job_sort_data(j);
 
 	if (j->internal)
 	{