소스 검색

Add missing ghost dependencies in DAG

Samuel Thibault 11 년 전
부모
커밋
384ffc0f62
1개의 변경된 파일14개의 추가작업 그리고 4개의 파일을 삭제
  1. 14 4
      src/core/dependencies/implicit_data_deps.c

+ 14 - 4
src/core/dependencies/implicit_data_deps.c

@@ -236,7 +236,7 @@ struct starpu_task *_starpu_detect_implicit_data_deps_with_handle(struct starpu_
 			struct _starpu_task_wrapper_list *l = handle->last_submitted_accessors;
 			_STARPU_DEP_DEBUG("dependency\n");
 
-			if (l && l->next)
+			if ((l && l->next) || (handle->last_submitted_ghost_accessors_id && handle->last_submitted_ghost_accessors_id->next))
 			{
 				/* Several previous accessors */
 
@@ -268,12 +268,22 @@ struct starpu_task *_starpu_detect_implicit_data_deps_with_handle(struct starpu_
 			}
 			else
 			{
-				if (l)
+				if (l || handle->last_submitted_ghost_accessors_id)
 				{
 					/* One previous accessor, make it the sync
 					 * task, and start depending on it. */
-					handle->last_sync_task = l->task;
-					handle->last_submitted_accessors = NULL;
+					if (l)
+					{
+						handle->last_sync_task = l->task;
+						handle->last_submitted_accessors = NULL;
+					}
+					else if (handle->last_submitted_ghost_accessors_id)
+					{
+						handle->last_submitted_ghost_sync_id = handle->last_submitted_ghost_accessors_id->id;
+						handle->last_submitted_ghost_sync_id_is_valid = 1;
+						free(handle->last_submitted_ghost_accessors_id);
+						handle->last_submitted_ghost_accessors_id = NULL;
+					}
 					free(l);
 				}
 				_starpu_add_accessor(handle, pre_sync_task, post_sync_task);