Forráskód Böngészése

src: give name to internal tasks

Nathalie Furmento 11 éve
szülő
commit
3989f504bd

+ 1 - 0
src/core/sched_policy.c

@@ -466,6 +466,7 @@ struct starpu_task *_starpu_create_conversion_task_for_arch(starpu_data_handle_t
 #endif
 
 	conversion_task = starpu_task_create();
+	conversion_task->name = "conversion_task";
 	conversion_task->synchronous = 0;
 	STARPU_TASK_SET_HANDLE(conversion_task, handle, 0);
 

+ 2 - 0
src/datawizard/filters.c

@@ -312,6 +312,8 @@ void starpu_data_unpartition(starpu_data_handle_t root_handle, unsigned gatherin
 				.nbuffers = 1
 			};
 			struct starpu_task *task = starpu_task_create();
+			task->name = "convert_data";
+
 			STARPU_TASK_SET_HANDLE(task, child_handle, 0);
 			task->cl = &cl;
 			task->synchronous = 1;

+ 4 - 0
src/datawizard/malloc.c

@@ -141,6 +141,7 @@ int starpu_malloc_flags(void **A, size_t dim, int flags)
 
 			malloc_pinned_cl.where = STARPU_CUDA;
 			struct starpu_task *task = starpu_task_create();
+			task->name = "cuda_malloc_pinned";
 			task->callback_func = NULL;
 			task->cl = &malloc_pinned_cl;
 			task->cl_arg = &s;
@@ -171,6 +172,7 @@ int starpu_malloc_flags(void **A, size_t dim, int flags)
 //
 //			malloc_pinned_cl.where = STARPU_OPENCL;
 //			struct starpu_task *task = starpu_task_create();
+//		        task->name = "opencl_malloc_pinned";
 //			task->callback_func = NULL;
 //			task->cl = &malloc_pinned_cl;
 //			task->cl_arg = &s;
@@ -295,6 +297,7 @@ int starpu_free_flags(void *A, size_t dim, int flags)
 
 				free_pinned_cl.where = STARPU_CUDA;
 				struct starpu_task *task = starpu_task_create();
+				task->name = "cuda_free_pinned";
 				task->callback_func = NULL;
 				task->cl = &free_pinned_cl;
 				task->cl_arg = A;
@@ -319,6 +322,7 @@ int starpu_free_flags(void *A, size_t dim, int flags)
 //
 //                free_pinned_cl.where = STARPU_OPENCL;
 //		struct starpu_task *task = starpu_task_create();
+//              task->name = "opencl_free_pinned";
 //		task->callback_func = NULL;
 //		task->cl = &free_pinned_cl;
 //		task->cl_arg = A;

+ 3 - 0
src/datawizard/reduction.c

@@ -233,6 +233,7 @@ void _starpu_data_end_reduction_mode(starpu_data_handle_t handle)
 					/* Perform the reduction between replicates i
 					 * and i+step and put the result in replicate i */
 					struct starpu_task *redux_task = starpu_task_create();
+					redux_task->name = "redux_task_between_replicates";
 
 					/* Mark these tasks so that StarPU does not block them
 					 * when they try to access the handle (normal tasks are
@@ -294,6 +295,7 @@ void _starpu_data_end_reduction_mode(starpu_data_handle_t handle)
 		if (empty)
 		{
 			struct starpu_task *redux_task = starpu_task_create();
+			redux_task->name = "redux_task_empty";
 
 			/* Mark these tasks so that StarPU does not block them
 			 * when they try to access the handle (normal tasks are
@@ -320,6 +322,7 @@ void _starpu_data_end_reduction_mode(starpu_data_handle_t handle)
 		for (replicate = 0; replicate < replicate_count; replicate++)
 		{
 			struct starpu_task *redux_task = starpu_task_create();
+			redux_task->name = "redux_task_reduction";
 
 			/* Mark these tasks so that StarPU does not block them
 			 * when they try to access the handle (normal tasks are

+ 2 - 1
src/util/starpu_create_sync_task.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 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
@@ -30,6 +30,7 @@ void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t
 
 	/* We create an empty task */
 	struct starpu_task *sync_task = starpu_task_create();
+	sync_task->name = "create_sync_task";
 
 	sync_task->use_tag = 1;
 	sync_task->tag_id = sync_tag;

+ 1 - 0
src/util/starpu_data_cpy.c

@@ -141,6 +141,7 @@ int _starpu_data_cpy(starpu_data_handle_t dst_handle, starpu_data_handle_t src_h
 
 	struct starpu_task *task = starpu_task_create();
 	STARPU_ASSERT(task);
+	task->name = "data_cpy";
 
 	struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
 	if (reduction)

+ 2 - 0
src/util/starpu_task_insert.c

@@ -86,6 +86,7 @@ int _starpu_task_insert_v(struct starpu_codelet *cl, va_list varg_list)
 	}
 
 	struct starpu_task *task = starpu_task_create();
+	task->name = "task_insert";
 	task->cl_arg_free = 1;
 
 	if (cl && cl->nbuffers > STARPU_NMAXBUFS)
@@ -146,6 +147,7 @@ struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...)
 	}
 
 	struct starpu_task *task = starpu_task_create();
+	task->name = "task_build";
 
 	if (cl && cl->nbuffers > STARPU_NMAXBUFS)
 	{