Bladeren bron

data_request: Fix distinguishing Prefetch and TaskPrefetch in FxT traces

Samuel Thibault 4 jaren geleden
bovenliggende
commit
e635002da2
2 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 1 1
      src/datawizard/copy_driver.c
  2. 3 3
      src/datawizard/data_request.c

+ 1 - 1
src/datawizard/copy_driver.c

@@ -219,7 +219,7 @@ int STARPU_ATTRIBUTE_WARN_UNUSED_RESULT _starpu_driver_copy_data_1_to_1(starpu_d
 			/* We're not supposed to allocate there at the moment */
 			return -ENOMEM;
 
-		int ret_alloc = _starpu_allocate_memory_on_node(handle, dst_replicate, req ? req->prefetch : STARPU_FETCH);
+		int ret_alloc = _starpu_allocate_memory_on_node(handle, dst_replicate, prefetch);
 		if (ret_alloc)
 			return -ENOMEM;
 	}

+ 3 - 3
src/datawizard/data_request.c

@@ -502,7 +502,7 @@ static void starpu_handle_data_request_completion(struct _starpu_data_request *r
 }
 
 /* TODO : accounting to see how much time was spent working for other people ... */
-static int starpu_handle_data_request(struct _starpu_data_request *r, unsigned may_alloc, enum starpu_is_prefetch prefetch)
+static int starpu_handle_data_request(struct _starpu_data_request *r, unsigned may_alloc)
 {
 	starpu_data_handle_t handle = r->handle;
 
@@ -551,7 +551,7 @@ static int starpu_handle_data_request(struct _starpu_data_request *r, unsigned m
 
 	if (dst_replicate && dst_replicate->state == STARPU_INVALID)
 		r->retval = _starpu_driver_copy_data_1_to_1(handle, src_replicate,
-						    dst_replicate, !(r_mode & STARPU_R), r, may_alloc, prefetch);
+						    dst_replicate, !(r_mode & STARPU_R), r, may_alloc, r->prefetch);
 	else
 		/* Already valid actually, no need to transfer anything */
 		r->retval = 0;
@@ -662,7 +662,7 @@ static int __starpu_handle_node_data_requests(struct _starpu_data_request_prio_l
 
 		r = _starpu_data_request_list_pop_front(&local_list);
 
-		res = starpu_handle_data_request(r, may_alloc, prefetch);
+		res = starpu_handle_data_request(r, may_alloc);
 		if (res != 0 && res != -EAGAIN)
 		{
 			/* handle is busy, or not enough memory, postpone for now */